Expand AI logo
DocsAPI ReferenceAPI Reference
Glow Active
Login

API Reference

Getting Started

API ReferenceRate LimitingError Handling

Endpoints

Start Batched FetchCancel Batched FetchFetchFetch JSON ModeHighlightsGet Batched Status
Browse docs

Getting Started

API ReferenceRate LimitingError Handling

Endpoints

Start Batched FetchCancel Batched FetchFetchFetch JSON ModeHighlightsGet Batched Status

Fetch JSON Mode

POST
/v1/fetch/json

Fetch a URL and return a structured JSON response containing page metadata, Markdown, State JSON, and search results when requested.

Authorization

x-expand-api-key<token>

In: header

Query Parameters

include?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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

application/json

{
  "meta": {
    "version": 1,
    "url": "string",
    "capturedAt": "string",
    "snapshotId": "string",
    "


































































































{
  "issues": [
    {
      "_tag": "Pointer",
      "path": [
        "string"
      ],
      "message": "string"
    }
  ],
  "

{
  "reason": "InvalidApiKey",
  "description": "string",
  "_tag": "AuthFailed"
}
{
  "organizationId": "string",
  "blockedUntil": "string",
  "_tag": "AccessBlocked"
}
{
  "_tag": "PayloadTooLarge"
}
{
  "_tag": "TooManyRequests"
}
{
  "_tag": "InternalError"
}
{
  "message": "string",
  "requestId": "string",
  "_tag": "ServiceUnavailable"
}

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

Specifies which content formats to include in the response

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

Configuration options for browser behavior during the fetch

lang
"
:
"string"
,
"pageType": "string",
"playground": "string",
"title": "string",
"finalUrl": "string",
"canonical": "string",
"description": "string",
"author": "string",
"createdAt": "string",
"updatedAt": "string",
"image": "string",
"paginationNext": "string",
"appendix": {
"url": "string",
"links": {
"sameDomain": 0,
"external": 0
}
},
"stateJson": {
"moreTokens": 0
},
"markdown": {
"url": "string",
"moreTokens": 0
},
"blocked": "string",
"loadingStatus": "string"
},
"markdown": "string",
"json": [
{
"id": 0,
"kind": "inline",
"role": "ld+json",
"score": 0,
"url": "string",
"urlRedacted": true,
"urlOmitted": "invalid",
"method": "string",
"body": null,
"moreTokens": 0,
"keys": [
"string"
]
}
],
"data": {
"assets": [
{
"id": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"kind": "data-url",
"placeholder": "expand-asset:data-url:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"archiveKey": "data-url:sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"mimeType": "image/svg+xml",
"sha256": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"bytes": 312
}
],
"search": {
"query": "string",
"snippets": [
{
"type": "text",
"source": "markdown",
"text": "string",
"json": null,
"score": 0,
"location": {
"evidenceId": 1,
"markdownBlockId": "string",
"nodeIds": [
0
],
"stateJsonSourceId": 0,
"jsonPath": "string"
}
}
],
"meta": {
"durationMs": 0,
"sources": [
{
"source": "markdown",
"chunkCount": 0,
"batchCount": 0,
"ranker": "zeroentropy",
"fallback": true,
"fallbackReason": "timeout",
"durationMs": 0
}
]
}
},
"screenshot": {
"url": "https://s3.amazonaws.com/bucket/snapshots/abcd/screenshot.jpeg?X-Amz-Signature=...",
"fullPage": true
}
}
}
message
"
:
"string"
,
"_tag": "HttpApiDecodeError"
}