Tutorial · 26 August 2026

The dashboard as JSON: Cookie Free Analytics read API

A brass key on an open envelope, a blank ledger, and a fountain pen on harbour paper.

You already have the numbers. The missing piece was a machine that can read them without logging into the Harbour UI. Cookie Free Analytics now has a read API: the dashboard as JSON, a hashed bearer, Starter and Growth.

It is not a product-analytics platform. It does not dump pageview rows. It does not return visitor hashes, IPs, or user-agents. Live is last page in five minutes. Funnels are Growth, linear, same UTC day. That is the honest list.

What you can read

GET /api/v1 is the catalog. /api/v1/openapi.json is the machine copy. /sites lists properties you own. /sites/:id/overview is visitors, visits, pageviews, bounce rate, views per visit, duration, live count, and the previous period of the same length. /pages and /sources are the rank lists. /live is who is on which path right now — last beacon, no heartbeat. /funnels is Growth only.

CORS is open for GET. 60 reads per minute per token. A missing or Hobby token is 401. Someone else’s site is 403. Funnel on Starter is 403. That is all of the gates.

What this is for

A Monday cron that posts visitors into Slack. A notebook that charts 90 days without scraping HTML. A Zapier catch that fires when live is not zero. An agent that speaks MCP with the same token. It is not identity, not revenue, not replay.

The steps

  1. 1

    Be on Starter or Growth

    Hobby is the dashboard with a badge. The read API is a paid door. Open Plan if the Account card says to upgrade.

  2. 2

    Mint a token on Account

    Account → Read API → name it (a cron, a notebook) → Mint. Copy cfa_live_… immediately. We store a SHA-256 hash and will not show the secret again. At most eight tokens. Revoke on the same card.

  3. 3

    Call /api/v1/sites first

    GET https://www.cookiefreeanalytics.com/api/v1/sites with Authorization: Bearer cfa_live_…. The JSON lists each site id, domain, timezone, and plan. Use that id in the next path.

  4. 4

    Read overview, then the slices you need

    GET /api/v1/sites/:id/overview?range=7d for visitors, visits, pageviews, bounce, duration, live, and the previous period. Then /pages, /sources, /live. Growth can call /funnels. range is today, 7d, 30d, 90d, or YYYY-MM-DD..YYYY-MM-DD. f is the same filter string as the dashboard URL.

Questions

Does the API return visitor hashes or raw pageviews?
No. Aggregates only — the same ranks and totals as the dashboard. Live is last path per hash in five minutes, without the hash. Raw rows stay the JSON export on Account.
Is Hobby included?
No. Starter and Growth. A Hobby token is rejected. Events are not billed on any plan.
Is this MCP?
Yes as well. POST /mcp with the same Bearer. Tools wrap these routes: list_sites, get_overview, get_pages, get_sources, get_live, get_funnels. How-to: /blog/cookieless-analytics-mcp. curl still works.
Can a viewer mint a token?
No. Tokens are owner-only and list sites you own, not seats you were invited to.

Read API docs · MCP how-to · Mint a token · Features

All notes · How a visitor is counted