Skip to main content
Mintlify

Search documentation

Type to search this documentation.

Search technical knowledge

POST

/

v1

/

search

Search technical knowledge

curl --request POST \
  --url https://leaves.mintlify.com/api/universal-search/v1/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "Next.js 16 caching and revalidation",
  "numResults": 5,
  "text": {
    "maxCharacters": 4000
  },
  "includeDomains": [
    "nextjs.org"
  ]
}
'
title="200"
{
  "requestId": "3d8ed0aa-c21c-4a18-b995-207aa6315ea8",
  "results": [
    {
      "id": "nextjs:/docs/app/getting-started/caching-and-revalidating",
      "url": "https://nextjs.org/docs/app/getting-started/caching-and-revalidating",
      "title": "Caching and revalidating",
      "text": "Caching is a technique for storing the result of data fetching and other computations.",
      "truncated": false,
      "totalCharacters": 92,
      "score": 0.91,
      "source": "mintlify",
      "siteName": "nextjs",
      "breadcrumbs": [
        "App Router",
        "Getting started"
      ],
      "publishedDate": null
    }
  ]
}
title="400"
{
  "error": "Invalid request body"
}
title="401"
{
  "error": "Unauthorized"
}
title="403"
{
  "error": "IP address is not allowed for this API key"
}
title="429"
{
  "error": "Rate limit exceeded. Please try again later"
}
title="500"
{
  "error": "<string>"
}

Authorization

string

header

required

Mintlify Index API key with the mint_us_ prefix.

application/json

query

string

required

Search query.

Minimum string length: 1

numResults

integer

required

Maximum number of results to return.

Required range: 1 <= x <= 20

text

default:false

Controls result content. Set to true to include matched content, false to omit it, or provide maxCharacters to include truncated content. When omitted, defaults to false.

includeDomains

string[]

Domains to include in search results.

Minimum array length: 1

Minimum string length: 1

excludeDomains

string[]

Domains to exclude from search results.

Minimum array length: 1

Minimum string length: 1

Search completed successfully.

requestId

string

required

Unique identifier for the request.

results

object[]

required

Ranked search results.

Show child attributes

⌘I

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu