Rank the elements behind LCP, CLS and INP
Rank the attributed elements (CSS selector paths) for lcp / cls / inp.
bearerAuthAuthorizationBearer <fm_… / fmo_…>API token generated from the fastmon dashboard (Account → API Token) or at organization level (fmo_…, one that outlives its creator). Send as Authorization: Bearer fm_... or paste the full token (including its prefix) into the Authorize dialog.
org_id*Org Iduuidapplication/json- body
Request for the element-targets breakdown (migration-053 selector paths).
Generic over the three attributed vitals: which ELEMENT is the LCP / the largest layout shift / the reported INP interaction target. The selector columns are deliberately not query-builder dimensions (high-cardinality GROUP BY hazard); this endpoint ranks them via a bounded-state topK instead.
time_range*Time range for the query (required)
filters?Optional filters
metric*ElementTargetMetricWhich vital's element attribution to rank
"lcp""cls""inp"by?By'element' ranks the CSS selector path; 'resource_url' ranks the LCP resource URL (only valid for metric='lcp')
"element""element""resource_url"group_by?Group By'url', 'page_type' or 'device_type' ranks targets per value of that column. 'none' ranks them over the whole scope
"none""none""url""page_type""device_type"target?|Keep only the pageviews whose ranked column is exactly this value: the selector, or with by='resource_url' the LCP resource URL. Takes the target of an item. With a group_by the top groups are then those of this element
limit?LimitTop-N targets per group
1 <= value <= 2510groups_limit?Groups LimitTop-N groups by attributed pageviews, for a group_by
1 <= value <= 5020Successful Response
application/json- response
Response for the element-targets breakdown.
meta*Facts about the result
request*The request as the server resolved it
metric*ElementTargetMetricThe requested vital
"lcp""cls""inp"groups*array<>group_by=none → exactly one group; any other group_by → the top groups
curl -X POST 'https://api.fastmon.eu/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/analytics/element-targets' \ -H 'Content-Type: application/json' \ -d '{ "time_range": { "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z" }, "metric": "lcp"}'{ "meta": { "execution_time_ms": 0, "total": 0, "limit": 0, "offset": 0, "has_more": true, "next_cursor": "string", "sampling": { "sampling_rate": 0, "is_sampled": true, "estimated_metrics": [ "string" ] }, "is_identity_mixed": true, "complete_until": "2019-08-24T14:15:22Z" }, "request": { "time_range": { "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z" }, "comparison_time_range": { "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z" }, "granularity": "minute", "identity": "stitch", "window_seconds": 0, "filters": {}, "url_param_key": "string" }, "metric": "lcp", "groups": [ { "key": "string", "pageviews_with_target": 0, "targets": [ { "target": "string", "count": 0, "share": 0, "avg_value": 0, "distribution": { "p50": 0, "p75": 0, "p90": 0, "p95": 0, "count": 0 }, "first_seen_at": "2019-08-24T14:15:22Z", "example_url": "string", "avg_lcp_ttfb": 0, "avg_lcp_load_delay": 0, "avg_lcp_load_duration": 0, "avg_lcp_render_delay": 0, "lcp_discovered_via": "preload", "image_rate": 0, "fetch_priority_high_rate": 0, "lazy_rate": 0, "cache_rate": 0, "resource_url": "string", "resource_url_count": 0 } ] } ]}