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

Snapshot Highlights

Find relevant passages in an existing Snapshot. Requires authentication and costs one Highlights credit. Does not fetch the page again.

Authorization

x-expand-api-key<token>

In: header

Path Parameters

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

POST
/v1/snapshots/{snapshotId}/highlights
snapshotId*nonEmptyString

a non empty string

Length1 <= length
highlights*
include?

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

{
  "snapshotId": "string",
  "response": {
    "url": "https://stripe.com/docs/api",
    "requestedUrl": "https://www.stripe.com/docs/api",
    "originStatusCode": 200,
    "










































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

{
  "reason": "InvalidApiKey",
  "description": "string",
  "_tag": "AuthFailed"
}
{
  "organizationId": "string",
  "blockedUntil": "string",
  "_tag": "AccessBlocked"
}
{
  "snapshotId": "string",
  "_tag": "FetchSnapshotHighlightsNotFound"
}
{
  "_tag": "PayloadTooLarge"
}
{
  "retryable": true,
  "retryAfterSeconds": 0,
  "_tag": "TooManyRequests"
}
{
  "retryable": true,
  "_tag": "InternalError"
}
{
  "message": "string",
  "requestId": "string",
  "dispatchOutcome": "cancelled_before_start",
  "retryable": true,
  "_tag": 

Options for Highlights. When present, Fetch returns relevant passages.

Layers to highlight. Defaults to Main Markdown and State JSON.

redirectStatusCode
"
: 301,
"contentType": "text/html",
"headers": {
"content-type": "text/html; charset=utf-8"
}
},
"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
}
]
}
},
"durationMs": 0,
"playground": "string"
}
message
"
:
"string"
,
"_tag": "HttpApiDecodeError"
}
"ServiceUnavailable"
}