/v2/search
endpoint instead of /search
Description
This endpoint is designed to return LLM-ready web results based on a user’s query. Based on a classification mechanism, it can return web results and news associated with your query. If you need to feed an LLM with the results of a query that sounds likeWhat is the weather like in France in September?
, then this endpoint is the right one for you.
Search Operators
Operator | Description | Example |
---|---|---|
site | Searches for webpages from a particular domain (including subdomains) | site:uscourts.gov USA v. Enron |
filetype | Searches for webpages that are of the specified file type | USA v. Enron filetype:pdf |
lang | Searches for webpages that are in a particular language (ISO 639-1 format) | Modelo lang:es |
+ | Searches for webpages that contain the exact term after the + | Enron +GAAP |
- | Searches for webpages that do not contain the exact term after the - | guitar -prs |
AND | Logical operator to combine expressions | guitar +prs AND +silversky |
OR | Logical operator to combine expressions | guitar -prs AND -silversky |
NOT | Negation of expressions | USA v. Enron NOT site:uscourts.gov |
Errors
The endpoint returns as a structured JSON object withstatus
, code
, title
, and detail
fields:
HTTP | Code | When it happens |
---|---|---|
401 | bad_request | This can happen for a missing API key: {"detail": "API key is required"} , an invalid/expired API key: {"detail": "Invalid or expired API key"} or for other auth parsing errors: {"detail": "<error message>"} |
403 | forbidden | API key lacks scope for the path (e.g., /v1/search ): {"detail": "Missing required scopes"} |
500 | Internal Server Error (auth/authorization middleware) | This can happen in the case of authentication failure: {"detail": "Internal authentication error"} or authorization failure: {"detail": "Internal authorization error"} |
Authorizations
A unique API Key required to authorize API access. Ensure it is kept confidential. Get a free API Key at you.com/platform.
Query Parameters
Search query used to retrieve relevant results from index. You may also include search operators to refine your search.
Specifies the maximum number of results to return per section. Range 1 ≤ count ≤ 100
.
Specifies the freshness of the results to return.
day
, week
, month
, year
Indicates the offset
for pagination. The offset
is calculated in multiples of count
. For example, if count = 5
and offset = 1
, results 5–10 will be returned. Range 0 ≤ offset ≤ 9
.
Country Code, one of ['AR', 'AU', 'AT', 'BE', 'BR', 'CA', 'CL', 'DK', 'FI', 'FR', 'DE', 'HK', 'IN', 'ID', 'IT', 'JP', 'KR', 'MY', 'MX', 'NL', 'NZ', 'NO', 'CN', 'PL', 'PT', 'PH', 'RU', 'SA', 'ZA', 'ES', 'SE', 'CH', 'TW', 'TR', 'GB', 'US']
.
Configures the safesearch filter for content moderation. off
- no filtering applied.moderate
- moderate content filtering (default). strict
- strict content filtering.
Indicates which set(s) of search results to livecrawl and return full page content.
web
, news
, all
Indicates the format of the livecrawled content.
html
, markdown