v1

latestOpenAPI 3.1.02026-07-26125062.1 KB
Search

/search

The /search endpoint allows you to retrieve web content.

post/v1/search

Request body

excludeDomainsstring[]

The domains you want to exclude of the search. By default, don't restrict the search.

fromDatestring nullable

The date from which the search results should be considered, in ISO 8601 format (YYYY-MM-DD). It must be before toDate, if provided, and later than 1970-01-01.

includeDomainsstring[]

The domains you want to search on. By default, don't restrict the search. You can provide up to 100 domains.

qstring required

The natural language question for which you want to retrieve context.

{"stackTrail":"components:schemas:SearchInput:properties:structuredOutputSchema","oasType":"schema","type":"unknown","description":"Required only when `outputType` is `structured`. Provide a JSON schema (as a string) representing the desired response format. The root must be of type `object`."}
toDatestring nullable

The date until which the search results should be considered, in ISO 8601 format (YYYY-MM-DD). It must be later than fromDate, if provided, or than 1970-01-01.

depth'deep' | 'fast' | 'standard' required

Defines the precision of the search. [BETA] fast is a sub-second search mode optimized for simple, focused queries; standard leverages agentic search to handle broader queries spanning multiple topics or sources, while remaining fast; deep leverages several iterations of agentic search to return comprehensive results, optimizing for coverage.

maxResultsnumber

The maximum number of results to return. The number of results will always be ≤ to maxResults.

outputType'searchResults' | 'sourcedAnswer' | 'structured' required

The type of output you want to get. Use structured for a custom-formatted response defined by structuredOutputSchema.

Example request

{
  "depth": "deep",
  "excludeDomains": [
    "wikipedia.org"
  ],
  "includeDomains": [
    "microsoft.com",
    "agolution.com"
  ],
  "outputType": "sourcedAnswer",
  "q": "What is Microsoft's 2024 revenue?"
}

Response

Successful response