Export API
The Export API is used to request analytics exports programmatically where enabled.
Small exports
Small exports may return a downloadable response immediately. Include the site, period and filters.
Large exports
Large exports should create a background job:
{
"site_id": 123,
"period": "last_month",
"format": "csv",
"filters": {
"utm_campaign": "spring_launch"
}
}
The response contains a job ID. Poll the job status until it is complete, then download the result.
Job states
Common states:
queuedprocessingcompletedfailedexpired
Access control
The API only returns exports for sites the authenticated user can access.
Practical limits
Use filters and date ranges to keep exports manageable. For recurring summaries, scheduled reports are usually better than repeated large CSV exports.