Export events
GET /api/websites/:id/export
Export raw events for a website in CSV or JSON format.
Path parameters
Website ID (format:
site_XXXXXXXXXX)Query parameters
Start date (YYYY-MM-DD)
End date (YYYY-MM-DD)
Export format:
csv or json. Defaults to csv.Timezone for timestamps. Defaults to UTC.
Filter by event type:
pageview, event, or omit for all eventsInclude bot traffic. Defaults to
false.Maximum date range: 90 days per export
Response
Returns a file download with appropriateContent-Type header:
- CSV:
text/csv; charset=utf-8 - JSON:
application/json
CSV format
JSON format
Example
Export limits
Recommended approach for large exports
For websites with high traffic, export data in smaller chunks:Privacy considerations
Exported data includes visitor IDs, which are privacy-preserving hashes that rotate daily. Visitor IDs cannot be used to identify individual users across days.
GDPR compliance
When exporting data:- Visitor IDs are anonymized hashes, not actual user identifiers
- No personally identifiable information (PII) is stored or exported
- IP addresses are never stored or exported
- Consider your data retention obligations when exporting and storing data
Use cases
Backup & Archive
Export historical data for long-term backup and archival
Custom Analysis
Import into Excel, Tableau, or other analytics tools for custom analysis
Data Warehouse Integration
Load event data into your data warehouse for cross-platform analysis
Machine Learning
Use exported data for training ML models on user behavior
Related features
- Data Retention - Configure how long data is kept
- Events API - Query events via API instead of exporting
- Share API - Share live dashboards instead of raw data