Guides
Insights
Metrics by account, campaign, ad set and ad, with date ranges, daily increment, breakdowns, filtering, asynchronous reports and how Mimicr generates delivery.
Insights returns an object's performance: spend, impressions, clicks, reach, frequency and attributed actions. It answers at /act_{id}/insights, /{campaign_id}/insights, /{adset_id}/insights and /{ad_id}/insights and requires ads_read.
Synchronous query
Performance of each ad in a campaign, by day:
curl -G 'https://meta-ads.mimicr.dev/v27.0/120200539998049712/insights' \
-H 'Authorization: Bearer <token>' \
--data-urlencode 'level=ad' \
--data-urlencode 'fields=ad_id,spend,impressions,clicks,frequency,actions' \
--data-urlencode 'time_range={"since":"2026-11-06","until":"2026-11-07"}' \
--data-urlencode 'time_increment=1' \
--data-urlencode 'filtering=[{"field":"ad.effective_status","operator":"IN","value":["ACTIVE","PAUSED","DELETED","ARCHIVED"]}]' \
--data-urlencode 'limit=500'{
"data": [
{
"ad_id": "120200539998049721",
"spend": "13.11",
"impressions": "513",
"clicks": "7",
"frequency": "1.070981",
"actions": [
{ "action_type": "link_click", "value": "6" },
{ "action_type": "onsite_conversion.messaging_conversation_started_7d", "value": "2" }
],
"date_start": "2026-11-06",
"date_stop": "2026-11-06"
}
],
"paging": { "cursors": { "before": "MAZDZD", "after": "MAZDZD" } }
}Every number comes as a string. spend, cpc, cpm and action_values are in reais (the currency unit), not cents. Only rows with delivery come back: an ad with no impressions that day doesn't appear.
Parameters
| Parameter | Use |
|---|---|
level | account, campaign, adset or ad; default: the node's level |
fields | Metrics and ids; default impressions,spend |
date_preset | today, yesterday, last_7d, last_30d (default), this_month, maximum, … last_Nd doesn't include today |
time_range | {"since":"YYYY-MM-DD","until":"YYYY-MM-DD"} in the account's timezone |
time_ranges | List of date ranges; replaces time_range and time_increment |
time_increment | all_days (default), monthly or 1 to 90 days |
breakdowns | age, gender, publisher_platform, platform_position, device_platform, region, country |
filtering | [{field, operator, value}], for example ad.effective_status, campaign.id, ad.impressions |
sort | spend_descending, impressions_ascending, … |
summary | Fields to total in a summary next to data |
limit, after | Cursor pagination |
Fields accepted in fields: account_id, account_name, account_currency, campaign_id, campaign_name, adset_id, adset_name, ad_id, ad_name, objective, optimization_goal, impressions, reach, frequency, spend, clicks, unique_clicks, inline_link_clicks, ctr, cpc, cpm, cpp, actions, action_values, cost_per_action_type, conversions, date_start and date_stop. An unknown name answers (#100) <field> is not valid for fields param. A breakdown outside the list answers 2/1504041.
Archived and deleted objects only appear in per-object rows when the filtering on {level}.effective_status includes them. In the parent's totals and in the object's own /{id}/insights they always count. And follow paging.next: with level=ad and time_increment=1, a campaign with 20 ads over 30 days has 600 rows.
Actions
action_type | When it appears |
|---|---|
link_click | Link clicks |
landing_page_view | LANDING_PAGE_VIEWS goal |
post_engagement, page_engagement | Engagement |
onsite_conversion.messaging_conversation_started_7d, onsite_conversion.total_messaging_connection, onsite_conversion.messaging_first_reply | Click-to-WhatsApp conversations |
lead, onsite_conversion.lead_grouped | Form leads |
offsite_conversion.fb_pixel_custom, purchase, omni_purchase | Purchases matched by the Conversions API, with the value in action_values |
The default attribution windows are 7d_click and 1d_view.
Asynchronous reports
For long date ranges, request a report with POST and the same parameters:
curl -s 'https://meta-ads.mimicr.dev/v27.0/120200539998049712/insights' \
-H 'Authorization: Bearer <token>' \
-F level=ad -F fields=ad_id,spend,impressions -F date_preset=last_7d
# {"report_run_id":"100539998049734"}Poll the status until Job Completed:
curl -s 'https://meta-ads.mimicr.dev/v27.0/100539998049734' -H 'Authorization: Bearer <token>'
{ "id": "100539998049734", "account_id": "100539998049706", "time_ref": 1794028093, "time_completed": 0, "async_status": "Job Not Started", "async_percent_completion": 0, "date_start": "2026-10-31", "date_stop": "2026-11-06" }async_status goes from Job Not Started → Job Started → Job Running → Job Completed. Then read the report rows at GET /{report_run_id}/insights. Before completion, that call answers (#100) Report is not ready yet.
In Mimicr, the report finishes 8 sandbox seconds after it's created (asyncReportSeconds), and the rows are a snapshot taken at completion. The insights.fail_next_report action makes the next one end in Job Failed, with error_code, error_subcode (2490547 Report Failed or 1504045 Report Too Large), error_message, error_user_title and error_user_msg. Reports expire after 30 days.
How Mimicr generates delivery
Meta has no test data for Insights, so Mimicr generates delivery hour by hour, deterministically, for every approved ad whose campaign, ad set and ad are active, whose account is active and that is within start_time and end_time:
- Hourly spend follows the daily budget, with a curve by hour of day (more in the evening, less overnight) and a small fixed random factor. A day can exceed the daily budget by up to 75%, and a week stays at 7 times it. A lifetime budget is spread over the remaining hours.
- Impressions, clicks and results come from spend, with CPM and CTR per goal: for example,
CONVERSATIONSwith a R$25 CPM and 30% of clicks becoming conversations;LINK_CLICKSwith a R$20 CPM. - Real events add on top: a click-to-WhatsApp, a website click, a submitted lead or a purchase matched by the Conversions API count in the hour they happened.
[sem-entrega]in the ad set name zeroes delivery;traffic.deliveradds manual numbers.
Advance the clock to generate hours: npx mimicr clock meta-ads +1d. The current hour is computed on read, in proportion to the minutes elapsed. With insightsLagMinutes you simulate Meta's delay of about 15 minutes.
Insights usage counts toward the ads_insights use case, shown in the x-fb-ads-insights-throttle header; see Rate limits.
Reference: Campaign insights, Account insights, Campaign asynchronous report and Get report.