POST /v1/search
Published
The unified search endpoint. The gateway routes the query to the best data sources based on intent, then fuses and re-ranks the results.
API key optional (anonymous traffic is rate-limited per IP and consumes the daily free quota)
Request parameters
Request example
- 1
- 2
- 3
- 4
- 5
- 6
- 7
curl -X POST https://api.anysearch.com/v1/search \
-H "Authorization: Bearer YOUR_ANYSEARCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "Go 1.26 release notes",
"max_results": 10
}'
Request example(parameter)
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
curl -X POST https://api.anysearch.com/v1/search \
-H "Authorization: Bearer YOUR_ANYSEARCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "Go 1.26 release notes",
"tag": "code.doc",
"params": {"library": "golang"},
"max_results": 10
}
Response Format
Response Example
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
{
"code": 0,
"message": "success",
"request_id": "7d6f4e91-2a83-4c5b-9f10-6e8a3d27b541",
"data": {
"results": [
{
"title": "Go 1.26 Release Notes",
"url": "https://go.dev/doc/go1.26",
"snippet": "Introduction to the changes in Go 1.26.",
"content": "Go 1.26 introduces changes to the language, toolchain, runtime, and libraries..."
}
],
"metadata": {
"total_results": 1,
"search_time_ms": 312
}
}
}
Error Responses
Search and Extract use the same error envelope. The table lists only the HTTP status and its meaning; classify errors by HTTP status and retain the request ID.
- 1
- 2
- 3
- 4
- 5
{
"code": -1,
"message": "Query is required.",
"request_id": "2e5a8c74-1d39-4f62-b087-9c6e3a51d428"
}
Anonymous quota 402 example
- 1
- 2
- 3
- 4
- 5
{
"code": -1,
"message": "Your account and API key have been automatically generated. Use the API key below to continue.\nusername=<USERNAME>\npassword=<PASSWORD>\napi_key=<API_KEY>",
"request_id": "5a3f8c27-1e64-4b90-a752-6d9e2f41c083"
}
This response may contain a password and API key. Treat the entire response as sensitive: do not write it to routine logs, analytics, traces, or support tickets. Credentials appear only when all three values are available.