Skip to main content
GET
/
v1
/
analytics
/
{projectId}
/
assistant
curl -X GET "https://api.mintlify.com/v1/analytics/your_project_id/assistant?dateFrom=2024-01-01&limit=100" \
  -H "Authorization: Bearer mint_your_api_key_here"
{
  "conversations": [
    {
      "id": "conv_abc123",
      "timestamp": "2024-01-15T10:30:00.000Z",
      "query": "How do I install Mintlify?",
      "response": "To install Mintlify, you can run `npm install -g mintlify`. This will install the Mintlify CLI globally on your system. After installation, you can verify it by running `mintlify --version`.",
      "sources": [
        {
          "title": "Installation Guide",
          "url": "https://your-docs.mintlify.app/quickstart/installation"
        },
        {
          "title": "Getting Started",
          "url": "https://your-docs.mintlify.app/getting-started"
        }
      ],
      "queryCategory": "installation"
    },
    {
      "id": "conv_def456",
      "timestamp": "2024-01-16T14:22:00.000Z",
      "query": "What are the API authentication methods?",
      "response": "Mintlify supports two types of API keys: Admin API keys (prefixed with mint_) for server-side operations, and Assistant API keys (prefixed with mint_dsc_) for client-side integrations. You can generate both types from your dashboard.",
      "sources": [
        {
          "title": "API Authentication",
          "url": "https://your-docs.mintlify.app/api/authentication"
        }
      ],
      "queryCategory": "authentication"
    }
  ],
  "nextCursor": "01HN8QZXYZ123",
  "hasMore": true
}
Use this endpoint to export AI assistant conversation history from your documentation. Each conversation includes the user query, assistant response, sources cited, and query category. Paginate through results using the cursor parameter returned in the response. Continue fetching while hasMore is true.

Authentication

Requires an admin API key (prefixed with mint_). Generate one on the API keys page in your dashboard.

Path Parameters

projectId
string
required
Your project ID. Can be copied from the API keys page in your dashboard.

Query Parameters

dateFrom
string
Date in ISO 8601 or YYYY-MM-DD format. Filter results to include conversations from this date onwards.Example: 2024-01-01
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.Example: 2024-01-31
limit
number
default:100
Max results per page. Minimum: 1, Maximum: 1000.
cursor
string
Pagination cursor (ULID format) from the previous response’s nextCursor field.

Response

conversations
array
List of assistant conversations.
nextCursor
string
Cursor to retrieve the next page of results. Null if no more results.
hasMore
boolean
Whether additional results are available beyond this page.

Filtering

Filter conversations by date range using dateFrom and dateTo parameters.

Conversation data

Each conversation includes:
  • query: The user’s question
  • response: The assistant’s answer
  • sources: Pages referenced in the response, with title and URL
  • queryCategory: Classification of the query type (if available)
curl -X GET "https://api.mintlify.com/v1/analytics/your_project_id/assistant?dateFrom=2024-01-01&limit=100" \
  -H "Authorization: Bearer mint_your_api_key_here"
{
  "conversations": [
    {
      "id": "conv_abc123",
      "timestamp": "2024-01-15T10:30:00.000Z",
      "query": "How do I install Mintlify?",
      "response": "To install Mintlify, you can run `npm install -g mintlify`. This will install the Mintlify CLI globally on your system. After installation, you can verify it by running `mintlify --version`.",
      "sources": [
        {
          "title": "Installation Guide",
          "url": "https://your-docs.mintlify.app/quickstart/installation"
        },
        {
          "title": "Getting Started",
          "url": "https://your-docs.mintlify.app/getting-started"
        }
      ],
      "queryCategory": "installation"
    },
    {
      "id": "conv_def456",
      "timestamp": "2024-01-16T14:22:00.000Z",
      "query": "What are the API authentication methods?",
      "response": "Mintlify supports two types of API keys: Admin API keys (prefixed with mint_) for server-side operations, and Assistant API keys (prefixed with mint_dsc_) for client-side integrations. You can generate both types from your dashboard.",
      "sources": [
        {
          "title": "API Authentication",
          "url": "https://your-docs.mintlify.app/api/authentication"
        }
      ],
      "queryCategory": "authentication"
    }
  ],
  "nextCursor": "01HN8QZXYZ123",
  "hasMore": true
}

Build docs developers (and LLMs) love