Search
AI search (RAG)
The AI search endpoint returns results pre-formatted for RAG pipelines. Instead of raw engine hits, you get clean text chunks with structured metadata, ready to inject directly into an LLM context window.
AI search endpoint
POST
/v1/ai/searchSearch an index and return RAG-formatted results with clean text, metadata, and source attribution.
- Auth
- admin or search key
- Returns
- 200
{
"index": "articles",
"q": "how to deploy next.js",
"limit": 10,
"filter": "category = 'tutorials'"
}{
"results": [
{
"content": "Deploy Next.js to Vercel...",
"metadata": {
"publishedAt": 1715000000,
"author": "Jane"
},
"source": {
"index": "articles",
"documentId": "doc-42"
},
"relevanceScore": 0.98
}
],
"query": "how to deploy next.js",
"processingTimeMs": 12,
"totalResults": 42
}Response format
Each result is a structured object designed for LLM consumption:
The AI search endpoint counts as a search on your plan. No LLM calls are made; this is pure retrieval with formatting.
Search matches words, not meaning. Agents get the best results with keyword queries.