Returns all the matching rows of the campaign report as one CSV file, in the property time zone, with no summary. The CSV columns are name, refType, refId, then the requested metrics. The request body is the same as for the campaign report, without limit and cursor. The file can be at most 1 MB (1,048,576 bytes). For a larger file, the API returns 500 with the code response_too_large: make the date range shorter or add filters.
Metrics
Section titled “Metrics”Ask for metrics by name in metrics. Each metric becomes a CSV column after name, refType, and refId; dynamic names such as events.Purchase are column names. Unavailable values are empty CSV cells. Money metrics aggregate stored reporting values; the configured reporting currency belongs to the property. Date ranges cover at most 31 days.
| Metric | Value | Source |
|---|---|---|
spend | Amount spent on the ads. | Ad platform |
impressions | Number of times the ads were shown. | Ad platform |
reach | Sum of ad-platform reach across the requested dates; a person may be counted on multiple days. | Ad platform |
linkClicks | Number of clicks on the ad links. | Ad platform |
results | Results that the ad platform attributes to the ads, for the campaign objective. | Ad platform |
resultValues | Value of the results that the ad platform attributes to the ads. | Ad platform |
sessions | Number of sessions that AnyTrack tracked. | AnyTrack |
clients | Approximate number of distinct property-scoped client IDs (browsers). | AnyTrack |
eventValues | Sum of the values of the conversion events. | AnyTrack |
events.<EventName> | Number of events with this name, for example events.Purchase. | AnyTrack |
frequency | impressions ÷ reach. | Calculated |
cpm | 1,000 × spend ÷ impressions. | Calculated |
cpc | spend ÷ linkClicks. | Calculated |
ctr | linkClicks ÷ impressions, as a ratio: 0.02 is 2%. | Calculated |
roas | eventValues ÷ spend. | Calculated |
cpe.<EventName> | spend ÷ the number of events with this name. | Calculated |
A calculated metric is null when its divisor is zero, negative, or unavailable, or another required input is unavailable. Unavailable ad platform metrics are also null. AnyTrack gets spend, impressions, reach, link clicks, and results from Meta Ads, Google Ads, TikTok Ads, ChatGPT Ads, and Microsoft Ads. Taboola and Outbrain campaigns have no ad platform metrics.
Before you call
Section titled “Before you call”This endpoint needs IDs that other endpoints return:
- Call List the account properties. Copy the
idof the property: it is thepropertyId. - Call this endpoint with these IDs.
Authentication
Section titled “Authentication”bearerAuth: API key created in the dashboard (atk_…). Send it in the Authorization: Bearer YOUR_API_KEY header.
Path parameters
Section titled “Path parameters”propertyIdstringrequiredlistProperties (id).Request body
Section titled “Request body”fromstring · daterequired2026-01-31tostring · daterequiredto must be on or after from.2026-01-31attributionstringlast-ad-click gives the credit to the last ad click before the conversion. first-ad-click gives the credit to the first ad click.last-ad-click first-ad-clickDefault last-ad-clickgroupBystringcampaign, adset (ad set), or ad.campaign adset adDefault campaignmetricsarray of stringevents.<EventName>, or cpe.<EventName>. AnyTrack removes duplicate names.1Max items 20Item max length 80conversionEventsarray of stringeventValues and roas. Defaults to the property conversion events, or Purchase if none are configured. Other named event metrics are independent of this selection.1Max items 20Item min length 1Item max length 64filtersobjectShow 6 child attributes
channelarray of stringchannel values of the report rows. With this filter, rows that have spend but no tracked event are not included.1Max items 50Item min length 1Item max length 256platformarray of string1Max items 50Item min length 1Item max length 256adNetworkarray of stringadNetwork values of the report rows.1Max items 50Item min length 1Item max length 256campaignIdsarray of stringid of rows grouped by campaign.1Max items 50Item min length 1Item max length 256adsetIdsarray of stringid of rows grouped by adset.1Max items 50Item min length 1Item max length 256adIdsarray of stringid of rows grouped by ad.1Max items 50Item min length 1Item max length 256sortobjectShow 2 child attributes
metricstringrequiredevents.<EventName> or cpe.<EventName>.spend impressions reach frequency linkClicks sessions clients eventValues results resultValues cpm cpc ctr roasdirectionstringdesc: highest value first. asc: lowest value first.asc descDefault descResponses
Section titled “Responses”Every response field is present unless it shows optional. A type that ends in | null can be null.
200 Successful response
Section titled “200 Successful response”Errors
Section titled “Errors”Every error returns the error object.
| Status | Description and action |
|---|---|
400 | invalid_request, invalid_cursor: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. error.details, when present, names invalid fields. Do not reuse a cursor with a different query. |
401 | unauthenticated: Missing, invalid or deleted API key. Send a valid key in Authorization: Bearer. MCP uses an OAuth access token, which may also expire or be revoked. |
403 | api_access_unavailable: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the anytrack:read scope (insufficient_scope). |
404 | not_found: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints. |
413 | payload_too_large: The request body is larger than 16 KB. Send a smaller request body. |
429 | rate_limited: The account sent more than 60 requests in one minute. Wait for the number of seconds in the Retry-After header, then retry. |
500 | response_too_large, internal_error: The response is larger than 1 MB, or the API has an internal error. For response_too_large, ask for fewer rows or metrics. For internal_error, contact AnyTrack support with the requestId. |
503 | service_unavailable: The service is not available for a short time. Retry later, and wait longer after each failed retry. |
504 | upstream_timeout: A downstream request timed out (the report client timeout is 65 seconds). Narrow the date range, then retry with backoff. |
Request example
Section titled “Request example”Command template. Replace the path placeholders. Put the request body in request-body.json, as in the schema above. Add the query parameters that you need. This is not a recorded request or response.
curl --request POST 'https://api.anytrack.io/v1/properties/{propertyId}/reports/campaigns/export' \ --header 'Authorization: Bearer YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data @request-body.json