Search documents
POST /api/search
Perform semantic search across indexed documents.
Request
Parameters
string
required
Search query
number
default:10
Maximum number of results to return
object
Optional filters for document type, date range, etc.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
POST /api/search
POST /api/search
Perform semantic search across indexed documents.
{
"query": "machine learning basics",
"limit": 10,
"filters": {
"type": "pdf"
}
}
{
"results": [
{
"id": "doc1",
"content": "Machine learning is...",
"score": 0.92,
"metadata": {
"filename": "ml-guide.pdf",
"type": "pdf"
}
}
],
"total": 42
}
curl -X POST http://localhost:8000/api/search \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"query": "machine learning",
"limit": 10
}'
const response = await fetch('http://localhost:8000/api/search', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_TOKEN'
},
body: JSON.stringify({
query: 'machine learning',
limit: 10
})
})
const data = await response.json()
console.log(data.results)
import requests
response = requests.post(
'http://localhost:8000/api/search',
headers={'Authorization': 'Bearer YOUR_TOKEN'},
json={
'query': 'machine learning',
'limit': 10
}
)
print(response.json()['results'])