# Get unique visitors (/api/analytics/visitors)

<!-- agent-signals: reading_time_min: 3 · est_tokens: 1752 · updated: 2026-07-30 -->
Related: [Get feedback](/api/analytics/feedback.md), [Get feedback by page](/api/analytics/feedback-by-page.md), [Get assistant conversations](/api/analytics/assistant-conversations.md), [Get assistant caller stats](/api/analytics/assistant-caller-stats.md), [Get search queries](/api/analytics/searches.md), [Get page views](/api/analytics/views.md)

## Usage [#usage]

Use this endpoint to export unique visitor analytics. Results include both site-wide totals and per-page breakdowns, split by human and AI traffic. The `total` field is deduplicated across human and AI traffic.

Paginate through results using offset-based pagination. Increment `offset` by `limit` while `hasMore` is true.

## Filtering [#filtering]

Filter visitor data by date range using `dateFrom` and `dateTo` parameters.

## Rate limits [#rate-limits]

This endpoint allows 100 requests per organization per hour. All analytics endpoints share this limit.

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

Returns 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.

## OpenAPI

```json
{
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "parameters": [
    {
      "schema": {
        "type": "string",
        "description": "Your project ID. Can be copied from the [API keys](https://app.mintlify.com/settings/organization/api-keys) page in your dashboard."
      },
      "required": true,
      "name": "projectId",
      "in": "path"
    },
    {
      "schema": {
        "type": "string",
        "description": "Date in ISO 8601 or YYYY-MM-DD format",
        "example": "2024-01-01"
      },
      "required": false,
      "name": "dateFrom",
      "in": "query"
    },
    {
      "schema": {
        "type": "string",
        "description": "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.",
        "example": "2024-01-01"
      },
      "required": false,
      "name": "dateTo",
      "in": "query"
    },
    {
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 250,
        "default": 50,
        "description": "Max results per page (1-250, default 50). Increment offset by limit while hasMore is true to paginate."
      },
      "required": false,
      "name": "limit",
      "in": "query"
    },
    {
      "schema": {
        "type": "integer",
        "minimum": 0,
        "default": 0,
        "description": "Number of rows to skip. Use offset = (page - 1) * limit for page-based access."
      },
      "required": false,
      "name": "offset",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Site-wide totals and per-path visitor counts",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "totals": {
                "type": "object",
                "properties": {
                  "human": {
                    "type": "number",
                    "description": "Site-wide unique visitors from human traffic."
                  },
                  "ai": {
                    "type": "number",
                    "description": "Site-wide unique visitors from AI bot traffic."
                  },
                  "total": {
                    "type": "number",
                    "description": "Site-wide approximate distinct visitors with any qualifying view (deduplicated across human and AI)."
                  }
                },
                "required": [
                  "human",
                  "ai",
                  "total"
                ]
              },
              "visitors": {
                "type": "array",
                "description": "Per-page visitor counts.",
                "items": {
                  "type": "object",
                  "properties": {
                    "path": {
                      "type": "string",
                      "description": "The documentation page path."
                    },
                    "human": {
                      "type": "number",
                      "description": "Unique visitors from human traffic."
                    },
                    "ai": {
                      "type": "number",
                      "description": "Unique visitors from AI bot traffic."
                    },
                    "total": {
                      "type": "number",
                      "description": "Approximate distinct visitors with any qualifying view on this path (deduplicated across human and AI)."
                    }
                  },
                  "required": [
                    "path",
                    "human",
                    "ai",
                    "total"
                  ]
                }
              },
              "hasMore": {
                "type": "boolean",
                "description": "Whether additional results are available beyond this page."
              }
            },
            "required": [
              "totals",
              "visitors",
              "hasMore"
            ]
          }
        }
      }
    },
    "400": {
      "description": "Invalid query parameters",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Error message describing what went wrong."
              },
              "details": {
                "type": "array",
                "description": "Additional details about the error.",
                "items": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Description of a specific validation or processing error."
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            },
            "required": [
              "error"
            ]
          }
        }
      }
    },
    "500": {
      "description": "Server error",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Error message describing what went wrong."
              },
              "details": {
                "type": "array",
                "description": "Additional details about the error.",
                "items": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Description of a specific validation or processing error."
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            },
            "required": [
              "error"
            ]
          }
        }
      }
    }
  }
}
```
