AnySearch API Reference

Unified search infrastructure for AI

API Base URLhttps://api.anysearch.com

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.

Anonymous request (per-IP free quota)

BASH
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6

curl -X POST https://api.anysearch.com/v1/search \

-H "Content-Type: application/json" \

-d '{

"query": "What is quantum computing?",

"max_results": 5

}'

Authenticated request (with API key)

BASH
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7

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

}'

Replace YOUR_ANYSEARCH_API_KEY with your actual API key. You can create one for free at anysearch.com/console/api-keys.

Authentication

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:

ModeHeader formatQuota & rate limit policy
AnonymousNo Authorization headerRate-limited per client IP and metered against the daily free quota
AuthenticatedAuthorization: Bearer YOUR_ANYSEARCH_API_KEYBilled against the paid quota attached to the key, with higher concurrency limits
Heads up: If you send an Authorization header but the key is invalid, disabled, or expired, the gateway returns 401 Unauthorized or 403 Forbidden — it will not silently fall back to anonymous mode.

API Endpoints

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

FieldDescription
query (string) *Search query
max_results (int)Number of results to return. Defaults to 10. Range: 1–100
domain (string)Domain filter, a single value. See Enum Reference for allowed values, e.g. "code"
tag (string)Sub-domain capability tag, a single value. In the form {domain}.{sub_domain}, e.g. "code.doc"
content_types (string[])Content-type filter, e.g. ["web", "news"]
zone (string)Region: cn or intl
language (string)Preferred language, e.g. zh-CN or en
params (object)Extended parameters passed through to AnyMix. e.g. {"ticker": "AAPL"}

Request example

BASH
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10

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

JSON (200 OK)
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19

{

"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

}

}

}

Response Format

A successful 200 response returns a JSON body with a results array and a metadata object.

Result fields

FieldDescription
title (string)Result title
url (string)Original source URL
snippet (string)Short summary
content (string)Cleaned-up body content

Metadata fields

FieldDescription
total_results (int)Total number of results returned
search_time_ms (int)End-to-end search latency in milliseconds
request_id (string)Tracing ID for the request

Full response example

JSON (200 OK)
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19

{

"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

}

}

}

Error Codes

Every error response includes a request_id field. 429 responses also carry Retry-After and X-RateLimit-* headers.

StatussymbolDescription
400invalid_requestInvalid request body, empty query, or illegal values for domain / content_types / zone / freshness
400invalid_extract_urlextract tool: url is missing, scheme is not http/https, URL parsing failed, or host is missing
401invalid_api_keyAPI key does not exist, is disabled, or is not bound to an account
401invalid_auth_headerAuthorization header format is invalid (not Bearer xxx)
402daily_free_quota_exhaustedAnonymous IP daily free quota exhausted; the response includes auto-registered account credentials (username / password / api_key) that can be used immediately
402quota_exhaustedPaid quota for the API key or account exhausted for the current billing period; data contains quota_limit / quota_used / quota_remaining
402user_daily_quota_exhaustedRegistered user's daily free quota exhausted and no paid plan purchased; resets next day or purchase a plan
403expired_api_keyAPI key has expired
403private_capability_not_enabledThe requested private capability is not enabled for this API key; contact support to activate
403account_disabledAccount associated with the API key is disabled
415extract_unsupported_contentextract target response Content-Type is not text/html
429rate_limit_exceeded_userAccount-level aggregate rate limit hit (all keys under the same account are counted together)
429rate_limit_exceededPer-key or per-IP rate limit hit; data contains retry_after / limit / remaining / reset_at
500internal_errorInternal server error, safe to retry
502extract_fetch_failedextract fetch failed: DNS / TCP / TLS / body read / HTML parsing error (non-timeout)
502extract_upstream_errorextract target returned a non-2xx HTTP response
503quota_check_failedQuota check dependency unavailable, retry after a brief back-off
503guard_evaluate_failedGuard evaluation dependency (KeyStore / rate limiter, etc.) returned an error, retry after a brief back-off
503capability_temporarily_unavailableThe requested capability (including underlying plugin backends) is temporarily unavailable, retry with back-off
503service_unavailableService temporarily unavailable, retry with back-off
504extract_timeoutextract fetch timed out (default 30s limit)

Error response example

JSON (402)
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10

{

"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

}

}

Enum Reference

Allowed values for the enum fields most commonly used in API calls.

Domains (22 values)

generalcodetechfashiontravelhomeecommercegamingfilmmusicfinanceacademiclegalbusinessipsecurityeducationhealthreligiongeoenvironmentenergy

Zone (2 values)

cnintl

MCP Server Installation

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

TransportNative SupportBest For
Streamable HTTPYesOpenCode, Claude Desktop (2025.6+), web-based clients
SSEVia proxyCursor, Windsurf
stdioVia proxyClaude Desktop (legacy), VS Code Copilot, Cline

Streamable HTTP (Recommended — No Proxy Needed)

For clients that support Streamable HTTP transport natively. Simplest configuration.

