websearch

Run a live websearch.

Run a live websearch on a set of queries, get back a fully structured and LLM-distilled response (in addition to the raw text if you need that as well).

Your response includes as_string and as_dicts, where as_string is a prompt-optimized distillation of the information, done by an LLM. as_dicts contains all the details necessary to feed into other parts of your application.

get/v1/chat/websearch

Query parameters

queriesstring[] required

A list of queries to be live searched, analyzed, distilled, and structured.

A list of queries to be live searched, analyzed, distilled, and structured.

lookbackinteger nullable

Number of hours back to allow the websearch to look. Defaults to All time

Number of hours back to allow the websearch to look. Defaults to All time

start_datetimestring date-time nullable

Earliest acceptable publication datetime for results. For v1, acts like the existing lookback filter.

Earliest acceptable publication datetime for results. For v1, acts like the existing lookback filter.

end_datetimestring date-time nullable

Latest acceptable publication datetime for results.

Latest acceptable publication datetime for results.

engine'v1' | 'v1.5'

Search engine version to use for live websearch results.

Search engine version to use for live websearch results.

domainsstring[] nullable

A list of domains to search.

A list of domains to search.

strictboolean

If true, the websearch will only return results that have a known publication date and are within the lookback period.

If true, the websearch will only return results that have a known publication date and are within the lookback period.

integer
OR
string

The number of results to offset for followup queries. Numeric for regular websearch; X (Twitter) searches return an opaque cursor string in response.offset — pass it back here to paginate.

Response

Structured websearch.

as_stringstring required

Changes

No recorded changes to this endpoint across all 1 revision of this API.