Web Search

GET/gateway/v1/search/web

Searches web pages, articles, and content by keyword.

Filters: domain via `site` (e.g. `coindesk.com`).

Included fields: titles, URLs, content snippets.

Query Parameters

qstringrequired

Search query like `bitcoin price prediction 2026`

Example: bitcoin price prediction 2026
limitinteger

Results per page

Example: 20
offsetinteger

Pagination offset

Example: 0
sitestring

Comma-separated domain filter like `coindesk.com` or `cointelegraph.com`

Example: coindesk.com,cointelegraph.com
include_contentboolean

When false (default), search returns title/url/description only — fast (~2-3s) URL discovery. Set true to also include full markdown content for each result (~5-30KB per result, ~10-15s for limit=5). Use true only when the caller needs page content inline and won't follow up with `/web/fetch`.

Example: false
Web Search
const options = {method: 'GET'};

fetch('https://api.asksurf.ai/gateway/v1/search/web?q=bitcoin price prediction 2026&limit=20&offset=0&site=coindesk.com,cointelegraph.com&include_content=false', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
OK
{
  "$schema": "https://example.com/schemas/DataResponseWebSearchResultItem.json",
  "data": [
    {
      "content": "<string>",
      "description": "<string>",
      "title": "<string>",
      "url": "<string>"
    }
  ],
  "meta": {
    "cached": true,
    "credits_used": 123,
    "empty_reason": "<string>",
    "has_more": true,
    "limit": 123,
    "offset": 123,
    "total": 123,
    "watermark": 123
  }
}