---
title: "Get page views"
method: GET
path: "/v1/analytics/{projectId}/views"
tags: ["Analytics"]
language: "en"
---

# Get page views

`GET /v1/analytics/{projectId}/views`

## Request

- Base URL: `https://api.mintlify.com`
- URL: `https://api.mintlify.com/v1/analytics/{projectId}/views`
- Auth: HTTP bearer

Retrieves per-path and site-wide content view event counts, split by human and AI traffic.

Authenticate with an admin API key.

## Path parameters

- `projectId` string, required: Your project ID. Can be copied from the [API keys](https://app.mintlify.com/settings/organization/api-keys) page in your dashboard.

## Query parameters

- `dateFrom` string: Date in ISO 8601 or YYYY-MM-DD format
- `dateTo` string: Date in ISO 8601 or YYYY-MM-DD format. `dateTo` is an exclusive upper limit. Results include dates before, but not on, the specified date.
- `limit` integer: Max results per page (1-250, default 50). Increment offset by limit while hasMore is true to paginate.
- `offset` integer: Number of rows to skip. Use offset = (page - 1) * limit for page-based access.

## Response `200`

Site-wide and per-path content view event counts

- ViewsByPageResponse
  - `totals` ViewsTrafficTotals, required: Site-wide view totals for the date range.
    - `human` number, required: Site-wide content view events from human viewers.
    - `ai` number, required: Site-wide content view events from AI bots.
    - `total` number, required: Site-wide content view events.
  - `views` object[], required: Per-page view counts.
    - `path` string, required: The documentation page path.
    - `human` number, required: Content view events on this path from humans.
    - `ai` number, required: Content view events on this path from AI bots.
    - `total` number, required: Total content view events on this path.
  - `hasMore` boolean, required: Whether additional results are available beyond this page.

## Other responses

- `400`: A query parameter is invalid, such as a malformed date or a `limit` outside the allowed range, or the project ID is malformed. The response body describes the error.
- `401`: The API key is missing or invalid, or your plan doesn't include API access.
- `403`: Your request came from an IP address that isn't on your API key's allowlist.
- `404`: The project doesn't exist or doesn't belong to your organization.
- `429`: You exceeded the rate limit for the analytics endpoints.
- `500`: An unexpected server error occurred. Retry the request. If the error continues, contact support.

## Changes

- **2026-10-30** `fe6381d657c3`: 4 info
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
  - added the non-success response with the status `404`
  - added the non-success response with the status `429`
- **2026-04-01** `47cc58cc3893`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mintlify/apis/mintlify-analytics-export-api/changes/v1/analytics/:projectId/views/get.md)

---

[API](https://skmtc.dev/mintlify/apis/mintlify-analytics-export-api.md) - [All operations](https://skmtc.dev/mintlify/apis/mintlify-analytics-export-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mintlify/apis/mintlify-analytics-export-api/revisions/6d2c01bf8f5c?raw)
