Expand AI logo
DocsDocs
Glow Active
API Reference
Login

Documentation

Get started

IntroductionWhy ExpandQuickstartAuthenticationConnect your agent (MCP)

Products

OverviewFetching a URLBatched Fetch
API reference

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

SDKs & tools

TypeScript SDK
MCP tools & resourcesDocs for agents

Reference

API referenceErrors & retriesPricing & UsageLimitsConcurrency tiersFAQ

FAQ

Short answers to common questions about Fetch, agents, Highlights, billing, tiers, and the docs themselves, each with a link to the page that has the detail.

Short answers to common questions. Each one links to the page that has the detail.

Using Expand

What is Fetch?

Fetch is Expand's core product. You send a URL and get the page back as Markdown text or a JSON object, with the State JSON behind it and a Snapshot every line links back to. Start with the Fetch overview.

Are the CLI, MCP, the TypeScript SDK, and the API separate products?

No. They are ways to call Fetch. Use the CLI from a terminal, the TypeScript SDK or the API from application code, MCP from an agent, and hooks or the Skill to route an agent's own web tool through Expand. See Quickstart: Ways to use Expand.

Which one should I use?

NeedUse
Try one URL from your terminalQuickstart with the CLI
Add Fetch to an appTypeScript SDK or the API reference
Give a coding agent web contextConnect your agent (MCP)
Check what a Fetch returned, visually

When should I use the CLI instead of the TypeScript SDK?

Use the CLI to inspect a page locally, in scripts, and in an agent's shell. Use the TypeScript SDK or the API when Fetch is part of your application code. See CLI: Commands and TypeScript SDK.

Fetch output

Why does /v1/fetch return Markdown text?

/v1/fetch is Markdown Mode, for the common case where the page goes straight into a prompt. Use /v1/fetch/json, JSON Mode, when your code reads the fields separately, such as the Snapshot ID or the State JSON. See Fetching a URL.

When should I use JSON Mode?

Use JSON Mode when application code needs the Main Markdown, the State JSON, the Snapshot ID, or Fetch Highlights as separate fields of one JSON object. See Fetching a URL and TypeScript SDK.

What are the Main Markdown and the State JSON?

The Main Markdown is the page's content as Markdown, with navigation, footers, and ads taken out. The State JSON is the data behind the page, such as the JSON its own APIs returned. See How Fetch works.

Is the State JSON always included?

The State JSON is on by default in both modes. An empty ?include= turns it off. An entry too large to send comes back without body, with moreTokens and a sample of its keys instead, so you can ask for it when you need it. See Fetching a URL.

What is progressive disclosure?

Fetch returns the Main Markdown first and keeps a pointer to everything it held back, such as the Appendix and large State JSON entries, so your agent reads more only when the task needs it. See Progressive disclosure.

Are the Appendix pointer, the Snapshot ID, and moreTokens missing data?

No. They are pointers to content Fetch held back to keep the response small. The Appendix, the replay, and the rest of a large State JSON entry are each one request away. See References to more.

Should I turn on every include option?

No. Start with the defaults. Add the Appendix, a screenshot, or other extras only when the task needs them. See Include options.

Does Batched Fetch return everything a single Fetch does?

No. Batched Fetch returns the Main Markdown and the State JSON, and does not return screenshots, the Appendix, Highlights, or converted files. See Supported options.

Highlights and citations

What is Highlights?

Highlights returns the snippets of a page that answer a question, ranked by relevance, so your agent reads the passages it needs instead of the whole page. See Two ways to highlight.

Does Highlights fetch the page again?

Not when you highlight a Snapshot you already have. Snapshot Highlights takes the meta.snapshotId from an earlier Fetch and costs 1 credit. Fetch Highlights runs as part of a new Fetch. See Two ways to highlight.

Can Highlights search the Main Markdown, the State JSON, and the Appendix?

Yes. By default Highlights searches the Main Markdown and the State JSON. The Appendix is searched only when you include it. See Two ways to highlight.

Do Highlights snippets come with citations?

Every snippet carries a location with an evidence ID. From MCP, each snippet also carries a citationUrl. From the API or the TypeScript SDK, build the link with the SDK's citation helpers. See Working with snippets and TypeScript SDK.

Can I show citation links to my own users?

Yes, when the page is safe to share. Snapshot links are public, so anyone with a link can open it. Do not fetch private pages, secrets, or customer data you do not want shared. See Who can read a Snapshot.

Agents

What is the difference between hooks, the Expand Skill, and MCP?

A hook routes an agent's built-in web-fetch tool through Expand. The Skill teaches the agent how to use Expand from its shell. MCP gives the agent Fetch as a native tool. See CLI: Skill & hooks.

Which agents support hooks?

OpenCode. Claude Code, Cursor, Codex, and fx get the Skill and the MCP server instead. See CLI: Commands.

Is installing the Skill enough?

It can be, when the agent can read the Skill and run terminal commands. Add MCP when you want native tool calls, or when the agent should not depend on a shell. See CLI: Skill & hooks.

Should an agent use expandai login or EXPAND_API_KEY?

For an agent on your machine, run expandai login once. The CLI and the local MCP server read that sign-in. Use EXPAND_API_KEY for the TypeScript SDK, the API, servers, and CI. See Connect your agent (MCP) and Authentication.

What is /start.md?

/start.md is the setup guide for agents, as one Markdown document. Give it to an agent and the agent picks the right setup for itself. See start.md.

