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

Browser Behavior

Understand how Fetch renders pages before producing Markdown and evidence.

Fetch renders live pages before extraction. It runs JavaScript, observes the page, captures browser state, and returns agent-ready Markdown, State JSON, screenshots when requested, and replayable evidence.

Public Fetch keeps browser controls intentionally small: today, browserConfig.scrollFullPage is the only public browser behavior option.

curl https://api.expand.ai/v1/fetch \
  -H "x-expand-api-key: $EXPAND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://stripe.com/pricing",
    "browserConfig": { "scrollFullPage": true }
}'

See Include Options

Choose Markdown, screenshot, JSON, and response output.

Debug in Playground

Replay what Fetch saw at capture time.

Open API Reference

See exact request and response schemas.

What Fetch does in the browser

Fetch is not just downloading HTML. It opens the page in a browser, lets client-side JavaScript run, observes the rendered page, and then extracts the content and state that matter for agents.

That difference matters on pages where raw HTML misses the useful content:

  • JavaScript-rendered docs that hydrate after load;
  • dashboards and app shells backed by JSON state;
  • pricing pages, tables, and grids where layout carries meaning;
  • icon-heavy pages where the icons are the signal.

Fetch reads and preserves page context. It is not a public browser-automation engine: this page does not promise that Fetch can fill forms, click through multi-step flows, or drive arbitrary page interactions.

Readiness and timing

Fetch decides when the page is ready internally. Public Fetch does not currently expose timeout, wait selector, network-idle, or custom readiness controls.

What that means in practice:

  • pages are rendered before extraction, not captured as raw source;
  • a page that never settles may be captured partially;
  • captures that fail or are refused surface as errors or blocked outcomes;
  • when output looks off, replay shows what Fetch actually saw.

Internal timing constants are not a stable public contract and can change.

Scrolling

scrollFullPage is the one public browser behavior control. It defaults to false. When true, Fetch attempts to scroll the page before capture to trigger lazy-loaded content, then returns to the top before capturing.

{
  "url": "https://example.com",
  "browserConfig": {
    "scrollFullPage": true
  }
}

The scroll pass is best-effort. It does not guarantee that every infinite-scroll page is fully exhausted, and a scroll that fails is logged and does not fail the request.

Use scrollFullPage when important content appears only after scrolling. Do not use it as a promise that every infinite-scroll page will be fully exhausted.

scrollFullPage: false -> capture the initial rendered page
scrollFullPage: true  -> scroll to trigger lazy content -> return to top -> capture

Screenshots

Screenshots are requested through include.screenshot, not browserConfig.

{
  "url": "https://example.com",
  "include": {
    "screenshot": true
  }
}

Screenshots are opt-in. A requested screenshot defaults to full-page. Set include.screenshot.fullPage: false for a viewport screenshot instead. Fetch returns one screenshot per request, not both a full-page and a viewport image.

fullPage: true  -> one full-page screenshot
fullPage: false -> one viewport screenshot

The response carries a screenshot URL and a fullPage boolean. The exact schema belongs to Output Model and the API Reference; see Include Options for the full request surface.

Redirects and response metadata

If your application needs to know what happened at the HTTP layer, request response metadata.

{
  "url": "https://example.com",
  "include": {
    "response": {
      "includeHeaders": true
    }
  }
}

Response metadata can report:

  • the final URL Fetch landed on;
  • the originally requested URL when it differs;
  • origin status;
  • redirect status;
  • headers, only when include.response.includeHeaders is true.

The full response schema lives in Output Model and the API Reference.

Blocked pages

Fetch can handle many pages that raw HTTP cannot, but it does not promise to bypass every block, CAPTCHA, auth wall, or bot-protection system.

Fetch renders through a real browser and can handle many sites where raw HTTP fails. Some sites still block automated access; those may return FetchBlocked.

  • A blocked page may return FetchBlocked.
  • Synchronous POST /v1/fetch can surface this as HTTP 403.
  • Some retry behavior is internal; Fetch may retry retryable block classes on its own.
  • Proxy behavior is internal and is not a public request option.
  • When a capture result is surprising, inspect replay or the error details before assuming the page is unreachable.

Browser controls that are not public

This is the full set of public browser behavior today. The rest of the table exists so you do not hunt for options that Fetch does not expose.

ControlPublic today?Notes
scrollFullPageYesBest-effort scroll before capture.
TimeoutNoReadiness and timeout behavior are managed internally.
Proxy / locationNoProxy retry behavior is internal.

If any of these become public, this page and the API Reference change together.

Debug with replay

When output looks incomplete or surprising, replay shows what Fetch saw at capture time.

  • Replay helps debug missing or lazy-loaded content.
  • Replay lets you inspect citations and evidence.
  • Replay separates page behavior (what the site rendered) from extraction behavior (what Fetch kept).

The common failure modes to look for: timeout, blocked, auth wall, CAPTCHA, missing lazy content, and unexpected redirects. Playground & Replay covers the inspection workflow in full.

Next steps

  • Include Options: control which artifacts Fetch returns.
  • Output Model: see the response fields and schemas.
  • Playground & Replay: inspect evidence visually.
  • How Fetch Works: the capture mental model.
PreviousInclude Options
NextHighlights

On This Page

What Fetch does in the browserReadiness and timingScrollingScreenshotsRedirects and response metadataBlocked pagesBrowser controls that are not publicDebug with replayNext steps
Viewport / deviceNoNot a public Fetch option.
User agentNoNot a public Fetch option.
Cookies / session authNoAuthenticated browsing is not owned by this page.
GeolocationNoNot a public Fetch option.
Wait selector / action stepsNoFetch is not a public browser-actions API today.
Bot detector bypassNoInternal-only; not a public option.