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

# Get unique visitors

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

## Request

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

Retrieves per-path and site-wide approximate distinct visitors by traffic type. The `total` field is deduplicated across human and AI (union of distinct visitor IDs with any qualifying content view).

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 totals and per-path visitor counts

- VisitorsByPageResponse
  - `totals` VisitorsTrafficTotals, required: Site-wide unique visitor totals for the date range.
    - `human` number, required: Site-wide unique visitors from humans.
    - `ai` number, required: Site-wide unique visitors from AI bots.
    - `total` number, required: Site-wide approximate distinct visitors with any qualifying view (deduplicated across human and AI).
  - `visitors` object[], required: Per-page visitor counts.
    - `path` string, required: The documentation page path.
    - `human` number, required: Unique human visitors.
    - `ai` number, required: Unique AI bot visitors.
    - `total` number, required: Approximate distinct visitors with any qualifying view on this path (deduplicated across human and AI).
  - `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/visitors/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)
