Expand AI logo
DocsDocs
Glow Active
API Reference
Login

Documentation

Get started

IntroductionWhy ExpandQuickstartAuthenticationConnect your agent (MCP)

Products

OverviewFetching a URLBatched Fetch
API reference
OverviewPlayground & replayProgressive disclosure

SDKs & tools

TypeScript SDK
MCP tools & resourcesDocs for agents

Reference

API referenceErrors & retriesPricing & UsageLimitsConcurrency tiersFAQ
Browse docs

Get started

IntroductionWhy ExpandQuickstartAuthenticationConnect your agent (MCP)

Products

OverviewFetching a URLBatched Fetch
API reference
OverviewPlayground & replayProgressive disclosure

SDKs & tools

TypeScript SDK
MCP tools & resourcesDocs for agents

Reference

API referenceErrors & retriesPricing & UsageLimitsConcurrency tiersFAQ

Wayback Machine

Browser page Fetches save a Snapshot you can replay, cite, and read again without fetching twice.

Each browser page Fetch saves a Snapshot: the rendered page and its assets, with the Main Markdown, State JSON, and evidence made from it. When the live site changes, the Snapshot still shows what your agent read. A successful Fetch response carries a snapshotId.

With a browser page Snapshot you can:

  • Replay the captured page at expand.land/s/<snapshotId>, or open it next to the Markdown in the Playground.
  • Cite it. Highlights and the Playground point to the exact source block or State JSON entry behind an answer.
  • Read it again without fetching twice. Highlights and Progressive disclosure work on the Snapshot you already have.
  • Download the whole capture as a WACZ archive.
Note
A PDF or other file and a YouTube video get a snapshotId too, but no replayable page or WACZ archive.

What a Snapshot saves

For a browser page, the first response carries the Main Markdown and State JSON. Its Snapshot also keeps everything else from the capture, and each part is one public GET away, with no API key:

PartWhat it is for
The original HTMLRe-parse it with your own tools, or diff it against a later Fetch.
A HAREvery HTTP exchange behind the page, to debug a bad capture or replay it elsewhere.
Network recordsThe JSON APIs the page loaded, so you can call them directly next time.
AssetsThe images, PDFs, and scripts the page referenced.

How to read each part is on Progressive disclosure.

Two IDs

A browser page Fetch response carries two different IDs for its Snapshot:

IDWhereUsed by
meta.snapshotIdThe JSON object, and snapshotId in Markdown text frontmatterHighlights, the Playground, and replay
meta.resources.snapshotIdThe JSON object, and the more URL in Markdown text frontmatterThe public read URLs on Progressive disclosure
Warning
They are not interchangeable. Highlights with the public ID returns 404, and the public read URLs do not accept the capture ID.

Who can read a Snapshot

Snapshot links are shareable citation links. Treat them like public links to captured source material.

  • Snapshot URLs are public. Anyone who has a link can open it.
  • Snapshot pages ask search engines not to index them, and send no referrer. That is not access control, and it may not apply to non-HTML responses such as /content or archive.wacz.
Recommendation
Don't fetch private pages you don't want shared as public links. Keep secrets, tokens, and private customer data out of pages you plan to cite.

Getting the replay link

A browser page Fetch's JSON object carries the replay link as meta.playground. In Markdown text, it is the playground line of the frontmatter.

import { ExpandClient } from '@expandai/sdk'

const expand = new ExpandClient()

const page = await expand.fetchJson({ url: 'https://news.ycombinator.com' })

console.log(page.meta.playground) // https://expand.land/s/ng0EFjewTRF6
expandai fetch https://news.ycombinator.com --format json
# meta.playground in the output is the replay link
// Arguments for the fetch tool
{
  "

Next steps

  • Playground & replay: replay a Snapshot, inspect it next to its Markdown, and cite the evidence in it.
  • Progressive disclosure: read everything a Snapshot saves, from code or from an agent.
  • Two ways to highlight: highlight a Snapshot you already have, with meta.snapshotId.
PreviousX-Ray
NextPlayground & replay

On This Page

What a Snapshot savesTwo IDsWho can read a SnapshotGetting the replay linkNext steps
Evidence
The source blocks and State JSON entries that citations point to.
A WACZ archiveThe whole capture, which powers replay.
url
"
:
"https://news.ycombinator.com"
}
// meta.playground in the result is the replay link
curl https://api.expand.ai/v1/fetch/json \
  -H "x-expand-api-key: $EXPAND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://news.ycombinator.com"}'