For the complete documentation index, see llms.txt. This page is also available as Markdown.

Core Endpoints

Reference for Web API's two core endpoints, /search and /scrape — parameters, response schema, and examples.

Endpoint
Returns

Ranked organic web results

Extract content from URL

POST /v1/search

Ranked organic web results.

Modes: sync only

Request Schema

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"}'
Parameter
Type
Required
Description

query

string

Yes

Keyword search phrase. 1 to 2048 chars.

max_results

integer

No

Number of results to return. 1–20. Default 10

location

string

No

ISO 3166-1 alpha-2 country code, e.g. DE. Default null

Response

Field
Type
Description

state

string

done. faulted on a 500

results[]

array

Ranked organic results, best first. Empty when nothing matched

results[].title

string

Page title

results[].outline

array of strings

Content snippets. Each item is truncated

results[].url

string

Absolute URL of the result

results[].metadata.position

integer

Rank, starting at 1

related_questions[]

array

"People also ask" entries. Omitted when empty

related_questions[].question

string

The question. Always present

related_questions[].title

string

Title of the answering page (Optional)

related_questions[].snippet

string

Extract answering the question. Truncated (Optional)

related_searches[]

array

Related queries, each with a query. Omitted when empty

params

object

Parameters used for request, defaults filled in

metadata.timestamp

integer

Unix timestamp in seconds

metadata.request_id

string

Request identifier

POST /v1/scrape

Extracts data from URL and returns its content in the requested formats.

Modes: sync, async, batch

Request Schema

Parameter
Type
Required
Description

url

string

yes

Absolute http or https URL. Send it unchanged, query strings and path segments are significant

output

array of strings

no

Formats to return: ["html"] (default), ["markdown"], ["json"], ["screenshot"]. json returns parsed fields (through dedicated parsers or AI parsing). screenshot requires run_js: true

json

object

no

Required when output includes json (and no dedicated parser is available): {"prompt": string} or {"schema": object}, never both

json.prompt

string

no

Natural-language extraction instructions for output: ["json"]. max_len: 8192, default: null. Cannot be used with json.schema.

json.schema

object

no

OpenAPI / JSON Schema object defining required JSON output shape. 10 to 65535 chars, default: null. Cannot be used with json.prompt

location

string

no

Two-letter country code to fetch from, e.g. DE

device

string

no

desktop (default) or mobile

run_js

boolean

no

Executes page JavaScript before capture. Slower, use a client timeout of 150 seconds or more

callback_url

string

no

Async only. Webhook URL for the finished job. Malformed URLs are rejected with 400

storage

object

no

Async-only. Delivers the result to a bucket instead of the response: {"type": string, "url": string}. type is s3, s3_gzip, s3_compatible, gcs, or tos. url is not validated

Response

Field
Type
Description

state

string

done, pending, or faulted

status

integer

Present on error responses. HTTP status code

results[]

array

One entry for the requested URL. Present when state is done

results[].markdown

string

The page as Markdown. Present when requested

results[].html

string

The raw markup. Present when requested

results[].json

object

Parsed fields. Present when requested

results[].screenshot

string

The screenshot. Present when requested

results[].metadata.url

string

The URL fetched, after redirects

results[].metadata.statuses

object

HTTP, parsing, and other tagged processing statuses

params

object

Parameters used for request, defaults filled in. Null values are retained

metadata.timestamp

integer

Unix timestamp in seconds

metadata.request_id

string

Request identifier

metadata.statuses

object

Tagged request-level statuses, such as storage delivery status

Last updated

Was this helpful?