Data Export API

Download raw events and reporting summaries as CSV or ZIP files with a workspace API key.

Last updated September 15, 2026

Visitor funnel exports calculate completion against the next required step. Diagnostic rows retain visitor counts but leave completion and loss fields blank. The step_definition column preserves the complete configured step, including OR alternatives, filters, mode, and diagnostic status.

Use the Data Export API for scheduled backups, spreadsheet imports, and external reporting. The API returns one selected category as CSV or multiple categories as a ZIP containing one CSV per category. Create a key in Settings > API Keys and send it as a bearer token. Internal traffic is excluded unless includeInternal is exactly true. Bots remain excluded.

Raw Events includes UTM source, medium, campaign, term, and content on each session event. Sources groups source, medium, term, and content into separate acquisition sections with visitor, revenue, sales, and conversion metrics.

POST /api/v1/export

1curl https://usegrometrics.com/api/v1/export \2  -H "Authorization: Bearer YOUR_API_KEY" \3  -H "Content-Type: application/json" \4  --output grometrics-export.zip \5  -d '{6    "categories": ["events", "analytics", "revenue"],7    "range": "30d",8    "includeInternal": true,9    "platform": "both"10  }'

Request body

FieldTypeRequiredDescription
categoriesstring array✓One or more export categories: events, analytics, attribution, revenue, transactions, visitors, sources, campaigns, pages, geography, devices, goals, or funnels
rangestringnoRelative range: 7d, 30d, 90d, or all. Omit it when using startAt and endAt
startAtISO date stringnoCustom range start; endAt is required when this is present
endAtISO date stringnoCustom range end; startAt is required when this is present
includeInternalbooleannoSet true to include visitors marked as internal. The default is false. Bots remain excluded
platformstring✓Export scope: website, mobile, or both

Export status

Every CSV metadata row states whether internal traffic was included. The response also returns X-Grometrics-Internal-Traffic with included or excluded. A successful export with no matching rows still contains the canonical CSV headers and returns X-Grometrics-Empty-Export: true.

What happens next

Store the downloaded file securely. Raw event and transaction exports can contain identifiers and customer context from the selected workspace.

Troubleshooting

Request is unauthorized

Check that the Authorization header uses a valid, unrevoked API key from the workspace you want to export.

The response is CSV instead of ZIP

Selecting one applicable category returns CSV. Select two or more applicable categories to receive a ZIP.

Was this page helpful?

Data Export API — Grometrics Docs | Grometrics