Execute Meta Ads report
meta_ads_execute_reportExecute a Meta (Facebook) Marketing API query for one account and return JSON Lines (every line is a JSON object): the first line is a JSON Schema of the returned fields (carrying a "metadata":"schema" marker to identify it), then one JSON object per record. The Graph API is JSON-native, so each record is returned verbatim (nested objects and arrays preserved) and the schema is inferred from the data. The query is Graph API syntax, an edge name plus parameters such as fields=, date_preset=, time_range=. The act_ prefix and access token are added automatically; do not include them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Graph API edge plus parameters. Do not include the act_<accountId> prefix or access_token; they are added automatically. Examples: 'campaigns?fields=name,status,daily_budget'; 'ads?fields=name,adset_id,campaign_id'; 'insights?fields=impressions,clicks,spend&date_preset=last_7d'; 'insights?fields=impressions,clicks,spend&time_range={"since":"2025-01-01","until":"2025-01-31"}'. Account-level queries start with 'me/' (e.g. 'me/adaccounts?fields=name,currency'). | |
| accountId | Yes | TrueClicks account id (the numeric Id field from the account listing, not the Meta customer id / ClientCustomerId). Must be a Meta account accessible by the connector. |