Expand AI logo
DocsAPI ReferenceAPI Reference
Login

API Reference

Getting Started

API ReferenceRate LimitingError Handling

Endpoints

BatchedFetchFetch JsonFetch SearchGet Batched

Search a previous Fetch by snapshotId without starting a new browser capture.

Authorization

x-expand-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

POST
/v1/fetch/search
snapshotId*nonEmptyString
Length1 <= length
search*
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,
    "redirectStatusCode": 301,
    "headers": {
      "content-type": "text/html; charset=utf-8"
    }
  },
  "search": {
    "query"

































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

Snapshot ID returned by a previous Fetch response.

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

Search corpus include config. Defaults to Markdown and State JSON.

:
"string"
,
"snippets": [
{
"type": "text",
"source": "markdown",
"text": "string",
"json": null,
"score": 0,
"location": {
"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
}