Get result contents
POST
/
v1
/
contents
Get result contents
curl --request POST \
--url https://leaves.mintlify.com/api/universal-search/v1/contents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"nextjs:/docs/app/getting-started/caching-and-revalidating"
],
"query": "revalidate cached data",
"maxCharacters": 12000
}
'{
"requestId": "6bf694e4-76cb-4d31-a222-c94b2d9b198a",
"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 and revalidating\n\nUse revalidation APIs to refresh cached data.",
"truncated": false,
"totalCharacters": 78,
"score": 0,
"source": "mintlify",
"siteName": "nextjs",
"breadcrumbs": [
"App Router",
"Getting started"
],
"publishedDate": null
}
],
"statuses": [
{
"id": "nextjs:/docs/app/getting-started/caching-and-revalidating",
"status": "success"
}
]
}{
"error": "A request may reference at most 20 items across urls and ids"
}{
"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
Provide at least one Mintlify result ID or result URL. You can combine both fields, with up to 20 items total.
urls
string<uri>[]
required
Result URLs to retrieve. Use this field for web results.
Required array length: 1 - 20 elements
ids
string[]
Mintlify result IDs to retrieve.
Required array length: 1 - 20 elements
Minimum string length: 1
maxCharacters
integer
Maximum number of content characters to return per result.
Required range: x >= 1
query
string
Query used to select the most relevant sections when content exceeds maxCharacters.
Minimum string length: 1
Response
Section titled “Response”Content retrieval completed. Check each status to determine whether its item succeeded.
requestId
string
required
Unique identifier for the request.
results
object[]
required
Successfully retrieved results.
Show child attributes
statuses
object[]
required
Retrieval status for each requested item.
Show child attributes
⌘I