Expand AI logo
DocsAPI ReferenceAPI Reference
Login

API Reference

Getting Started

API ReferenceRate LimitingError Handling

Endpoints

BatchedFetchFetch JsonFetch SearchGet Batched

Fetch a URL and return an LLM-ready Markdown document. Use Include Options to request Appendix or State JSON when you need more evidence.

Authorization

x-expand-api-key<token>

In: header

Query Parameters

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

text/markdown

application/json

POST
/v1/fetch
include?string

Include Options for the response. Use a comma-separated list with appendix for Appendix and statejson for State JSON. Defaults to State JSON when omitted; use include= for Markdown only. For search requests without a URL include parameter, the request body include fields define the search corpus.

url*string
include?
search?
browserConfig?

application/json

application/json

application/json

application/json

application/json

application/json

"string"
{
  "issues": [
    {
      "_tag": "Pointer",
      "path": [
        "string"
      ],
      "message": "string"
    }
  ],
  "message": "string",
  "_tag": "HttpApiDecodeError"
}
{
  "reason": "InvalidApiKey",
  "description": "string",
  "_tag": "AuthFailed"
}
{
  "organizationId": "string",
  "blockedUntil": "string",
  "_tag": "AccessBlocked"
}
{
  "_tag": "PayloadTooLarge"
}
{
  "_tag": "TooManyRequests"
}
{
  "_tag": "InternalError"
}
{
  "_tag": "ServiceUnavailable"
}

The URL to fetch content from (http or https only)

Specifies which content formats to include in the response

Options for Fetch Search. When present, Fetch returns search results only.

Configuration options for browser behavior during the fetch