Skip to content

Stats API

Query aggregated PureMetrix stats with an API key. Available on Business and Enterprise.

Plan requirement

Free, Starter, and Growth cannot call the Stats API. Upgrade under Settings → Subscription. The API playground in the app stays locked until you switch to Business.

Authenticate

  1. On Business or Enterprise, create a key under Settings → API keys in app.puremetrix.org.
  2. Send Authorization: Bearer YOUR_KEY to POST https://collect.puremetrix.org/api/v1/query.

Example body

{
  "site_id": "YOUR_SITE_UUID",
  "metrics": ["visitors", "pageviews"],
  "date_range": { "start": "2026-09-01", "end": "2026-09-24" }
}

You can test the same request in Site settings → API playground — you are already signed in there, so no key is needed.

Related