Search documents
POST /api/search
Perform semantic search across indexed documents.
Request
{
"query": "machine learning basics",
"limit": 10,
"filters": {
"type": "pdf"
}
}
Parameters
Maximum number of results to return
Optional filters for document type, date range, etc.
Response
{
"results": [
{
"id": "doc1",
"content": "Machine learning is...",
"score": 0.92,
"metadata": {
"filename": "ml-guide.pdf",
"type": "pdf"
}
}
],
"total": 42
}
Example
curl -X POST http://localhost:8000/api/search \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"query": "machine learning",
"limit": 10
}'