Stats API

Read any report for a website: visitors, pages, sources, locations, technology and events.

v1 1 endpoint

Authentication

Every request needs your API key
Get your API key

Send the key as a Bearer token in the Authorization header. Requests without a valid key return 401 Unauthorized. Plans without API access return 403 Forbidden.

Base URL https://www.dashboard.datablik.com/api/v1

GET Show stats

Returns one report for a website and date range. Use name to choose the report.
Endpoint
GET /api/v1/stats/{website_id}
Request example
curl --location --request GET 'https://www.dashboard.datablik.com/api/v1/stats/{website_id}?name={name}&from={from}&to={to}' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer {api_key}'
Parameters 3 required · 5 optional
Name Type Description Default
nameRequired string The report to return. One of browser campaign city continent country device event language operating_system page pageview referrer screen_resolution visitor —
fromRequired string Start date in Y-m-d format. —
toRequired string End date in Y-m-d format. —
search string Search query. —
search_by string Field to search. value Value. —
sort_by string Sort by. count Count, value Value. Default: count count
sort string Sort direction. desc Descending, asc Ascending. Default: desc desc
per_page integer Results per page. 10 25 50 100 Default: 10 10
Missing something?
Tell us which endpoint or field you need.
Contact us