/search
Learn how to use Oxylabs Web API /search endpoint to search the live web and collect ranked results.
The /v1/search endpoint performs live web searches and returns ranked organic results, including titles, snippets, URLs, position metadata, and related queries. It works as a discovery tool to identify authoritative web pages before passing target URLs to the /v1/scrape endpoint for full-page extraction.
Request sample
The endpoint accepts a JSON request body with the search query, result limits, and geo-location parameters.
curl https://webapi.oxylabs.io/v1/search \
-H "Authorization: Bearer $OXYLABS_WEB_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"query": "eu ai act compliance deadlines",
"max_results": 3,
"location": "DE"
}'Request parameters
query
Search keyword or phrase (between 1 and 2,048 characters).
string
max_results
Number of organic search results to return (between 1 and 20). Default: 10
integer
location
ISO 3166-1 alpha-2 country code (e.g. DE, US) for localized search.
string
– mandatory parameter.
Request optimization
Output sample
Output dictionary
state
"done" on success. A search that encounters an upstream failure returns 500 with state: "faulted" (see Error codes).
string
results
Ranked organic results, best first. Always present, so empty output means nothing matched.
array
results[].title
Fetched page title.
string
results[].outline[]
SERP result snippets. Truncated mid-sentence.
array of strings
results[].metadata.position
Organic SERP position, starting at 1.
integer
related_questions
"People also ask" question object containing question, title, and snippet (when available).
array
related_searches
Related search queries, each containing query.
array
params
Execution parameters including defaults.
object
metadata.timestamp
Unix timestamp in seconds.
integer
metadata.request_id
19-digit request handle. Include in support tickets.
string
Last updated
Was this helpful?