Expand AI logo
DocsAPI ReferenceAPI Reference
Glow Active
Login

API Reference

Getting Started

API ReferenceErrors

Endpoints

FetchFetch JSON ModeStart Batched FetchGet Batched StatusCancel Batched FetchGet CatalogSnapshot Highlights
Browse docs

Getting Started

API ReferenceErrors

Endpoints

FetchFetch JSON ModeStart Batched FetchGet Batched StatusCancel Batched FetchGet CatalogSnapshot Highlights

Fetch JSON Mode

Fetch a URL and return page metadata, Markdown, State JSON, and Highlights when requested.

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

application/json

POST
/v1/fetch/json
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 Highlights requests without a URL include parameter, the request body include fields define the Highlights corpus.

appendixMarkers?string

Appendix omission marker verbosity in the Markdown body: compact (default), detailed, or off. Overrides include.appendixMarkers from the request body.

Value in"off" | "compact" | "detailed"
url*string
include?
highlights?
browserConfig?
documentConfig?

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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": "FetchOriginHttpError",
  "url": "string",
  "statusCode": 404,
  "contentType": "text/html"
}
{
  "_tag": "FetchOriginHttpError",
  "url": "string",
  "statusCode": 410,
  "contentType": "text/html"
}
{
  "_tag": "PayloadTooLarge"
}
{
  "url": "string",
  "contentType": "application/octet-stream",
  "_tag": "FetchUnsupportedContentType"
}
{
  "url": "string",
  "availability": "private",
  "message": "string",
  "_tag": "FetchVideoUnavailable"
}
{
  "retryable": true,
  "retryAfterSeconds": 0,
  "_tag": "TooManyRequests"
}
{
  "retryable": true,
  "_tag": "InternalError"
}
{
  "url": "string",
  "failureType": "pageNeverSettled",
  "retryable": false,
  "_tag": "FetchCaptureFailed"
}
{
  "message": "string",
  "requestId": "string",
  "dispatchOutcome": "cancelled_before_start",
  "retryable": true,
  "_tag": 
{
  "url": "string",
  "timeoutMs": 150000,
  "retryable": false,
  "_tag": "FetchCaptureTimeout"
}
{
  "url": "string",
  "timeoutMs": 150000,
  "retryable": true,
  "_tag": "FetchCapacityTimeout"
}

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 relevant passages.

Configuration options for browser behavior during the fetch

Limits and conversion options applied when the URL serves a non-HTML document

lang
"
:
"string"
,
"pageType": "string",
"playground": "string",
"citationEvidenceIds": [
1
],
"title": "string",
"finalUrl": "string",
"contentType": "string",
"canonical": "string",
"description": "string",
"author": "string",
"createdAt": "string",
"updatedAt": "string",
"image": "string",
"paginationNext": "string",
"appendix": {
"url": "string",
"links": {
"sameDomain": 0,
"external": 0
},
"omitted": {
"blocks": 0,
"approxTokens": 0
},
"markers": [
{
"evidenceId": 0,
"links": 0,
"approxTokens": 0,
"label": "string",
"preview": "string",
"moreBlocks": 0
}
]
},
"stateJson": {
"moreTokens": 0
},
"markdown": {
"url": "string",
"moreTokens": 0
},
"resources": {
"version": 1,
"snapshotId": "string",
"url": "string",
"markdownUrl": "string"
},
"blocked": "string",
"loadingStatus": "string"
},
"markdown": "string",
"json": [
{
"id": 0,
"kind": "inline",
"role": "ld+json",
"score": 0,
"url": "string",
"method": "string",
"body": null,
"moreTokens": 0,
"keys": [
"string"
],
"urlRedacted": true,
"urlOmitted": "invalid"
}
],
"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
}
],
"degraded": {
"reason": "pageTooLarge",
"skipped": [
"hfc"
],
"limitKind": "domsnapshot_bytes",
"measuredBytes": 0,
"thresholdBytes": 0,
"measuredTokens": 0,
"thresholdTokens": 0
},
"highlights": {
"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
},
"document": {
"url": "https://s3.amazonaws.com/bucket/snapshots/abcd/document/original.pdf?X-Amz-Signature=...",
"contentType": "application/pdf",
"sizeBytes": 48213
},
"usage": {
"documentPages": 12,
"ocrPages": 0,
"audioSeconds": 0,
"videos": 0
},
"video": {
"provider": "youtube",
"videoId": "dQw4w9WgXcQ",
"title": "string",
"channel": "string",
"channelUrl": "string",
"durationSeconds": 213,
"publishedAt": "2009-10-25",
"viewCount": 0,
"language": "en",
"transcript": {
"source": "captions",
"kind": "manual",
"language": "en"
},
"segments": [
{
"startSeconds": 0,
"text": "string"
}
],
"chapters": [
{
"title": "string",
"startSeconds": 0
}
],
"storyboard": {
"frameWidth": 320,
"frameHeight": 180,
"rows": 3,
"columns": 3,
"sheets": [
{
"url": "string",
"durationSeconds": 0
}
]
}
}
},
"originError": {
"url": "string",
"kind": "http",
"contentAvailable": false,
"finalUrl": "string",
"redirectLimitReached": true,
"originStatusCode": 404,
"upstreamError": null,
"retryable": true,
"_tag": "FetchOriginError"
}
}
message
"
:
"string"
,
"_tag": "HttpApiDecodeError"
}
"ServiceUnavailable"
}