Quick Start
Two steps to plug AI-grade search into your app: grab an API key from the dashboard (or skip it and try the free anonymous tier), then fire your first search request.
API Base URL: https://api.cn.anysearch.com
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
# Note: AI agents handle tag and params routing automatically via MCP or Skill. For direct API usage, select appropriate tag and params for your use case to achieve optimal results.
curl -X POST https://api.cn.anysearch.com/v1/search \
-H "Content-Type: application/json" \
-d '{
"query": "Go 1.26 release notes",
"max_results": 10
}'
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
# Note: AI agents handle tag and params routing automatically via MCP or Skill. For direct API usage, select appropriate tag and params for your use case to achieve optimal results.
curl -X POST https://api.cn.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
}'
Replace YOUR_ANYSEARCH_API_KEY with your actual API key. You can create one for free at the console.
Success response
Response excerpt · 1 result · HTTP 200
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
{
"code": 0,
"message": "success",
"request_id": "<SEARCH_REQUEST_ID>",
"data": {
"results": [
{
"title": "Go 1.26 Release Notes",
"url": "https://go.dev/doc/go1.26",
"snippet": "The latest Go release, version 1.26, arrives in February 2026 ..."
}
],
"metadata": {
"total_results": 3,
"search_time_ms": 4038
}
}
}
How do I know it worked?
The call succeeded when the HTTP status is 200 and code == 0. In this example, message is "success".
No results can still be a success: results: [] and total_results: 0 mean the search completed but returned no results.
How to read a failed call?
On failure, check the HTTP status, code and message. Keep the actual request_id for troubleshooting.
- 1
- 2
- 3
- 4
- 5
- 6
{
"code": -1,
"message": "Invalid API key.",
"request_id": "<ERROR_REQUEST_ID>",
"error_code": "invalid_api_key"
}
For details, see Search · Error codes →