API

Common endpoints

A shortcut to the Umami API endpoints most integrations use, from listing websites to stats, time series, breakdowns, and realtime data.

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 https://api.umami.is/v1 on Umami Cloud with an API key. For example, GET /websites is http://<your-umami-instance>/api/websites or https://api.umami.is/v1/websites.


Find your website#

Most stats endpoints need a websiteId.

TaskEndpointDetails
List your websites (add includeTeams=true to include team websites)GET /websitesList websites
Get a single websiteGET /websites/{websiteId}Get a website

Overview numbers#

The stat cards and active-visitor count at the top of the dashboard.

TaskEndpointDetails
Pageviews, visitors, visits, bounces, total time (with comparison)GET /websites/{websiteId}/statsGet website summary statistics
Visitors active in the last 5 minutesGET /websites/{websiteId}/activeGet active website visitors

Charts over time#

TaskEndpointDetails
Pageviews and sessions time seriesGET /websites/{websiteId}/pageviewsGet pageviews and sessions over time
Events time seriesGET /websites/{websiteId}/events/seriesGet 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, …).

TaskEndpointDetails
Ranked list of one dimensionGET /websites/{websiteId}/metrics?type=pathGet ranked website metrics
Same list with pageviews, visitors, visits, bounces, and time per rowGET /websites/{websiteId}/metrics/expanded?type=pathGet detailed website metrics

Realtime#

TaskEndpointDetails
Live countries, URLs, referrers, events, and totals (last 30 minutes)GET /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: