Anonymous request (per-IP free quota)
- 1
- 2
- 3
- 4
- 5
- 6
curl -X POST https://api.anysearch.com/v1/search \
-H "Content-Type: application/json" \
-d '{
"query": "What is quantum computing?",
"max_results": 5
}'
Unified search infrastructure for AI
https://api.anysearch.comTwo 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.
curl -X POST https://api.anysearch.com/v1/search \
-H "Content-Type: application/json" \
-d '{
"query": "What is quantum computing?",
"max_results": 5
}'
curl -X POST https://api.anysearch.com/v1/search \
-H "Authorization: Bearer YOUR_ANYSEARCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "What is quantum computing?",
"max_results": 5
}'
The AnySearch search API (/v1/*) supports flexible authentication. You can decide whether to send an API key based on where you are in your product lifecycle:
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
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.22 release notes",
"max_results": 5,
"domain": "code",
"tag": "code.doc",
"content_types": ["web", "doc"]
}'
Response example
{
"code": 0,
"message": "success",
"data": {
"results": [
{
"title": "Go 1.22 Release Notes",
"url": "https://go.dev/doc/go1.22",
"snippet": "Go 1.22 is a major release...",
"content": "Detailed content here..."
}
],
"metadata": {
"request_id": "req_abc123",
"total_results": 1,
"search_time_ms": 342
}
}
}
A successful 200 response returns a JSON body with a results array and a metadata object.
Result fields
Metadata fields
Full response example
{
"code": 0,
"message": "success",
"data": {
"results": [
{
"title": "Chernobyl disaster - Wikipedia",
"url": "https://en.wikipedia.org/wiki/Chernobyl_disaster",
"snippet": "The Chernobyl disaster began on 26 April 1986 ...",
"content": "On 26 April 1986, reactor No. 4 ..."
}
],
"metadata": {
"request_id": "req_01HXXXXXXX",
"total_results": 5,
"search_time_ms": 412
}
}
}
Every error response includes a request_id field. 429 responses also carry Retry-After and X-RateLimit-* headers.
Error response example
{
"code": 40202,
"message": "You've hit your quota limit. Top up to keep using the API.",
"data": {
"request_id": "req_xxx",
"quota_limit": 1000,
"quota_used": 1000,
"quota_remaining": 0
}
}
Allowed values for the enum fields most commonly used in API calls.
The AnySearch MCP Server natively supports Streamable HTTP transport (MCP spec 2025-03-26). SSE and stdio clients can connect via proxy. Choose the installation method that matches your client.
Transport Options
For clients that support Streamable HTTP transport natively. Simplest configuration.
{
"mcp": {
"anysearch": {
"type": "remote",
"url": "https://api.anysearch.com/mcp",
"headers": {
"Authorization": "Bearer ${ANYSEARCH_API_KEY}"
}
}
}
}
{
"mcpServers": {
"anysearch": {
"type": "streamable-http",
"url": "https://api.anysearch.com/mcp",
"headers": {
"Authorization": "Bearer ${ANYSEARCH_API_KEY}"
}
}
}
}
For clients that only support stdio transport. Requires a proxy bridge — mcp-remote (https://github.com/geelen/mcp-remote) is recommended.
{
"mcpServers": {
"anysearch": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.anysearch.com/mcp",
"--header",
"Authorization: Bearer ${ANYSEARCH_API_KEY}"
]
}
}
}
{
"servers": {
"anysearch": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.anysearch.com/mcp",
"--header",
"Authorization: Bearer ${ANYSEARCH_API_KEY}"
]
}
}
}
{
"mcpServers": {
"anysearch": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.anysearch.com/mcp",
"--header",
"Authorization: Bearer ${ANYSEARCH_API_KEY}"
]
}
}
}
Alternatively, you can use supergateway (https://github.com/supercorp-ai/supergateway):
{
"mcpServers": {
"anysearch": {
"command": "npx",
"args": [
"-y",
"supergateway",
"--streamableHttp",
"https://api.anysearch.com/mcp",
"--oauth2Bearer",
"${ANYSEARCH_API_KEY}"
]
}
}
}
For clients that only support SSE transport (Cursor, Windsurf). You need to start a local SSE proxy server first.
npx -y supergateway \
--streamableHttp https://api.anysearch.com/mcp \
--outputTransport sse \
--port 8000 \
--oauth2Bearer <your_api_key>
{
"mcpServers": {
"anysearch": {
"type": "sse",
"url": "http://localhost:8000/sse"
}
}
}
{
"mcpServers": {
"anysearch": {
"serverUrl": "http://localhost:8000/sse"
}
}
}
AnySearch SKILL is a unified search skill package for AI agent platforms. Download and place it in your agent's skill directory to get started.
Download the SKILL zip from GitHub (https://github.com/anysearch-ai/anysearch-skill/archive/refs/heads/main.zip), extract it, and move it to the appropriate skill directory for your platform.
# Download
curl -L -o anysearch-skill.zip https://github.com/anysearch-ai/anysearch-skill/archive/refs/heads/main.zip
# Extract
unzip anysearch-skill.zip
# Move to skill directory (OpenCode example — adjust path for your platform)
mv anysearch-skill ~/.opencode/skills/anysearch
An API key is optional but strongly recommended. Without one, all search features still work via anonymous access, but with lower rate limits and quota.
cp .env.example .env
# Edit .env and set: ANYSEARCH_API_KEY=your_api_key_here
# Linux / macOS
export ANYSEARCH_API_KEY=your_api_key_here
# Windows CMD
set ANYSEARCH_API_KEY=your_api_key_here
# Windows PowerShell
$env:ANYSEARCH_API_KEY="your_api_key_here"
After installation, detect available runtimes and run the entry test to confirm everything works.
# Check in priority order (Python > Node.js > Shell)
python --version # Requires >= 3.6, needs requests library
node --version # Requires >= 12, no external dependencies
# Python
python <skill_dir>/scripts/anysearch_cli.py doc
# Node.js
node <skill_dir>/scripts/anysearch_cli.js doc
# PowerShell (Windows)
powershell -ExecutionPolicy Bypass -File <skill_dir>/scripts/anysearch_cli.ps1 doc
# Bash (Linux/macOS)
bash <skill_dir>/scripts/anysearch_cli.sh doc
python <skill_dir>/scripts/anysearch_cli.py search "hello world" --max_results 1