Skip to main content
The fetch endpoint extracts clean, structured content from a web page. You get the page title, description, full text, and metadata — without writing a scraper. It returns JSON by default, or LLM-ready markdown with format=context.

Parameters

JSON response

Fields like author, date, image, and site_name appear when the page provides them.

Context format

With format=context, the response is markdown with YAML frontmatter — ready to pass into an LLM context window:

Using the query parameter

Pass a query to get passage-level extracts scoped to a specific question:
The response includes query_extracts (passages relevant to the query), query_snippet (a query-focused summary), and query_hash.

Using the effort parameter

Pass effort to control how thoroughly the page is retrieved — the same tier names used by search modes:
low favors speed; max spends the most time extracting content, useful for pages that are slow to load or render content client-side. Omit effort to use the server’s adaptive default. Invalid values return a 400 listing the valid tiers.
Fetch failures (422, 503) are never billed, regardless of effort.

Partial responses

A 200 response can include partial content when the page is slow to fully retrieve: Treat partial: true as incomplete — re-request the same URL after retry_after_seconds to get the full content. This differs from a 503, where no content was extracted at all.

Error handling

The fetch endpoint uses two distinct error codes for page-level failures: Both 422 and 503 responses are not billed. You only pay for successful extractions. Other errors (400 for a missing or invalid URL, 401, 402, 429) follow the same patterns as the search endpoint — see error handling.

Pricing

Fetch calls are billed at a flat 0.001baseperrequest,plus0.001 base per request, plus 0.05 per 1M tokens of extracted content. Failed fetches (422 and 503) are free. The billed amount is returned in metrics.cost_dollars (JSON) or cost_dollars in the frontmatter (format=context).

Search extracts as an alternative

If you already have search results and want passage-level text without fetching each page, use extracts=true on the search endpoint instead. This returns text extracts inline on each result at no additional cost:
The fetch endpoint is for when you need the full page content, or when you want to retrieve a specific URL that may not appear in search results.

MCP tool

The andi_fetch_url MCP tool wraps this endpoint. See Build with AI agents for setup instructions.

Next steps

Search modes

Automatic effort by default, manual control when you want it.

Query parameters

Full parameter reference including extracts.

Response format

JSON and context format output structure.

Build with AI agents

MCP server and agent integration.