websearch.fast
ConsoleGet a key

Fetch

Clean Markdown or text of up to 20 pages.

Reads one public page, or up to 20, and returns the cleaned content with its metadata. HTML, plain text, JSON, XML feeds and PDF files are read. Send url for one page or urls for several; with urls the response has pages in request order instead of page. Larger sets go through batch.

The fetcher loads public internet addresses on the standard web ports only, follows robots.txt for automated agents, and sends no credentials or cookies.

What is charged

Each page that comes back with status: ok and non-empty content is charged once. A single url that cannot be read returns its error status and is free. With urls, the call is 200 as long as the body was valid, failed pages are reported per page and are free, and when every page failed the warning all_failed is set and nothing is charged.

Units: fetch_page, fetch_pdf_pages. usage.items in the response lists them.

Request

POST https://api.websearch.fast/v1/web/fetch

Body

NameTypeDescription
urlstringPublic http(s) URL, at most 2048 bytes. At most 2048 characters.
urlsarray of string1 to 20 items.
formatstringhtml returns 501 api_not_implemented until it ships. One of markdown, text, html. Default markdown.
max_charsinteger1000 to 500,000. Default 50000.
modestringfull returns 501 api_not_implemented until it ships. One of main, full. Default main.
include_imagesboolean Default false.
include_metadataboolean Default true.
pdfobject
Show fields
NameTypeDescription
max_pagesinteger1 to 500. Default 100.
querystringReturn relevant_passages that match this text. At most 512 characters.
renderbooleanPlanned; true returns 501 until it ships. Default false.
max_ageintegerAccept a stored copy up to this age in seconds. 0 to 2,592,000.
no_cachebooleanNever answer from a stored copy. Default false.
timeout_msinteger2000 to 35,000.

Example request

curl https://api.websearch.fast/v1/web/fetch \
  -H "Authorization: Bearer $WEBSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://docs.example.org/guide/install",
    "max_chars": 4000,
    "include_links": true
  }'
import os
import httpx

response = httpx.post(
    "https://api.websearch.fast/v1/web/fetch",
    headers={"Authorization": f"Bearer {os.environ['WEBSEARCH_API_KEY']}"},
    json={
        "url": "https://docs.example.org/guide/install",
        "max_chars": 4000,
        "include_links": True,
    },
    timeout=60,
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://api.websearch.fast/v1/web/fetch", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.WEBSEARCH_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://docs.example.org/guide/install",
    max_chars: 4000,
    include_links: true,
  }),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());

Example response

{
  "object": "web.fetch",
  "request_id": "20261128120001123456789a1b2c3d4Kx7Qm2Pb",
  "created": 1795867201,
  "input": {
    "url": "https://docs.example.org/guide/install",
    "format": "markdown",
    "mode": "main",
    "max_chars": 4000,
    "include_links": true,
    "include_images": false,
    "include_metadata": true,
    "timeout_ms": 35000
  },
  "page": {
    "requested_url": "https://docs.example.org/guide/install",
    "url": "https://docs.example.org/guide/install",
    "status": "ok",
    "http_status": 200,
    "content_type": "text/html",
    "title": "Install the CLI",
    "format": "markdown",
    "content": "# Install the CLI\n\nDownload the archive for your platform...",
    "chars": 2841,
    "truncated": false,
    "extraction": "article",
    "language": "en",
    "published_at": "2026-10-02T09:30:00Z",
    "metadata": {
      "description": "How to install the CLI on Linux, macOS and Windows.",
      "site_name": "Example Docs",
      "canonical_url": "https://docs.example.org/guide/install",
      "json_ld": []
    },
    "links": [
      {
        "url": "https://docs.example.org/guide/configure/",
        "text": "Configure"
      }
    ],
    "fetched_at": 1795867201
  },
  "usage": {"charged": true, "items": [{"unit": "fetch_page", "count": 1}]},
  "cache": {"hit": false, "data_age_seconds": 0, "fetched_at": 1795867201}
}

Response fields

page (with url) or pages (with urls). With urls, failed pages are reported per page.

