Start free

How to use stats API v2

Version 2 of the Stats API keeps every v1 call exactly as it was and adds topics, products, places, page deep dives and A/B test results.

Integrations, API & AIFeature page: Stats API v2: the deep-dive reports as JSON or CSVFeature page: Stats API
Stats API v2: example screenshotStats API v2: example screenshot
Example screenshot with made-up data, not a real customer’s numbers.

What it does

Call /api/v2 with the same read-only keys, filters, pagination and rate limits as v1. The new endpoints /topics, /products, /places, /page and /ab_tests return the same numbers as the matching deep-dive screens, as JSON or CSV, with an OpenAPI 3.1 description at /api/v2/openapi.json.

Why it matters

The deep dives answer bigger questions than a single breakdown. Having them in the API means a weekly report, a client dashboard or an AI assistant can use them too.

How to use it

  1. Use a read key from Settings → API keys.
  2. Base URL: /api/v2. Every v1 endpoint works there unchanged.
  3. New: /topics, /products, /places, /page?path=/x and /ab_tests (add test=ID for a result).
  4. Add format=csv for a spreadsheet; the full description is at /api/v2/openapi.json.

How it works

How a v2 deep-dive call is answered1. GET /api/v2/topics?site=…&period=90d with a read key. 2. Key checked and counted against the hourly limit. (otherwise: Over the limit: 429 with Retry-After.) 3. Same report as the Topic reports screen, from the 10-minute cache when it is fresh. 4. Totals only, as JSON or CSV.1GET/api/v2/topics?site=…&period=90dwith a read key.2Key checked and countedagainst the hourly limit.Over the limit:429 withRetry-After.3Same report as the Topicreports screen, from the10-minute cache when it isfresh.4Totals only, as JSON or CSV.
From src/apiv2.js and src/api.js. v1 endpoints are unchanged.

Privacy

Limits

Plans

Every plan, including Free. quietstats is free during launch: the Free plan covers 1 site and 5,000 pageviews a month, and no card is needed. See pricing.

Questions

Do I have to move to v2?

No. v1 stays as it is. v2 is v1 plus the new endpoints.

Can I use the new reports in Sheets?

Yes: with a Google Sheets feed key, any of them works in =IMPORTDATA().

Set it up

Show the install snippet
Shell
curl -H "Authorization: Bearer qs_…" "https://quietstats.co.uk/api/v2/products?site=YOUR_SITE_ID&period=30d&format=csv"

Replace YOUR_SITE_ID with the ID shown on your site’s Manage page.

Related

Feature page: Stats API v2: the deep-dive reports as JSON or CSV → What it is, why it matters, privacy and how other tools do it.

Guides on this topic

All website analytics guides →

Related features

Browse all 448 features →

Explore quietstats

See your traffic (119)

Live visitors and live eventsTrend charts, headline cards and any date rangeCompare any two date rangesWorld map, countries and regionsDevices, browsers, operating systems and screens

Sources and campaigns (63)

Sources and channelsAI search referralsUTM campaignsSearch keywords from Google Search ConsoleShort links

Behaviour and content (80)

Top pagesPage transitionsScroll depth and engaged timeClick mapVisitor journeys

Goals, events and conversions (83)

Goals and funnelsCustom events and conversion ratesRevenue cards and revenue by sourceEngagement goalsA/B tests with your own tags and a plain-English confidence note

Reports, sharing and alerts (44)

Alerts inbox and rulesReport snapshotsPassword-protected snapshotsOptional public stats pageAnonymous benchmarks against similar sites

Data in and out (42)

CSV and Excel downloadsStats APIImport from Plausible or GA4API playgroundTSV and XML export for every report

Privacy and performance (17)

Zero cookies, privacy built inUnder 1 KB script and single-page appsPages never countedPrivacy proof page and badge for your siteSigned-in sessions

Why quietstats

Why quietstatsPricingLive demoStart free

Compare

quietstats comparedFeature comparisonvs Google Analyticsvs Plausiblevs Fathom Analyticsvs Simple Analyticsvs Umamivs Matomovs Cloudflare Web Analyticsvs GoatCountervs Piwik PROvs PostHogvs Microsoft Clarityvs Pirsch Analyticsvs MixpanelGoogle Analytics alternatives

Learn

Website analytics guidesMetrics handbookAnalytics glossaryPlaybooksGDPR and cookie-free analyticsInstall on SquarespaceInstall on WixInstall on GhostInstall on Google Tag ManagerBlog

Playbooks and tools

Script size calculatorCookie banner checkerPlaybook: Local businessPlaybook: Online shopPlaybook: Blog or publisherPlaybook: SaaS or appPlaybook: Charity or community groupPlaybook: Agency with clientsUTM link checkerConversion rate calculatorCookie banner traffic-loss calculator