Websites

Export website analytics

GET/api/websites/{websiteId}/export

Returns a base64-encoded ZIP archive containing CSV exports of events, pages, referrers, browsers, operating systems, devices, and countries.

Headers

NameTypeDescription
AuthorizationrequiredstringAuthentication credentials, e.g. Bearer <token>.

Path parameters

NameTypeDescription
websiteIdrequiredstringID of the website.

Query parameters

NameTypeDescription
startAtnumberStart of the date range as a Unix timestamp in milliseconds.
endAtnumberEnd of the date range as a Unix timestamp in milliseconds.
startDatestringStart of the date range as an ISO 8601 date or date-time.
endDatestringEnd of the date range as an ISO 8601 date or date-time.
timezonestringIANA time zone used to interpret dates and group results, for example America/New_York.
unitstringTime interval used to group results: minute, hour, day, month, or year.
compareenum<string>Comparison period: prev for the previous period or yoy for the same period last year.
Options: prev, yoy
pageintegerPage number, starting at 1.
pageSizeintegerNumber of results per page.
maxResultsintegerMaximum number of results to include.

Responses

200The operation completed successfully.
NameTypeDescription
ziprequiredstring
200 example
400Bad request.
NameTypeDescription
errorrequiredobjectError details returned when the operation fails.
400 example
401Unauthorized.
NameTypeDescription
errorrequiredobjectError 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.
NameTypeDescription
anyany
function toString() { [native code] } example

Code samples

cURL