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 control optional Fetch outputs.
| Property | Description |
|---|---|
markdown | Agent-ready Markdown representation of the page. |
json | State JSON selected from page state and network responses. |
appendix | Links, navigation, footers, sidebars, and other secondary regions. |
links | Links discovered on the page. |
Start with the default Markdown response. Add Include Options only when the agent or application needs more evidence.
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 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 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 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.
For exact request and response schemas, use the operation pages:
meta | Page Metadata such as title, description, and social tags. |
response | Response metadata such as final URL and origin status. |
html | HTML captured from the page. |
screenshot | Visual capture of the page. |
summary | AI-generated page summary. |