Common endpoints
The API exposes an operation for everything you can do in the app, but most integrations only touch a handful of read endpoints — the ones that power the website Overview screen. This page is a shortcut to those. Each row links to its full reference page for parameters and responses.
All paths below are relative to your API base URL: http://<your-umami-instance>/api
when self-hosting, or the Umami Cloud base URL from your API key.
Find your website#
Most stats endpoints need a websiteId.
| Task | Endpoint | Details |
|---|---|---|
| List every website you can access | GET /api/websites | List websites |
| Get a single website | GET /api/websites/{websiteId} | Get a website |
Overview numbers#
The stat cards and active-visitor count at the top of the dashboard.
| Task | Endpoint | Details |
|---|---|---|
| Pageviews, visitors, visits, bounces, total time (with comparison) | GET /api/websites/{websiteId}/stats | Get website summary statistics |
| Visitors active in the last 5 minutes | GET /api/websites/{websiteId}/active | Get active website visitors |
Charts over time#
| Task | Endpoint | Details |
|---|---|---|
| Pageviews and sessions time series | GET /api/websites/{websiteId}/pageviews | Get pageviews and sessions over time |
| Events time series | GET /api/websites/{websiteId}/events/series | Get custom event counts over time |
Breakdowns#
Ranked lists for a single dimension — top pages, referrers, browsers, countries,
events, and so on. Pass the dimension with type (path, referrer,
browser, os, device, country, event, …).
| Task | Endpoint | Details |
|---|---|---|
| Ranked list of one dimension | GET /api/websites/{websiteId}/metrics?type=path | Get ranked website metrics |
| Same list with pageviews, visitors, visits, bounces, and time per row | GET /api/websites/{websiteId}/metrics/expanded?type=path | Get detailed website metrics |
Realtime#
| Task | Endpoint | Details |
|---|---|---|
| Live countries, URLs, referrers, events, and totals (last 30 minutes) | GET /api/realtime/{websiteId} | Get real-time website activity |
Working example#
Pull website summary statistics for one website over a 24-hour window.
1. Authenticate. On self-hosted Umami, exchange your credentials for a token:
Send that token as Authorization: Bearer <token> on every request below. On
Umami Cloud, skip this step and pass your API key the same
way: Authorization: Bearer <api-key>. See Authentication.
2. Find the website ID.
3. Get the overview stats. startAt and endAt are millisecond epoch
timestamps bounding the range — the example values below span a 24-hour window: