AnySearch API Documentation

Build powerful AI applications with our search API

Overview

AnySearch provides a unified API for aggregating search results from multiple premium data sources. Our intelligent routing system routes queries to the most relevant sources, reducing token waste by 60%+.

Base URL

https://api.agentsearch.tech/v1

Authentication

All API requests require authentication using an API key. You can generate API keys in your dashboard.

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
     https://api.agentsearch.tech/v1/search?q=hello

Response Format

All responses are returned in JSON format with standardized structure.

Success Response

{
  "code": 0,
  "message": "success",
  "request_id": "req_abc123",
  "data": {
    "results": [
      {
        "title": "Page Title",
        "url": "https://example.com/page",
        "snippet": "Brief summary of the page content...",
        "content": "Full content or extended summary...\n\ndate: Sep 29, 2025"
      }
    ],
    "metadata": {
      "total_results": 10,
      "search_time_ms": 2357
    }
  }
}

📅 Extracting Publication Dates

The content field contains the snippet plus a date suffix in format:

\n\ndate: Sep 29, 2025

Extract with regex: r'\ndate:\s*(.+)'

⚠️ Timeout Handling

The API may occasionally timeout (5s). For production use, implement retry logic:

  • • Max retries: 3
  • • Retry interval: 3 seconds

Error Codes

Error responses follow the format: {"code": non_zero, "message": "error description"}

HTTP Code Error Code Meaning
401401Invalid or missing API key
402402Quota exceeded
429429Rate limit exceeded
500500Internal server error

Rate Limits

Rate limits vary by plan:

  • Free: 100 requests/day
  • Pro: 10,000 requests/month
  • Enterprise: Unlimited

AI Agent Integration

Add AnySearch to your AI agent system prompt for web search capabilities.

Skill URL

http://localhost:12121/api/v1/search/mcp-skill

Add to System Prompt

## AnySearch API Access

Base URL: http://localhost:12121

Authentication: Bearer Token
Token: sk_test_-bJL13jBUUb5clSUpz2tphncm-DklaxyO-L_TPrwS4k

Example curl command:
curl -X POST "http://localhost:12121/api/v1/search" \
  -H "Authorization: Bearer sk_test_-bJL13jBUUb5clSUpz2tphncm-DklaxyO-L_TPrwS4k" \
  -H "Content-Type: application/json" \
  -d '{"query": "your search query here", "limit": 10}'

API Endpoints:
• POST /api/v1/search - Search with AI routing
• GET  /api/v1/search/sources - List available sources
• GET  /api/v1/search/mcp-skill - Get skill manifest

Claude Code Skill

For Claude Code agents, use the skill file:

.claude/skills/anysearch.md