Skip to content

API for Partners (draft)

Partners with API access can read Demostatics data from their own systems.

TODO: API access is part of the TODO plan. Contact us to request a key; keys are shown once and can be revoked from the account.

Send your key as a bearer token, and always ask for JSON:

GET /v1/reports?country_id=225&start_date=2026-01-01 HTTP/1.1
Host: api.demostatics.com
Authorization: Bearer <your key>
Accept: application/json
  • Single item: { "data": { … } }
  • Lists: { "data": [ … ], "meta": { "current_page", "last_page", "per_page", "total" } }
  • Page through with ?page=; set ?per_page= from 1 to 50.
  • Errors: { "message": "…" } with the HTTP status (401 bad key, 403 not allowed, 404 not found, 422 invalid parameters, 429 rate limited).
EndpointReturnsFilters
GET /v1/reportsReports, newest firstregion, subregion, country, state, city, category, subcategory, start/end date
GET /v1/database-itemsLatest values, newest firstregion … city, category, subcategory
GET /v1/regions … /citiesThe geography hierarchyparent id

TODO: confirm exact paths and parameter names against the final partner API.

TODO: requests per minute and per day for each plan; behaviour when exceeded (HTTP 429 with Retry-After).

Use of the API is governed by the Terms of Service and your agreement. TODO: attribution and redistribution rules.