Websites
Export website analytics
GET
/api/websites/{websiteId}/exportReturns a base64-encoded ZIP archive containing CSV exports of events, pages, referrers, browsers, operating systems, devices, and countries.
Headers
| Name | Type | Description |
|---|---|---|
| Authorizationrequired | string | Authentication credentials, e.g. Bearer <token>. |
Path parameters
| Name | Type | Description |
|---|---|---|
| websiteIdrequired | string | ID of the website. |
Query parameters
| Name | Type | Description |
|---|---|---|
| startAt | number | Start of the date range as a Unix timestamp in milliseconds. |
| endAt | number | End of the date range as a Unix timestamp in milliseconds. |
| startDate | string | Start of the date range as an ISO 8601 date or date-time. |
| endDate | string | End of the date range as an ISO 8601 date or date-time. |
| timezone | string | IANA time zone used to interpret dates and group results, for example America/New_York. |
| unit | string | Time interval used to group results: minute, hour, day, month, or year. |
| compare | enum<string> | Comparison period: prev for the previous period or yoy for the same period last year. Options: prev, yoy |
| page | integer | Page number, starting at 1. |
| pageSize | integer | Number of results per page. |
| maxResults | integer | Maximum number of results to include. |
Responses
200The operation completed successfully.
| Name | Type | Description |
|---|---|---|
| ziprequired | string |
200 example
400Bad request.
| Name | Type | Description |
|---|---|---|
| errorrequired | object | Error details returned when the operation fails. |
400 example
401Unauthorized.
| Name | Type | Description |
|---|---|---|
| errorrequired | object | Error details returned when the operation fails. |
401 example
function toString() { [native code] }Successful response. The response shape is inferred as free-form because the handler does not expose a reusable response schema.
| Name | Type | Description |
|---|---|---|
| any | any |
function toString() { [native code] } example
Code samples
cURL