Expand AI logo
DocsDocs
API Reference
Login

Documentation

Start

WelcomeQuickstartCLI & AgentsAPI Reference

Concepts

Progressive DisclosureState JSONAppendixCitationsSearch & HighlightingSpatial MarkdownInclude OptionsBatched Fetch

Product

FetchMCPCLI

SDKs

SDKsTypeScript SDKPython SDK

Fetch

Extract web content as Markdown, JSON Mode responses, and optional evidence.

Fetch is the primary Expand API. It renders a page in a browser and returns agent-ready Markdown by default.

curl -X POST https://api.expand.ai/v1/fetch \
  -H "x-expand-api-key: {{API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com" }'

Use POST /v1/fetch/json for JSON Mode when your application needs a structured response with fields such as Markdown, Page Metadata, response metadata, State JSON, Appendix, or search results.

Include Options

Include Options control optional Fetch outputs.

PropertyDescription
markdownAgent-ready Markdown representation of the page.
jsonState JSON selected from page state and network responses.
appendixLinks, navigation, footers, sidebars, and other secondary regions.
linksLinks discovered on the page.

Start with the default Markdown response. Add Include Options only when the agent or application needs more evidence.

State JSON

In output context, json means State JSON: selected structured evidence from the page and network activity. It is useful when the page is backed by embedded state or API responses that are difficult to reconstruct from Markdown alone.

Appendix

Appendix keeps secondary page regions available without flooding the main Markdown document. Request it when links, navigation, sidebars, footers, or other secondary context matters.

Fetch Search

Fetch Search searches the evidence included in the Fetch corpus. If you include Markdown and State JSON, both can be searched. If you include Appendix, Appendix evidence can be searched too.

curl -X POST https://api.expand.ai/v1/fetch \
  -H "x-expand-api-key: {{API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "include": { "markdown": true, "json": true },
    "search": { "query": "How do I authenticate?" }
  }'

Use POST /v1/fetch/search with a snapshotId to search a previous Fetch without starting a new browser capture.

Batched Fetch

Batched Fetch starts captures for many URLs and lets clients poll paginated results.

curl -X POST https://api.expand.ai/v1/fetch/batched \
  -H "x-expand-api-key: {{API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{ "urls": ["https://example.com", "https://example.com/about"] }'

Batched Fetch is currently narrower than single-page Fetch. Screenshots, summaries, State JSON, and Appendix are not supported in batched results.

API Reference

For exact request and response schemas, use the operation pages:

  • Fetch
  • JSON Mode
  • Fetch Search
  • Batched Fetch
  • Get Batched Fetch
PreviousBatched Fetch
NextMCP

On This Page

Include OptionsState JSONAppendixFetch SearchBatched FetchAPI Reference
metaPage Metadata such as title, description, and social tags.
responseResponse metadata such as final URL and origin status.
htmlHTML captured from the page.
screenshotVisual capture of the page.
summaryAI-generated page summary.