OpenCode (~/.opencode/config.json or project opencode.json)
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11

{

"mcp": {

"anysearch": {

"type": "remote",

"url": "https://api.anysearch.com/mcp",

"headers": {

"Authorization": "Bearer ${ANYSEARCH_API_KEY}"

}

}

}

}

Claude Desktop 2025.6+ (claude_desktop_config.json)
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11

{

"mcpServers": {

"anysearch": {

"type": "streamable-http",

"url": "https://api.anysearch.com/mcp",

"headers": {

"Authorization": "Bearer ${ANYSEARCH_API_KEY}"

}

}

}

}

Tip: If you don't have an API key, omit the headers section. The server will automatically use anonymous access.

Stdio Proxy

For clients that only support stdio transport. Requires a proxy bridge — mcp-remote (https://github.com/geelen/mcp-remote) is recommended.

Claude Desktop — mcp-remote (claude_desktop_config.json)
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14

{

"mcpServers": {

"anysearch": {

"command": "npx",

"args": [

"-y",

"mcp-remote",

"https://api.anysearch.com/mcp",

"--header",

"Authorization: Bearer ${ANYSEARCH_API_KEY}"

]

}

}

}

VS Code Copilot (.vscode/mcp.json)
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15

{

"servers": {

"anysearch": {

"type": "stdio",

"command": "npx",

"args": [

"-y",

"mcp-remote",

"https://api.anysearch.com/mcp",

"--header",

"Authorization: Bearer ${ANYSEARCH_API_KEY}"

]

}

}

}

Cline (VS Code Settings)
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14

{

"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):

Claude Desktop — supergateway (claude_desktop_config.json)
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15

{

"mcpServers": {

"anysearch": {

"command": "npx",

"args": [

"-y",

"supergateway",

"--streamableHttp",

"https://api.anysearch.com/mcp",

"--oauth2Bearer",

"${ANYSEARCH_API_KEY}"

]

}

}

}

Tip: Without an API key, omit "--header" and "Authorization: Bearer ..." args (mcp-remote), or omit "--oauth2Bearer" and key args (supergateway).

SSE Proxy

For clients that only support SSE transport (Cursor, Windsurf). You need to start a local SSE proxy server first.

Start SSE Proxy
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5

npx -y supergateway \

--streamableHttp https://api.anysearch.com/mcp \

--outputTransport sse \

--port 8000 \

--oauth2Bearer <your_api_key>

Cursor (.cursor/mcp.json)
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8

{

"mcpServers": {

"anysearch": {

"type": "sse",

"url": "http://localhost:8000/sse"

}

}

}

Windsurf (~/.codeium/windsurf/mcp_config.json)
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7

{

"mcpServers": {

"anysearch": {

"serverUrl": "http://localhost:8000/sse"

}

}

}

Note: The SSE proxy must remain running while the agent is active. Consider running it as a background service. Omit --oauth2Bearer if you don't have an API key.

Client Quick Reference

ClientTransportConfig FileProxy RequiredProxy Tool
OpenCodeStreamable HTTPopencode.jsonNo
Claude Desktop (2025.6+)Streamable HTTPclaude_desktop_config.jsonNo
Claude Desktop (legacy)stdioclaude_desktop_config.jsonYesmcp-remote
CursorSSE.cursor/mcp.jsonYessupergateway
VS Code Copilotstdio.vscode/mcp.jsonYesmcp-remote
WindsurfSSEmcp_config.jsonYessupergateway
ClinestdioVS Code SettingsYesmcp-remote

SKILL Installation

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 & Install

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.

Agent PlatformSKILL Directory
Claude Code~/.claude/skills/anysearch
OpenCode~/.opencode/skills/anysearch
Cursor / Windsurf<project>/.skills/anysearch
OpenClaw~/.openclaw/skills/anysearch
Other platforms<agent_skill_dir>/anysearch
Tip: OpenClaw users can install directly via command: openclaw skills install anysearch — no manual download needed.
Download & Extract
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8

# 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

API Key Setup

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.

Option 1: .env file
  1. 1
  2. 2

cp .env.example .env

# Edit .env and set: ANYSEARCH_API_KEY=your_api_key_here

Option 2: Environment variable
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8

# 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"

Tip: Create a free API key at anysearch.com/console/api-keys. Priority order: CLI flag > .env file > environment variable > anonymous access.

Verify Installation

After installation, detect available runtimes and run the entry test to confirm everything works.

Step 1: Detect runtime
  1. 1
  2. 2
  3. 3

# Check in priority order (Python > Node.js > Shell)

python --version # Requires >= 3.6, needs requests library

node --version # Requires >= 12, no external dependencies

Step 2: Run entry test
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11

# 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

Step 3 (Optional): Test a search
  1. 1

python <skill_dir>/scripts/anysearch_cli.py search "hello world" --max_results 1

Tip: A successful JSON response from the entry test confirms the installation is working. Replace <skill_dir> with the actual path to your skill directory.