# Mintlify Index REST API (/api/search-index/introduction)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 761 · updated: 2026-09-23 -->
Related: [Build implementation context](/api/search-index/context.md), [Search technical knowledge](/api/search-index/search.md), [Get result contents](/api/search-index/contents.md), [Get page content](/api/assistant/get-page-content.md)

Use the Mintlify Index Representational State Transfer (REST) API to retrieve technical knowledge for applications and agents. The API supports three retrieval patterns:

* [`context`](/api/search-index/context) assembles source-cited content within a token budget.
* [`search`](/api/search-index/search) returns ranked documentation and web results.
* [`contents`](/api/search-index/contents) retrieves content for selected Mintlify result IDs or result URLs.

<Info>
  The REST API requires an API key for your organization. The public [Index Model Context Protocol (MCP) server](/search-index/mcp) does not require an API key.
</Info>

## Base URL [#base-url]

Send REST API requests to:

```text
https://leaves.mintlify.com/api/universal-search/v1
```

Append an endpoint path to this base URL, for example `/context`, `/search`, or `/contents`.

## Authentication [#authentication]

Authenticate each request with an Index API key in the `Authorization` header:

```http
Authorization: Bearer mint_us_...
```

Index API keys begin with `mint_us_`.

<Steps>
  <Step title="Create an Index API key">
    Open the [API keys page](https://app.mintlify.com/settings/organization/api-keys) in your dashboard and create an Index API key.
  </Step>

  <Step title="Store the key securely">
    Save the key in a server-side environment variable. Mintlify only displays the complete key when you first create it. Store it securely.

    ```bash
    export MINTLIFY_INDEX_API_KEY="mint_us_..."
    ```

    <Warning>
      Do not expose an Index API key in client-side code or commit it to version control.
    </Warning>
  </Step>

  <Step title="Build context">
    Send your first request to the `context` endpoint:

    ```bash
    curl -X POST "https://leaves.mintlify.com/api/universal-search/v1/context" \
      -H "Authorization: Bearer $MINTLIFY_INDEX_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "query": "How should I configure caching in Next.js 16?",
        "product": "Next.js",
        "format": "txt",
        "tokenBudget": 3000
      }'
    ```

    A successful response includes assembled context with source URLs, the number of results used, and the output token count.
  </Step>
</Steps>

## Rate limits [#rate-limits]

REST API limits apply per Mintlify organization. All API keys in an organization share the same limit:

| Window     |          Limit |
| ---------- | -------------: |
| Per second |    10 requests |
| Per day    | 1,000 requests |

Requests exceeding either limit return `429 Too Many Requests`. Use exponential backoff before retrying.

## Errors [#errors]

| Status | Meaning                                       |
| ------ | --------------------------------------------- |
| `400`  | The request body is invalid.                  |
| `401`  | The API key is missing or invalid.            |
| `403`  | The request IP is not allowed by the API key. |
| `429`  | The organization exceeded a rate limit.       |
| `500`  | Index could not complete the request.         |
