/scrape
Learn how to use Oxylabs Web API /scrape endpoint to fetch and parse any web page in the format you want.
The /v1/scrape endpoint fetches web pages by URL, automatically handling headless rendering, proxy rotation, access challenges, and localization. It returns structured page data in Markdown, HTML, JSON, or as PNG screenshots.
Request sample
The endpoint accepts a JSON payload defining the target URL, requested output formats, rendering options, and geo-location context.
curl https://webapi.oxylabs.io/v1/scrape \
-H "Authorization: Bearer $OXYLABS_WEB_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"url": "https://artificialintelligenceact.eu/implementation-timeline/",
"output": ["markdown"]
}'Request parameters
url
Absolute http / https target URL.
string
output
Response format: markdown, html, json, screenshot. Supports multiple values. Default: html
array of strings
json
When output: ["json"], can be used for custom AI parsing through prompt or schema. See AI Parsing.
object
location
Two-letter ISO 3166-1 alpha-2 country code (e.g., "US", "DE", "JP").
string
device
User-agent and viewport emulation: "desktop" (default) or "mobile".
string
run_js
Enables JavaScript rendering when set to true. Default: false.
boolean
– mandatory parameter.
Output sample
A successful request returns an HTTP 200 OK status with a standard envelope. Fields inside results[] with unrequested output formats return null.
Output dictionary
results
One entry for the requested URL.
array
results[].markdown
Page as Markdown, if requested. null otherwise.
string
results[].html
Raw result markup, if requested. null otherwise.
string
results[].json
Parsed fields from a dedicated scraper or AI parser, if requested null otherwise.
object
results[].screenshot
Base64-encoded image string, if requested. null otherwise.
string
results[].metadata.url
Fetched URL for scraping after redirects.
string
params
All parameters use for the requests with applied defaults.
object
metadata.timestamp
Unix timestamp in seconds.
integer
metadata.request_id
Identifier for this request. Include it in support tickets.
string
Latency and concurrency
A scrape renders a real page with budget in seconds, not milliseconds. We recommend a couple of of safe practices to build around that:
Client timeout
150 seconds is a safe default, while a 10-second timeout may fail on pages that would have succeeded. For higher volume (e.g. media, large SERP runs, etc.) with a risk of client timeout, run the same scrapers with async delivery instead of blocking the request. See Delivery Modes.
Concurrency limit
Scraping ten search results in parallel multiplies cost and latency for pages you won't read. Scrape the two or three that plausibly answer the question and only increase concurrency gradually until 429 error is reached.
Dedicated scrapers
Beyond generic URL scraping, target-specific scrapers can be used with POST /v1/scrape/{target}/{collection}. They accept target-specific parameters (e.g., ASINs, browse nodes, store zip codes) and return structured fields under results[].json:
See Dedicated scrapers for target overviews (Google, Amazon, YouTube, Bing, AI & LLMs, Commerce, etc.).
Last updated
Was this helpful?