NameTypeDescription
objectrequiredstringAlways web.fetch.
request_idrequiredstringSame as the X-Request-Id header.
createdrequiredintegerUnix seconds (UTC).
inputrequiredobjectThe parameters as applied, defaults filled in.
usagerequiredobject
Show fields
NameTypeDescription
chargedrequiredboolean
itemsrequiredarray of object
Show fields
NameTypeDescription
unitrequiredstringBillable unit, for example search_web, content_page, fetch_page, geocode, autocomplete, knowledge.
countrequiredinteger
cacheobject
Show fields
NameTypeDescription
hitrequiredbooleanThe response, or every page in it, came from a stored copy.
data_age_secondsrequiredintegerAge of the oldest part of the response.
fetched_atrequiredintegerUnix seconds when the oldest part was read.
warningsarray of object
Show fields
NameTypeDescription
coderequiredstringFor example no_results, content_partial, answer_unavailable, partial, all_failed, reach_reduced.
messagestring
paramstring
pageobject
Show fields
NameTypeDescription
requested_urlrequiredstring
urlstringFinal URL after redirects. For now the requested URL, because the reader does not report the final one yet.
statusrequiredstringOne of ok, failed.
errorobject
Show fields
NameTypeDescription
coderequiredstring
messagerequiredstring
http_statusinteger
content_typestring
titlestring
contentstring
formatstringOne of markdown, text, html.
charsinteger
truncatedboolean
extractionstringNeutral label of how the text was taken. New values can appear. One of article, full_page, document, feed, plain, structured.
languagestring
published_atstring
metadataobject
Show fields
NameTypeDescription
descriptionstring
authorstring
site_namestring
canonical_urlstring
image_urlstring
keywordsarray of string
metaobjectMeta name and property tags, at most 100.
json_ldarray of objectAt most 20 items.
imagesarray of objectAt most 200 items.
Show fields
NameTypeDescription
urlrequiredstring
altstring
widthinteger
heightinteger
pdf_pagesinteger
relevant_passagesarray of string
fetched_atinteger
pagesarray of object
Show fields
NameTypeDescription
requested_urlrequiredstring
urlstringFinal URL after redirects. For now the requested URL, because the reader does not report the final one yet.
statusrequiredstringOne of ok, failed.
errorobject
Show fields
NameTypeDescription
coderequiredstring
messagerequiredstring
http_statusinteger
content_typestring
titlestring
contentstring
formatstringOne of markdown, text, html.
charsinteger
truncatedboolean
extractionstringNeutral label of how the text was taken. New values can appear. One of article, full_page, document, feed, plain, structured.
languagestring
published_atstring
metadataobject
Show fields
NameTypeDescription
descriptionstring
authorstring
site_namestring
canonical_urlstring
image_urlstring
keywordsarray of string
metaobjectMeta name and property tags, at most 100.
json_ldarray of objectAt most 20 items.
imagesarray of objectAt most 200 items.
Show fields
NameTypeDescription
urlrequiredstring
altstring
widthinteger
heightinteger
pdf_pagesinteger
relevant_passagesarray of string
fetched_atinteger

Errors

StatusCodes
400invalid_request, invalid_url, invalid_schema or invalid_image. Not charged.
401invalid_token. Not charged.
403pre_consume_token_quota_failed (the key's own spending limit), access_denied, web_not_allowed or model_not_in_plan (customer keys while plans cannot include the web tools). Not charged.
404not_found or invalid_endpoint. Not charged.
413read_request_body_failed: the request body is over the limit. Not charged.
415unsupported_content. Not charged.
422fetch_failed, site_refused, page_too_large or extraction_failed. Not charged.
429rate_limited, concurrency_limited, api_key_temporarily_frozen, or the failure guard. Not charged.
500internal_error. Not charged.
501api_not_implemented: the endpoint, type or option has not shipped. Not charged.
503source_unavailable, web_api_disabled, token_cache_busy or billing_busy (the charge could not be prepared in time; retry after Retry-After). Not charged.
504timeout. Not charged.