search

AI web search optimized for agents.

AI web search optimized for agents. Returns ranked results with the relevant extracted content of each page (not just a link + blurb), plus a relevance score. topic=news for recent reporting. Distinct from search.web (raw SERP) — this returns clean, LLM-ready page content per result. Billing: payment settles before this endpoint runs (paid upstream), so an error after settlement IS charged — the error response then carries the payment receipt (PAYMENT-RESPONSE) and X-2s-Charged: true.

get/api/search/ai

Request

  • Base URL: https://2s.io
  • URL: https://2s.io/api/search/ai
  • Auth: API key in header PAYMENT-SIGNATURE

Query parameters

qstring required

Search query.

maxResultsinteger

Max results.

topic'general' | 'news'

Topic.

trial1

Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.

Response

(unresolved $ref)

Changes

No recorded changes to this operation across all 1 revision of this API.