Get your API key
/search
endpoint is a context retrieve for online content. For a natural language query, it finds online information to ground your LLM’s answer, along with sources.
depth
parameter, results may be faster (standard
) or slower but more complete (deep
).
If outputType
is set to structured
, you may provide a JSON structuredOutputSchema
to dictate the response format.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
The natural language question for which you want to retrieve context.
"What is Microsoft's 2024 revenue?"
Defines the precision of the search. standard
returns results faster; deep
takes longer but yields more comprehensive results.
standard
, deep
The type of output you want to get. Use structured
for a custom-formatted response defined by structuredOutputSchema
.
sourcedAnswer
, searchResults
, structured
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
.
Defines whether the API should include images in its results.
The date from which the search results should be considered, in ISO 8601 format (YYYY-MM-DD).
"2025-01-01"
The date until which the search results should be considered, in ISO 8601 format (YYYY-MM-DD).
"2025-01-01"
The domains you want to exclude of the search. By default, don't restrict the search.
["wikipedia.com"]
The domains you want to search on. By default, don't restrict the search.
["microsoft.com", "agolution.com"]
Relevant only when outputType
is SourcedAnswer
. Defines whether the answer should include inline citations.
Response
Successful response
When you pick searchResults
for the outputType
parameter, you will get a list of search results related to your query.