Get analytics
x_ads_get_analyticsRetrieve advertising analytics for up to 20 campaigns, ad groups, or ads over a 7-day period, with daily, hourly, or total granularity.
Instructions
Sync stats for up to 20 campaigns, ad groups, or ads. Range must be ≤ 7 days. Times whole-hour ISO 8601. granularity TOTAL (default) / DAY / HOUR. metric_groups default ENGAGEMENT,BILLING. Placement ALL_ON_TWITTER. Spend is billed_charge_local_micro / 1_000_000.
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": {
"account_id": "<account_id>",
"entity": "<entity>",
"entity_ids": "<entity_ids>",
"start_time": "<start_time>",
"end_time": "<end_time>"
},
"name": "x_ads_get_analytics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity | Yes | ||
| end_time | Yes | ||
| account_id | Yes | Ads API account id from x_ads_list_accounts, e.g. 18ce55v2od2 | |
| entity_ids | Yes | ||
| start_time | Yes | ||
| granularity | No | ||
| metric_groups | No |