---
title: "Get the visits of a site"
method: GET
path: "/sites/{id}/stats"
tags: ["Sites"]
---

# Get the visits of a site

`GET /sites/{id}/stats`

## Request

- Base URL: `https://api.hypamoon.com/api/v1`
- URL: `https://api.hypamoon.com/api/v1/sites/{id}/stats`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://app.hypamoon.com/oauth/authorize`, token URL `https://api.hypamoon.com/oauth/token`, scopes: `sites:read`)

Page views of a site of this project per day, the top pages and where visitors came from (direct, internal, search, social, email, shortener, external). Counted at the edge without cookies; crawlers and scripts are left out. Page views, not unique visitors. Data is kept for 90 days; paths and the bot filter exist since 9 October 2026.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `days` integer

## Response `200`

Page views per day, top pages and origins.

- SiteStats
  - `site_id` string, required
  - `slug` string, required
  - `days` integer, required
  - `from` string, required: The first day (UTC) in the range.
  - `to` string, required: The last day (UTC), today.
  - `totals` object, required
    - `page_views` integer, required: Page views by people: navigations to a page, without images, scripts and bots.
    - `bot_page_views_excluded` integer, required: Page views by crawlers and scripts, left out of the numbers above.
  - `per_day` object[], required
    - `date` string, required
    - `page_views` integer, required
  - `top_pages` object[], required: Up to 10 paths with the most page views. Paths are recorded since 9 October 2026.
    - `path` string, required
    - `page_views` integer, required
  - `origins` object[], required: Where page views came from: direct (no referrer), internal (from the site itself), search, social, email, shortener or external (another site).
    - `origin` 'direct' | 'internal' | 'search' | 'social' | 'email' | 'shortener' | 'external', required
    - `page_views` integer, required
  - `note` string, required

## Other responses

- `401`: Unauthorized: unauthorized, missing_api_key, invalid_api_key, api_key_revoked, project_deleted.
- `403`: Forbidden: project_not_enabled, key_mode_mismatch, missing_scope, verification_required.
- `404`: Not Found: not_found.
- `422`: Unprocessable Content: validation_failed.
- `429`: Too Many Requests: rate_limited.
- `500`: Internal Server Error: internal_error.
- `503`: Service Unavailable: service_unavailable.

---

[API](https://skmtc.dev/hypamoon/apis/hypamoon-api.md) · [All operations](https://skmtc.dev/hypamoon/apis/hypamoon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hypamoon/apis/hypamoon-api/revisions/9f0b90004c06?raw)
