screenshot
, outputs
, json_response
, and others.Parameter | Description | Required When | Type |
---|---|---|---|
js_render | Enables JavaScript rendering in a headless browser | Site loads content via JS | Boolean |
wait | Waits for a specified time in milliseconds before returning the response | Site loads slowly | Integer |
wait_for | Waits for a specific CSS selector to be present | Site depends on dynamic elements | String |
json_response | Extracts data from XHR/Fetch calls loaded during page render | Site uses API calls for content | Boolean |
js_instructions | Performs custom user interactions (clicks, scrolls, etc.) | Site requires interaction to reveal content | Array |
premium_proxy | Uses residential proxies to avoid detection and access restricted content | Site blocks datacenter IPs or has bot detection | Boolean |
js_render
. This ensures that ZenRows runs JavaScript in a headless browser to render the page fully.
wait
, wait_for
, screenshot
, json_response
, outputs
, and others.
wait
parameter to introduce a fixed delay or wait_for
to wait for a specific CSS selector to appear.
wait
wait_for
wait_for
will cause the request to fail if the selector is not found. Use browser DevTools to find reliable CSS selectors on your target site.json_response
for XHR-based Pagesjson_response
parameter to access the response of those internal XHR requests.
json_response
with wait
or wait_for
to ensure all background requests have completed before data is captured.screenshot
parameter. This can help determine whether content is missing due to rendering delays or protections.
js_instructions
parameter. This allows you to simulate actions in the browser before the content is captured.
Example:
js_instructions
, each instruction can have an optional wait_for
step. If the selector is not found, ZenRows will attempt the next instruction after a short delay.
js_instructions
to simulate user interactions, followed by json_response
to capture XHR data.screenshot
alongside wait_for
to visually confirm dynamic content.Scenario | Recommended Parameters | Notes |
---|---|---|
Empty or partially loaded pages | js_render=true | Ensures JavaScript runs to render dynamic content |
Content loads slowly | wait=5000 or wait_for=.selector | Allows time for content to appear or specific element to load |
Page requires user interaction | js_instructions=[{"click":".selector"}...] | Simulates user actions like dismissing modals or clicking buttons |
Data comes from background requests | json_response=true + wait or wait_for | Captures XHR/Fetch data loaded after DOM is ready |
Complex sites with strong protection | premium_proxy=true + js_render=true | Mimics real browser with rotating residential IPs |