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"
]
}
'{
"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
}
]
}{
"error": "Invalid request body"
}{
"error": "Unauthorized"
}{
"error": "IP address is not allowed for this API key"
}{
"error": "Rate limit exceeded. Please try again later"
}{
"error": "<string>"
}Authorizations
Section titled “Authorizations”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
Response
Section titled “Response”Search completed successfully.
requestId
string
required
Unique identifier for the request.
results
object[]
required
Ranked search results.
Show child attributes
⌘I