When to use render_js
Set "render_js": true when the content you need is injected by JavaScript after the initial HTML loads. Common cases:
- Single-page applications (React, Vue, Angular)
- Infinite-scroll feeds where items appear after JS executes
- Pages behind login redirects that trigger on load
- Dynamic price or inventory widgets
render_js — it saves credits and latency.
How it works
Whenrender_js is true, the API launches a headless Chromium browser, navigates to the URL, waits for the network to settle, and captures the fully-rendered DOM. The browser is isolated per request and discarded afterwards.
Rendering typically adds 2–5 seconds of latency.
Waiting for specific conditions
Usewait_for to hold rendering until a specific condition is met:
network_idle: true waits until there are no in-flight network requests for 500 ms. This is useful for pages that fire background API calls after initial load.
Setting a timeout
Usetimeout_ms to cap how long the browser waits. The default is 15,000 ms (15 s) for inline requests. Async requests allow up to 300,000 ms (5 min).
timeout error code.
Device emulation
Emulate mobile or tablet viewports to reach responsive content:"desktop" (default), "mobile", "tablet".