Why can't my agent see the Skill or the MCP server?

Most often the install ran in a different directory, the agent needs a restart, or the MCP configuration landed in a different scope than the agent is using. See Troubleshooting.

Billing and tiers

Is Expand billed by tokens?

No. Expand bills in prepaid credits per delivered output, not per token. See Pricing & Usage.

What does a Fetch cost?

1 credit, and 1,000 credits cost $1. Highlights adds 1 credit, each converted document page adds 1, each vision-model page adds 5, a video adds 5, and transcribed audio adds 10 a minute. See Credit costs.

Am I charged when a Fetch does not return a page?

No. You pay for delivered content, not for attempts. The one surprise is that an origin's 404 or 500 page is a real capture, so it costs 1 credit like any other page. Check originError before you treat the content as the page you asked for. See What you are charged for, by outcome.

How do I tell an Expand failure from a dead URL?

Check the status and the error body together. A browser page Fetch can return 200 with an originError when the origin served an error page, or a FetchOriginError when it could not be reached. A file Fetch can instead return 404, 410, or 502 with FetchOriginHttpError when the origin refuses the file. Other non-2xx responses describe API or capture errors. See When the origin fails.

What are credits?

Credits are Expand's prepaid unit. You buy them at $1 per 1,000, and delivered work draws them down. A Fetch costs 1 credit. Your first organization starts with 10,000 welcome credits. See Credits and balance.

Do my credits expire?

Purchased credits stay on your balance until you spend them. Welcome credits expire 365 days after they are granted. See Credits and balance.

What happens when I run out of credits?

Expand checks your balance before it admits a request, so a request with no credits behind it is refused rather than run and billed. Buy credits in Billing and the block clears immediately. See Access when credits run out.

Are tiers pricing plans?

No. Tiers raise the browser concurrency included with your account as you spend credits and time passes. They do not change what anything costs. See Concurrency tiers.

Why am I not in the next tier after spending enough?

Tiers 2 to 5 need both a spend threshold and a number of days since your first transaction. If the spend is there and the days are not, the next tier is not active yet. See Why am I not in the next tier?.

What is browser concurrency?

The number of browser captures your organization can run at once. At the limit, a single Fetch is refused with 429 FetchConcurrencyLimitExceeded and Batched Fetch queues instead. See Limits.

Do provisioned browsers raise my tier?

No. Provisioned browsers add to your total browser concurrency and leave your tier as it is. See Provisioned browsers.

When does a change to provisioned browsers take effect?

Adding browsers takes effect immediately. Removing browsers takes effect at the end of the month you paid for. See Provisioned browser concurrency.

Reference and machine-readable docs

Why is the API reference separate from the docs?

The docs explain what each product does and how to use it. The API reference holds the exact request and response schemas, errors, and generated examples. Open the API reference.

Where are the exact request and response schemas?

In the API reference. The docs link to it instead of repeating every schema.

Can an agent read the docs as Markdown?

Yes. Every docs and API reference page is available as Markdown, and start.md, llms.txt, and llms-full.txt give an agent a compact way in. See Any page as Markdown.

What is the difference between /start.md, llms.txt, and llms-full.txt?

/start.md is the setup guide for agents. llms.txt is a compact index of the docs. llms-full.txt is the whole docs bundle, for agents that need more context. See start.md, llms.txt, and llms-full.txt.

Can API reference pages be read as Markdown?

Yes. Append .md to the page's path, or request the page with Accept: text/markdown. See Any page as Markdown.

Next steps

  • Pricing & Usage: credits and what each operation costs.
  • Concurrency tiers: how tiers are reached, with worked examples.
  • Limits: concurrency, time, and size limits.
  • Docs for agents: read the docs as Markdown.
PreviousConcurrency tiers

On This Page

Using ExpandWhat is Fetch?Are the CLI, MCP, the TypeScript SDK, and the API separate products?Which one should I use?When should I use the CLI instead of the TypeScript SDK?Fetch outputWhy does /v1/fetch return Markdown text?When should I use JSON Mode?What are the Main Markdown and the State JSON?Is the State JSON always included?What is progressive disclosure?Are the Appendix pointer, the Snapshot ID, and moreTokens missing data?Should I turn on every include option?Does Batched Fetch return everything a single Fetch does?Highlights and citationsWhat is Highlights?Does Highlights fetch the page again?Can Highlights search the Main Markdown, the State JSON, and the Appendix?Do Highlights snippets come with citations?Can I show citation links to my own users?AgentsWhat is the difference between hooks, the Expand Skill, and MCP?Which agents support hooks?Is installing the Skill enough?Should an agent use expandai login or EXPAND_API_KEY?What is /start.md?Why can't my agent see the Skill or the MCP server?Billing and tiersIs Expand billed by tokens?What does a Fetch cost?Am I charged when a Fetch does not return a page?How do I tell an Expand failure from a dead URL?What are credits?Do my credits expire?What happens when I run out of credits?Are tiers pricing plans?Why am I not in the next tier after spending enough?What is browser concurrency?Do provisioned browsers raise my tier?When does a change to provisioned browsers take effect?Reference and machine-readable docsWhy is the API reference separate from the docs?Where are the exact request and response schemas?Can an agent read the docs as Markdown?What is the difference between /start.md, llms.txt, and llms-full.txt?Can API reference pages be read as Markdown?Next steps
Playground & replay