POST
/
search
Search across the web
curl --request POST \
  --url https://906e-2001-5a8-6cc-e000-55c0-f0b-9da7-10b0.ngrok-free.app/search \
  --header 'Content-Type: application/json' \
  --data '{
  "query": "<string>",
  "mode": "auto",
  "depth": "basic",
  "topic": "general",
  "max_results": 10,
  "add_answer": true,
  "include_raw_content": false,
  "include_images": false,
  "recency": "day",
  "filters": {
    "include_domains": [
      "<string>"
    ],
    "exclude_domains": [
      "<string>"
    ],
    "include_text": [
      "<string>"
    ],
    "exclude_text": [
      "<string>"
    ]
  },
  "view": [
    "results"
  ],
  "similar_to": "<string>",
  "stream": true,
  "response_format": "json",
  "user_context": {}
}'
{
  "request_id": "<string>",
  "data": {
    "answer": "<string>",
    "results": [
      {
        "title": "<string>",
        "url": "<string>",
        "content": "<string>",
        "score": 0.5,
        "meta": {}
      }
    ],
    "images": [
      {
        "url": "<string>",
        "alt": "<string>"
      }
    ],
    "embeddings": [
      [
        123
      ]
    ]
  },
  "meta": {
    "api_version": "<string>",
    "processing_ms": 123,
    "tokens_used": 123,
    "cost": {
      "total": 1,
      "breakdown": {}
    }
  }
}
Search for information with various retrieval strategies.

Example Request

curl -X POST https://api.agentserp.com/search \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"query": "openai"}'

Body

application/json

Input contract for POST /search

query
string
required

Natural-language search query

mode
enum<string>
default:auto

Retrieval strategy: let backend choose, force keyword, or force embedding

Available options:
auto,
keyword,
neural
depth
enum<string>
default:basic

Depth/quality tier; advanced costs more & may run longer

Available options:
basic,
advanced
topic
enum<string>
default:general

Domain-specific retrieval agent

Available options:
general,
news
max_results
integer
default:10

Maximum number of results to return

Required range: 1 <= x <= 50
add_answer
default:false

false → no answer. basic → one-sentence LLM answer. detailed → richer

include_raw_content
boolean
default:false

If true, include cleaned HTML text in each result

include_images
boolean
default:false

If true, also run an image search

recency

Limit results to this many days in the past or a preset Human shortcut for common recency windows

Available options:
day,
week,
month,
year
filters
object

Fine-grained filtering for /search

view
enum<string>[]

Which data blocks to include in the response

similar_to
string<uri>

Return docs similar to this URL instead of keyword search

stream
boolean

If true, respond with NDJSON streaming

response_format
enum<string>

Serialization format for large/bulk results

Available options:
json,
ndjson,
csv,
parquet
user_context
object

Opaque object echoed for personalization

Response

Search results

Universal response wrapper

data
object
required

Endpoint-specific payload

request_id
string

Echo of client-supplied ID or server-assigned UUID

meta
object

Metadata block attached to every response