instagram_insights
Instagram and Facebook (Meta) social media analytics and insights, using the same parameters and result format as data_query. Returns rows when completed; otherwise pass schedule_id to get_async_query_results. Metrics include engagement, engagement rate, reach, accounts reached, accounts engaged, followers, fans, follower growth, impressions, profile and page views, website and link clicks, top posts and best-performing content, content performance, stories, reels, video views, saves, likes, comments, shares, and audience demographics. Data sources (pass one as ds_id):
"IGI" — your connected Instagram business/creator account insights (media, reels, stories, top posts, follower demographics);
"IGPD2" — public data on any Instagram profile or hashtag (competitor benchmarking, business discovery, hashtag search);
"FB" — organic Facebook Page insights (page and post engagement, reach, fans/followers, impressions);
"FA" — Facebook & Instagram paid ad performance (Meta Ads); add the "publisher_platform" dimension to separate Facebook from Instagram placements (values include facebook and instagram; filter or segment on publisher_platform = instagram for Instagram-only ad metrics). Then use accounts_discovery to find the account IDs to pass in ds_accounts, and field_discovery to find the available field/metric IDs (and report types) for your chosen ds_id. To create or update Instagram (or Facebook) ad campaigns, use the manage_campaign tool. For any other platform (Google Ads, GA4, LinkedIn Ads, TikTok, and 170+ other data sources), use the data_query tool.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ds_id": "<ds_id>"
},
"name": "instagram_insights"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ds_id | Yes | Data source ID from data_source_discovery (e.g. 'FA', 'AW', 'GAWA') | |
| fresh | No | Skip stored results and run the query again. Use only to confirm a change right after a write, e.g. a budget or status update; it is slower and uses more quota. Only for campaign management data sources (e.g. Facebook Ads, Google Ads). Not available with API keys or for every client; the result notes say when it was not applied. | |
| fields | No | Field IDs from field_discovery, comma-separated. List dimensions before metrics (e.g. 'date,clicks,cost'); if unsure whether a field is a dimension or metric, check field_discovery. All fields must share a common report_type if the source uses report types. | |
| filters | No | Filter expression: field_name operator value, combined with AND/OR. Operators: ==, !=, >, >=, <, <=, =@ (contains), !@ (not contains), =~ (regex), !~ (not regex), [] (in list). Example: "country == US AND clicks > 100" | |
| compress | No | Always recommended. Returns completed rows as a compact text table whose columns are the requested field IDs. | |
| end_date | No | YYYY-MM-DD. Required when date_range_type=custom. | |
| max_rows | No | Max rows to return (default 1000). Higher values may be capped by your license. | |
| settings | No | Data source settings from data_source_discovery as a JSON object. Include report_type and all setting_ids here. report_type is a preference when the source picks the report from the fields; some sources treat it as a strict choice and refuse one that does not fit. TikTok Smart+: use platform_details.is_smart_plus in campaign_and_resource_get. | |
| timezone | No | IANA timezone (e.g. 'America/New_York'). Default: UTC. | |
| start_date | No | YYYY-MM-DD. Required when date_range_type=custom. | |
| ds_accounts | No | Account IDs from accounts_discovery, or free-text identifier when is_free_text_account_required=true. Required when has_account_list=true; ALL_ACCOUNTS queries every account of the connected logins: use only when the user asks for all accounts, as it can be slow or rate-limited on sources with many accounts. | |
| compare_show | No | perc_change (default), abs_change, or value | |
| compare_type | No | prev_range, prev_year, prev_year_weekday, or custom (with compare_start/end_date) | |
| date_range_type | No | A date range is required for nearly all data sources (is_date_range_required=true in data_source_discovery config). Use a relative range: last_7_days, last_30_days, last_90_days, last_month, this_month, yesterday, etc. (append '_inc' to include the current period), or 'custom' with start_date/end_date. Pass as a root-level parameter, NOT inside settings. | |
| compare_end_date | No | YYYY-MM-DD (when compare_type=custom) | |
| compare_start_date | No | YYYY-MM-DD (when compare_type=custom) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| error | No | ||
| notes | No | ||
| success | Yes | ||
| business_context | No |