Expand AI logo
DocsDocs
Glow Active
API Reference
Login

Documentation

Get Started

OverviewWhy ExpandQuickstartWays to Use Expand

Agent Quickstarts

OverviewExpand SkillClaude CodeCursorCodexOpenCodeSkill-Based AgentsOther MCP Clients

Fetch

OverviewHow Fetch WorksOutput ModelInclude OptionsBrowser BehaviorHighlightsPlayground & ReplayBatched Fetch

Reference

API ReferenceCLI CommandsMCP Tools & ResourcesTypeScript SDKPython SDK

Account & Billing

Pricing & UsageTiersFAQ

Machine-Readable Docs

start.mdllms.txtllms-full.txtDocs as Markdown
Browse docs

Get Started

OverviewWhy ExpandQuickstartWays to Use Expand

Agent Quickstarts

OverviewExpand SkillClaude CodeCursorCodexOpenCodeSkill-Based AgentsOther MCP Clients

Fetch

OverviewHow Fetch WorksOutput ModelInclude OptionsBrowser BehaviorHighlightsPlayground & ReplayBatched Fetch

Reference

API ReferenceCLI CommandsMCP Tools & ResourcesTypeScript SDKPython SDK

Account & Billing

Pricing & UsageTiersFAQ

Machine-Readable Docs

start.mdllms.txtllms-full.txtDocs as Markdown

Overview

Fetch renders live pages and returns agent-ready Markdown, State JSON, evidence, and replayable snapshots.

Fetch renders live web pages and returns agent-ready Markdown, structured state, citations, and replayable snapshots. Start with the main content, then ask for more when the task needs it.

More answers, fewer tokens. Fetch separates signal from noise before your agent sees the page. It returns the main working document first, preserves structured state and spatial layout when they matter, and keeps deeper evidence reachable by reference instead of flooding the context window.

Less context does not mean throwing data away. Fetch preserves the page, then gives the agent the right entry point.

HTML-to-Markdown is not enough anymore. Fetch keeps the tables, icons, layout, hidden JSON, citations, and replay links that ordinary Markdown drops.

One request

Send a URL, get back agent-ready context. The canonical call is POST /v1/fetch:

curl https://api.expand.ai/v1/fetch \
  -H

"x-expand-api-key:
$EXPAND_API_KEY
"
\
-H "Content-Type: application/json" \
-d '{"url":"https://news.ycombinator.com"}'

Need a key and a first run? Start with the Quickstart.

What comes back

Fetch gives agents the page as a working document, not a screenshot of the DOM and not a lossy scrape. One request returns layers an agent can read in order:

Frontmatter
Main Markdown
Spatial Markdown for tables, grids, icons, and layout
State JSON when useful
Appendix references
snapshotId
citations / Playground link

The default answer is pragmatic: Markdown first, structured state when useful, references to more when the agent needs depth.

Quickstart

Run one Fetch and inspect the output.

How Fetch Works

Learn the mental model behind the output layers.

Output Model

Map product layers to exact response fields.

Read the Fetch section

How Fetch Works

Understand Main Markdown, State JSON, Appendix, snapshots, citations, and progressive disclosure.

Output Model

See response fields, frontmatter, metadata, JSON Mode, snapshot IDs, and references.

Include Options

Choose Markdown, State JSON, appendix, metadata, screenshots, HTML, response data, and more.

Browser Behavior

Understand JavaScript rendering, scrolling, screenshots, timeouts, and page limitations.

Highlights

Ask focused questions over captured evidence without fetching the same page again.

Playground & Replay

What Fetch preserves

Fetch turns one page into layers instead of one flattened stream. Each layer links to where it is defined in full.

LayerWhat it gives the agentGo deeper
FrontmatterPage metadata, URL, title, snapshot ID, and request context before the document body.Output Model
Main MarkdownThe high-signal working document your agent should read first.How Fetch Works
Spatial Markdown

Ways to call Fetch

The API, SDKs, CLI, MCP, and agents are all surfaces onto the same Fetch. Pick the one that fits your stack; the output model is the same.

PathWhere to start
APIAPI Reference
TypeScript SDKTypeScript SDK
Python SDKPython SDK
CLI

When to use Fetch

Use Fetch for agent research, docs ingestion, product and pricing pages, dashboard-like pages, JavaScript-rendered content, and any workflow where source evidence matters.

A simpler path may be enough for already-clean Markdown or a known API that exposes exactly the data you need. Browser automation is the better tool when the primary task is operating a site, filling forms, or completing a multi-step workflow.

Next steps

  • Quickstart: run one Fetch.
  • Why Expand: understand what Fetch preserves beyond plain Markdown.
  • How Fetch Works: learn the mental model.
  • API Reference: use exact endpoint schemas.
PreviousOther MCP Clients
NextHow Fetch Works

On This Page

One requestWhat comes backRead the Fetch sectionWhat Fetch preservesWays to call FetchWhen to use FetchNext steps

Inspect what Fetch saw, debug citations, and share replayable evidence links.

Batched Fetch

Fetch many URLs asynchronously and poll for results.

Layout-aware Markdown for tables, grids, icons, pricing pages, dashboards, and UI-heavy pages.
How Fetch Works
State JSONStructured app and network state, included when it helps answer questions Markdown cannot.How Fetch Works
AppendixSecondary regions, navigation, sidebars, and links without flooding the main document.Include Options
Evidence & ReplayCitations, source IDs, snapshotId, Playground links, and replayable captures.Playground & Replay
CLI Commands
MCPMCP Tools & Resources
AgentsAgent Quickstarts