Expand AI logo
DocsAPI ReferenceAPI Reference
Glow Active
Login

API Reference

Getting Started

API ReferenceErrors

Endpoints

FetchFetch JSON ModeStart Batched FetchGet Batched StatusCancel Batched FetchSearchGet CatalogGet NetworkSnapshot Highlights
Browse docs

Getting Started

API ReferenceErrors

Endpoints

FetchFetch JSON ModeStart Batched FetchGet Batched StatusCancel Batched FetchSearchGet CatalogGet NetworkSnapshot Highlights

Search

Search the web and return the most relevant pages for a query, each with its title, excerpt and score.

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

application/json

application/json

application/json

POST
/v1/search
query*string

What to search the web for, up to 2,000 characters

maxResults?between(1, 10)

The most results to return, most relevant first (1-10, default 10)

Range1 <= value <= 10

application/json

application/json

application/json

application/json

{
  "results": [
    {
      "url": "string",
      "title": "string",
      "excerpt": "string",
      "score": 0


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

{
  "reason": "InvalidApiKey",
  "description": "string",
  "_tag": "AuthFailed"
}
{
  "blockedUntil": "string",
  "retryable": false,
  "_tag": "AccessBlocked"
}
{
  "_tag": "PayloadTooLarge"
}
{
  "retryable": true,
  "retryAfterSeconds": 0,
  "_tag": "TooManyRequests"
}
{
  "retryable": true,
  "_tag": "InternalError"
}
{
  "message": "string",
  "requestId": "string",
  "retryable": true,
  "_tag": "ServiceUnavailable"
}
}
]
}
message
"
:
"string"
,
"_tag": "HttpApiDecodeError"
}