Skip to content
ProductAPI & DataEvery feature on every plan.

Read every report through a REST API

Programmatic access to every report via REST API with JWT and API key authentication, on every plan. Export data as CSV files in a ZIP archive, and import historical data from Plausible, Google Analytics 4, Matomo or your own CSV files.

Illustrative key for studio.example

A closer look at the platform.Sample data
RESTJSON over HTTPS
600/hKey requests per site
CSVExport format
200 MBImport upload
Capabilities

Your reports, wherever you need them.

Full REST API

Every report on a site's dashboard is also available through the REST API, including aggregate metrics, timeseries, breakdowns, realtime data, conversions, funnel stats and custom property breakdowns. Authenticate with JWT tokens or site-scoped API keys.

API key authentication

Create API keys, each scoped to a single site, for programmatic access. Keys are stored as SHA-256 hashes, so even a database breach does not expose raw keys. A key never grants more than its creator's role allows. Revoke keys instantly from account settings.

Data export, CSV and ZIP

Export analytics data as CSV files bundled in a ZIP archive. Select date ranges and datasets, then download asynchronously. Background processing with progress tracking, up to 100 MB per dataset and 250 MB per export.

Data import, Plausible, GA4, Matomo and CSV

Import historical data from Plausible's export, Google Analytics 4 or Matomo reports, or any CSV with a date and a visitors column. Upload up to 200 MB in the dashboard, and OpenMetrica processes the import in the background with format auto-detection and progress tracking.

Rate limiting

API keys are rate-limited at 600 requests per hour per site, shared by all of its keys. Dashboard API requests are limited at 120 per minute per user, and public dashboard endpoints at 60 per minute per IP. All limits are counted in Redis with atomic Lua scripts, so they hold across every API instance while Redis is reachable.

Validated requests

Request bodies and stats queries are validated with Zod schemas before processing, and a request that fails validation gets a 400 validation_error that lists the fields.

A closer look

Take your data with you.

API endpoints

Access every report programmatically

The core stats endpoints are GET /api/v1/stats/aggregate, /stats/timeseries, /stats/breakdown, /stats/realtime, /stats/conversions and /stats/funnel. Most take the query parameters the dashboard uses, site_id, period, date, filters, include_bots and include_noscript. The realtime endpoint takes only site_id and include_noscript, and the funnel endpoint needs a funnel_id, takes no filters and covers at most 90 days.

Data export

Your traffic reports are yours

Export any date range as CSV. The export runs as a background job, so you start it with a POST, poll its status, and download the ZIP when it is ready, within two hours. Each dataset is capped at 100 MB and a whole export at 250 MB. Multiple datasets can be exported in a single job, and a site runs up to two exports at once.

Migration

Switch from Plausible or Google Analytics

Upload your Plausible export or a GA4 report (CSV or ZIP, up to 200 MB) and OpenMetrica auto-detects the format, maps columns, and backfills your history from the last five years, stopping at the day your own tracking began. A Plausible export fills the breakdowns as well, while a GA4 report fills the daily totals and the chart. Imported history shows in reports without filters, and a new import replaces the previous one.

The details

Frequently asked questions

Answers before you get started.

What authentication does the API support?

Two methods. JWT tokens, which the dashboard uses after you sign in, and API keys, which you create in account settings for one site. Both are sent as a Bearer token in the Authorization header.

What can I export?

You can export any date range of your traffic reports as CSV files, by day, for visitors, pages, entry and exit pages, sources, channels, UTM campaigns, countries, devices, browsers and operating systems, and your imported history as well. Aggregated statistics are kept for 25 months on every plan and imported history for five years, so an export covers your whole history up to those horizons. Custom events and goal conversions are not part of the export. Exports are processed asynchronously and downloaded as ZIP archives.

Can I import data from Google Analytics?

Yes. Export a Google Analytics 4 report by date as CSV, with the Sessions and Engaged sessions columns, then upload it in the dashboard. The import system auto-detects the format, maps users, views, sessions, engaged sessions and average session duration to OpenMetrica fields, and backfills the daily totals into your analytics. Plausible's export and Matomo reports are also supported.

Is there an API rate limit?

API keys are limited to 600 requests per hour for each site, shared by all of its keys and reset at the start of every hour. Dashboard requests are limited to 120 per minute per user. These limits are counted in Redis, so they hold across all API instances while Redis is reachable.

Get started

Build on top of OpenMetrica

Full REST API access on every plan, Free included. Export and import your data anytime.