Get campaign spend
get_campaign_spendPaid ads per campaign, or per ad with grain=ad, for a site over a date window (default last 30 days, at most 90). Each row has what the platform reports (spend, impressions, clicks, platform conversions) next to what Anry attributed on the site (revenue, conversions, sessions, ROAS), in the site's currency, ordered by spend. Use to connect ad investment with on-site outcome, find which ads or campaigns return revenue, and spot spend with no attributed visit. Narrow with platform or campaign_id when the result is truncated.
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": {
"site_id": "<site_id>"
},
"name": "get_campaign_spend"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grain | No | Row level (default campaign) | |
| limit | No | Max rows to return (default 50) | |
| site_id | Yes | Site id from list_sites (UUID) | |
| end_date | No | ISO date (YYYY-MM-DD). Defaults to today. | |
| platform | No | Only this ad platform | |
| start_date | No | ISO date (YYYY-MM-DD). Defaults to 30 days before end_date. | |
| campaign_id | No | Only this campaign (a campaign_id from a campaign row) |