Query ad insights
A live performance query for reports the fixed endpoints don’t cover, answered by the platform as is (rows snake_cased). The connection’s platform picks the contract. Google Ads: any read-only GAQL SELECT in query (search terms, keywords and Quality Score, geo, demographics, assets, shopping, change_event), with counters as strings and cost in micros. Meta: Graph insights fields, breakdowns and filtering on object_id, which must be this connection’s ad account (act_…) or one of its campaigns, ad sets or ads. TikTok: ad_account_id, data_level, dimensions, metrics, from and to. A query the platform rejects returns 400 with its message. Follow next_cursor for more rows.
Authorizations
API key in the format: Bearer {api_token}
Query Parameters
Connected Meta, Google Ads or TikTok ad channel id (sacct_…).
Google Ads (required there): a GAQL SELECT, e.g. SELECT search_term_view.search_term, metrics.cost_micros FROM search_term_view WHERE segments.date DURING LAST_30_DAYS. Selecting segments.date needs a finite date filter.
Meta (required there): the insights node, the connection's ad account (act_…) or one of its campaign, ad set or ad ids.
Meta: row granularity (account, campaign, adset, ad).
Meta: comma-separated Graph insights fields, e.g. campaign_name,spend,impressions,actions.
Meta: comma-separated breakdowns, e.g. age,gender or publisher_platform.
Meta: comma-separated action breakdowns; none clears the default action_type breakdown.
Meta: comma-separated attribution windows, e.g. 7d_click,1d_view.
Meta: when actions are counted: impression, conversion or mixed.
Meta and TikTok: JSON array of [{"field", "operator", "value"}] filters.
Meta: a date preset such as last_7d, last_30d or this_month, instead of from/to.
Meta: days per row (1-90), monthly, or all_days.
Google: customer id when the connection has several Google Ads accounts. TikTok (required there): the advertiser id.
TikTok: report type (default BASIC).
TikTok (required there): e.g. AUCTION_CAMPAIGN, AUCTION_ADGROUP, AUCTION_AD.
TikTok (required there): 1-4 comma-separated dimensions, e.g. campaign_id,stat_time_day.
TikTok (required there): comma-separated metrics, e.g. spend,impressions,clicks.
Start of date range (YYYY-MM-DD). Required on TikTok.
End of date range (YYYY-MM-DD).
Meta: rows per page.
TikTok: rows per page.
Cursor for the next page — the next_cursor of the previous response

