Query Campaign Spends
AI-generatedSummary
Query campaign spend data over a specified date range with optional filtering and grouping to obtain summarized ad spend metrics.
Inputs
- Start Date (YYYY-MM-DD) — Sets the inclusive start date to filter campaign spend data, defaulting to the first day of the previous month.
- End Date (YYYY-MM-DD) — Sets the inclusive end date to filter campaign spend data, defaulting to yesterday.
- Groups — Comma-separated list of grouping dimensions to aggregate the spend data by (e.g., campaign, partner, country).
- Metrics — Comma-separated list of spend metrics to retrieve for the groups, such as gross, net, revenue, impressions, clicks, installs, cvr, margin.
- Client IDs (Optional) — Comma-separated client ID values to filter the spend data; if empty, includes all clients.
- Partner IDs (Optional) — Comma-separated partner ID values to filter the spend data; if empty, includes all partners.
- Campaign IDs (Optional) — Comma-separated campaign ID values to filter the spend data; if empty, includes all campaigns.
- Click URL IDs (Optional) — Comma-separated click URL ID values to filter the spend data; if empty, includes all click URLs.
Output shape
a list of JSON objects representing grouped campaign spend summaries matching the input filters and groupings
Each output item JSON object contains aggregated spend metrics keyed by the specified group fields and metrics. The response structure directly matches the API's JSON response. Errors will throw and stop execution.