Fetch a web page

Changed on

Fetches a single web page and returns clean extracted content (title, article text, metadata) as JSON, or LLM-ready markdown with format=context. The companion to /api/v1/search: search, pick a result, fetch it in full.

get/api/v1/fetch

Request

  • Base URL
    https://api.andiai.com
  • URL
    https://api.andiai.com/api/v1/fetch
  • Auth
    API key in header x-api-key

Query parameters

urlstring uri required

Full http(s) URL of the page to fetch.

format'json' | 'context'

Response format: json (structured, default) or context (LLM-ready markdown).

effort'low' | 'medium' | 'high' | 'max'

How thoroughly to retrieve the page: low favors speed, max spends the most time extracting content — useful for pages that are slow to load or render content client-side. Omit for the server's adaptive default. Invalid values return a 400 listing the valid tiers. Fetch failures (422, 503) are never billed, regardless of effort.

maxContentLengthinteger

Maximum content characters to return (default 100000, maximum 200000).

querystring

Optional query string to scope extraction to. When set, the response includes query_extracts, query_snippet, and query_hash fields scoped to this query.

Response

Extracted page content

urlstring
titlestring
descriptionstring
contentstring

Clean extracted text content

markdownstring

Clean extracted content as markdown, when available.

extractsstring[]

Key passage extracts from the page, when available.

snippetstring

Short excerpt from the page.

authorstring
datestring
site_namestring
imagestring
langstring
word_countinteger
truncatedboolean
query_extractsstring[]

Text extracts from the page most relevant to query. Only present when query is set.

query_snippetstring

Short excerpt from the page most relevant to query. Only present when query is set.

query_hashstring

Hash identifying the query used to scope this response. Only present when query is set.

partialboolean

Whether this is a partial response returned before the page finished retrieving. Only present when true.

retry_after_secondsinteger

Seconds to wait before retrying for the full content. Only present on partial responses.

Changes

    • breaking

      for the query request parameter maxContentLength, default value 100000 was added

    • warning

      for the query request parameter maxContentLength, the max was set to 200000.00