1. Get your API Key
To start using SearchAnything, you’ll need an API key.
- Log in to the SearchAnything Dashboard.
- Navigate to the Developers tab.
- Click Create New Key.
- Copy your key (starts with
sk_live_ or sk_test_).
Use sk_test_ keys for development. They don’t count against your billing quota and return mock data for testing integration.
2. Upload a File
Once you have your key, you can upload a file using our REST API. SearchAnything accepts PDFs, Images, Audio, and Video.
curl -X POST https://searchanything.onrender.com/api/files/upload \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-F "file=@/path/to/your/document.pdf"
Response:
{
"file": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"original_name": "document.pdf",
"status": "processing",
"file_type": "pdf"
}
}
The file status will start as pending or processing. Depending on the file size, it may take a few seconds to become ready.
3. Search Your Content
Once the file is processed, you can search its contents immediately.
curl -X GET "https://searchanything.onrender.com/api/search?q=quarterly+revenue" \
-H "Authorization: Bearer sk_live_YOUR_API_KEY"
Response:
{
"results": [
{
"content": "...the quarterly revenue exceeded expectations by 15%...",
"score": 0.89,
"file_id": "550e8400-e29b-41d4-a716-446655440000",
"locator": {
"page": 12
},
"files": {
"original_name": "document.pdf",
"file_type": "pdf"
}
}
],
"count": 1
}
Next Steps