Website Rendering
Render JavaScript-heavy pages in a headless browser and return post-render HTML. Use when Crawler returns empty DOM; escalate to WebUnlocker if bot protection blocks the session.
Credit cost: 2 credits per call
Authentification
ApiKeyAuth Your API key. Include it in the x-api-key header for every request.
In: header
Paramètres de requête
A public website URL to render in a headless browser. Must include http:// or https://.
Example:
https://example.comChoosing the right engine:
- Static HTML already in the page? Try Website Crawler first (1 credit, faster).
- This endpoint (Website Rendering) runs JavaScript and returns post-render HTML.
- Still blocked after rendering? Escalate to Website WebUnlocker if the domain is whitelisted.
See Website Scraping guide for a full comparison.
Number of seconds to wait after page load before returning the rendered HTML. Useful for pages with delayed rendering or animations.
Notes:
- Increasing this value adds latency to every request. Use only when a page's content loads after a delay.
0 <= value <= 30"0"A CSS or XPath selector to wait for before returning the rendered HTML. The headless browser will hold the response until the specified element appears in the DOM.
Supported selector types:
- ID selector:
#loading-container - Class selector:
.content-loaded - Combined selector:
div.main-content#user-profile
Example:
wait_for=#loading-containerNotes:
- If the element never appears, the request will time out according to the
timeoutparameter.
Controls whether the headless browser should block ad requests during rendering.
false: Ads are loaded normally (default)true: Ad network requests are blocked, resulting in cleaner HTML and faster rendering
Notes:
- Blocking ads can speed up rendering on ad-heavy pages and reduce noise in the extracted HTML.
"false"Maximum number of seconds to wait for the page to fully load before returning whatever has been rendered so far.
- Accepts integer values representing seconds
Notes:
- Setting a lower timeout may result in incomplete HTML for slow-loading pages.
- Combine with
wait_forto ensure critical elements are present before the timeout fires.
"30"JSON array sent in the POST body (not a query string, not a stringified JSON string).
status.computer browser workers only execute instructions when this field is a real array (browser_instructions / browserInstructions).
A JSON array of browser navigation instructions to execute sequentially during page rendering. Allows controlling scrolling and other browser actions to trigger dynamic content loading or simulate human behavior.
Currently supports two instruction types:
scroll: Scrolls the page by a precise number of pixels (horizontally and/or vertically)scroll_to_bottom: Automatically scrolls to the bottom of the page
Instruction type: scroll
Parameters:
type:"scroll"x: Pixels to scroll horizontally (positive = right, negative = left)y: Pixels to scroll vertically (positive = down, negative = up)duration(optional): Duration in seconds for smooth scrolling. Default:0(instant)wait_time_s(optional): Seconds to wait after the instruction completes. Default:0
Example payload:
{ "type": "scroll", "x": 0, "y": 4115, "duration": 5, "wait_time_s": 2}Instruction type: scroll_to_bottom
Parameters:
type:"scroll_to_bottom"duration(optional): Duration in seconds for smooth scrolling. Default:0(instant)wait_time_s(optional): Seconds to wait after the instruction completes. Default:0
Example payload:
{ "type": "scroll_to_bottom", "duration": 3, "wait_time_s": 2}Full request example (multiple instructions):
{ "query": "https://www.comparably.com/companies/airbus", "wait_for": "#ng-state", "browser_instructions": [ {"type": "scroll", "x": 0, "y": 1000, "duration": 2, "wait_time_s": 1}, {"type": "scroll", "x": 0, "y": 2000, "duration": 3, "wait_time_s": 1}, {"type": "scroll_to_bottom", "duration": 4, "wait_time_s": 2} ]}Notes:
- Execution order: Instructions are executed sequentially in the specified order
- Error handling: If one instruction fails, subsequent ones continue to execute
- Smooth scrolling (
duration > 0) takes more time but better simulates human behavior and avoids bot detection - Increase
timeoutwhen using instructions with significant cumulative durations
Corps de la réponse
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v2/website/rendering?query=string""<!DOCTYPE html><html lang=\"en\"><head><title>Example Domain</title><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><style>body{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}</style></head><body><div><h1>Example Domain</h1><p>This domain is for use in documentation examples without needing permission. Avoid use in operations.</p><p><a href=\"https://iana.org/domains/example\">Learn more</a></p></div>\n</body></html>"{ "error": "Bad Request"}{ "error": "Invalid API Key"}{ "error": "Payment required"}{ "error": "Rate limit exceeded for the API key: quota monthly"}{ "error": "Internal Error"}