/v1/searchAPI keySearch the web through the deployment's upstream provider.
Body
| Field | Type | Detail |
|---|---|---|
| query required | string | 1–400 characters. Anything longer is a 422, not a truncation. |
| count | integer | Results wanted. Default 5, clamped to the deployment's ceiling. |
curl https://api.snakereach.com/v1/search \
-H "X-API-Key: $SNAKEREACH_API_KEY" \
-H "content-type: application/json" \
-d '{"query": "underwater farming", "count": 2}'{
"query": "underwater farming",
"results": [
{
"url": "https://example.com/search-hit-0",
"title": "Result 0 for underwater farming",
"snippet": "Snippet 0 about underwater farming."
},
{
"url": "https://example.com/search-hit-1",
"title": "Result 1 for underwater farming",
"snippet": "Snippet 1 about underwater farming."
}
],
"count": 2,
"provider": "brave",
"trace": {
"stages": [{ "name": "search", "elapsed_ms": 1.9 }],
"cache_hit": false,
"rendered": false,
"redirects": [],
"retries": 0,
"warnings": []
}
}Errors
- 422 the query is empty or over 400 characters
- 429 the search rate limit or the monthly search budget is spent
- 502 the search provider failed
- 503 this deployment has no search provider key configured