API Documentation

Everything you need to integrate web and image search into your application.

Overview

Base URL

https://search-router.com

Auth

X-API-Key header

Format

JSON request & response

Cost

1 credit per successful request

Search Endpoint

POST /api/search

Headers

X-API-Key Your API key required
Content-Type application/json required

Request Body (JSON)

query string required

search query text

search_type string

web or images (default: web)

num_results integer

number of results (1-100, default: 10)

{
  "success": true,
  "search_type": "web",
  "credits_remaining": 999,
  "response_time_ms": 342,
  "results": [
    {
      "title": "Example Page Title",
      "url": "https://example.com/page",
      "domain": "example.com",
      "snippet": "A brief description of the page content..."
    }
  ]
}

Code Examples

curl -X POST 'https://search-router.com/api/search' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"query": "artificial intelligence", "num_results": 10}'

MCP Connector

This API is available as a remote MCP server. Connect it to Claude, ChatGPT, or any MCP-compatible client and the AI will be able to call web_search and image_search directly during conversations.

Claude Setup

Claude uses API key in the URL — no OAuth redirect needed.

  1. 1 In Claude, go to SettingsConnectors
  2. 2 Click "Add custom connector"
  3. 3
    Paste the server URL (includes your API key): https://search-router.com/mcp/YOUR_API_KEY
  4. 4 Click "Add" — the connector is saved automatically
  5. 5 In any conversation, open "+"Connectors and enable SearchAPI

ChatGPT Setup

ChatGPT uses OAuth — you'll be redirected to enter your API key.

  1. 1 In ChatGPT, go to SettingsApps
  2. 2 Click "Create App"
  3. 3
    Paste the MCP Server URL: https://search-router.com/mcp
  4. 4 Click "Add" — you will be redirected to the authorization page
  5. 5 Enter your API key and click "Authorize"

Available Tools

web_search 1 credit per call

Search the web and return structured results with titles, URLs, domains, and snippets.

query string required

search query text

num_results integer

number of results (1-100, default: 10)

image_search 1 credit per call

Search for images and return structured results with image URLs, thumbnails, dimensions, and source pages.

query string required

image search query text

num_results integer

number of results (1-100, default: 10)