> ## Documentation Index
> Fetch the complete documentation index at: https://www.mintlify.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get page views

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

## Usage

Use this endpoint to export page view analytics. Results include both site-wide totals and per-page breakdowns, split by human and AI traffic.

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

## Filtering

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


## OpenAPI

````yaml /analytics.openapi.json GET /v1/analytics/{projectId}/views
openapi: 3.1.0
info:
  title: Mintlify Analytics Export API
  version: 1.0.0
  description: API for exporting documentation analytics data
servers:
  - url: https://api.mintlify.com
    description: Production
security: []
paths:
  /v1/analytics/{projectId}/views:
    get:
      tags:
        - Analytics
      summary: Get page views
      description: >-
        Returns per-path and site-wide content view event counts, split by human
        and AI traffic.
      parameters:
        - $ref: '#/components/parameters/projectId'
        - 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 and per-path content view event counts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewsByPageResponse'
        '400':
          description: Invalid query parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsErrorResponse'
      security:
        - bearerAuth: []
components:
  parameters:
    projectId:
      schema:
        $ref: '#/components/schemas/projectId'
      required: true
      name: projectId
      in: path
  schemas:
    ViewsByPageResponse:
      type: object
      properties:
        totals:
          $ref: '#/components/schemas/ViewsTrafficTotals'
          description: Site-wide view totals for the date range.
        views:
          type: array
          description: Per-page view counts.
          items:
            type: object
            properties:
              path:
                type: string
                description: The documentation page path.
              human:
                type: number
                description: Content view events on this path from human traffic.
              ai:
                type: number
                description: Content view events on this path from AI bot traffic.
              total:
                type: number
                description: Total content view events on this path.
            required:
              - path
              - human
              - ai
              - total
        hasMore:
          type: boolean
          description: Whether additional results are available beyond this page.
      required:
        - totals
        - views
        - hasMore
    AnalyticsErrorResponse:
      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
    projectId:
      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.
    ViewsTrafficTotals:
      type: object
      properties:
        human:
          type: number
          description: Site-wide content view events from human traffic.
        ai:
          type: number
          description: Site-wide content view events from AI bot traffic.
        total:
          type: number
          description: Site-wide content view events.
      required:
        - human
        - ai
        - total
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        The Authorization header expects a Bearer token. Use an admin API key
        (prefixed with `mint_`). This is a server-side secret key. Generate one
        on the [API keys
        page](https://app.mintlify.com/settings/organization/api-keys) in your
        dashboard.

````

## Related topics

- [Mintlify REST API introduction](/docs/api/introduction.md)
- [Get page content](/docs/api/assistant/get-page-content.md)
- [Get feedback by page](/docs/api/analytics/feedback-by-page.md)
