/searchSearch the WebSearch the web and retrieve relevant web page contents.
Request body
requiredapplication/json
ApiSearchRequest
allOf · 3 options
countrystringISO 3166-1 alpha-2 country code
max_resultsintegerMaximum number of results. Values above 20 require search_type=people. Supports up to 20 for web search and up to 50 for people search.
max_tokensintegerMaximum total webpage content tokens to return across all search results
max_tokens_per_pageintegerMaximum webpage content tokens to extract from each result page
queryvaluerequiredSearch query (required)
Show child attributes
anyOf · 2 options
search_context_sizestringControls how much content is extracted from result pages. - `low` — short passages most relevant to the query. - `medium` — a balanced amount of content per document. - `high` (default) — detailed content relevant to the query. Omit when using `max_tokens` or `max_tokens_per_page`.
search_language_filterarray of stringISO 639-1 language codes (2-character max)
Show child attributes
search_typestringSearch type - "web" for general web search, "fast" for lower-latency, lower-cost web search, "people" for people search. max_results above 20 is only supported for people search.
SearchDomainFilter
search_domain_filterarray of stringLimit search results to specific domains (max 20)
Show child attributes
DateFilters
last_updated_after_filterstringInput: MM/DD/YYYY, Output: YYYY-MM-DD
last_updated_before_filterstringInput: MM/DD/YYYY, Output: YYYY-MM-DD
search_after_date_filterstringInput: MM/DD/YYYY, Output: YYYY-MM-DD
search_before_date_filterstringInput: MM/DD/YYYY, Output: YYYY-MM-DD
search_recency_filterstringTime-based recency filter for search results
{
"country": "string",
"last_updated_after_filter": "string",
"last_updated_before_filter": "string",
"max_results": 10,
"max_tokens": 0,
"max_tokens_per_page": 0,
"query": "string",
"search_after_date_filter": "string",
"search_before_date_filter": "string",
"search_context_size": "string",
"search_domain_filter": [
"string"
],
"search_language_filter": [
"string"
],
"search_recency_filter": "day",
"search_type": "web"
}Responses
ApiSearchResponse
idstringrequiredresultsarray of objectrequiredShow child attributes
Show array items
A single page from search results
datevaluePublication date of the page
Show child attributes
anyOf · 2 options
last_updatedvalueDate the page was last updated
Show child attributes
anyOf · 2 options
snippetstringrequiredContent snippet extracted from the page
titlestringrequiredTitle of the page
urlstringrequiredURL of the page
server_timevalueShow child attributes
anyOf · 2 options
{
"id": "string",
"results": [
{
"date": null,
"last_updated": null,
"snippet": "string",
"title": "string",
"url": "string"
}
],
"server_time": null
}HTTPValidationError
detailarray of objectShow child attributes
Show array items
locarray of valuerequiredShow child attributes
Show array items
anyOf · 2 options
msgstringrequiredtypestringrequired{
"detail": [
{
"loc": [
0
],
"msg": "string",
"type": "string"
}
]
}