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
Authorization
ApiKeyAuth Your API key. Include it in the x-api-key header for every request.
In: header
Query Parameters
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"Response Body
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"}