When to use
Use JavaScript rendering when you need to:- Load dynamic content: Capture content loaded via AJAX or fetch requests
- Execute JavaScript: Process sites that require JS for content display
- Handle SPAs: Extract data from Single Page Applications (React, Vue, Angular)
- Wait for interactions: Capture DOM state after user actions
- See final state: Get the page as users see it, not raw HTML
Parameters
render
render
Turn JavaScript rendering on or off. When enabled, the page loads in a real browser that executes JavaScript, just like when you visit it yourself.When to enable:
- Single Page Applications (React, Vue, Angular)
- Content loaded via AJAX or fetch
- Sites that need JavaScript to display content
- When you need the page as users see it
- Static HTML pages
- Simple websites without JavaScript
- When raw HTML is sufficient
render_options
render_options
Fine-tune how the browser waits and loads the page. Only applies when
render: true.Available options:render_type- When to consider the page “loaded”load(default) - Wait for the standard page load event - good for most pagesdomready- Stop as soon as HTML is ready, before images load - fastest optionidle2- Wait until only 2 or fewer network requests in the last 500ms - good for dynamic contentidle0- Wait until zero network activity for 500ms - most thorough, slowest
timeout- Maximum wait time in milliseconds (default: 30,000)- How long to wait before giving up
include_iframes- Whether to load content inside iframes (default: false)- Enable for embedded videos, widgets, or important iframe content
blocked_domains- List of domains to block during loading- Great for blocking ads, analytics, or tracking scripts
- Makes pages load faster and cleaner
Usage
Enable basic rendering
Setrender: true to enable JavaScript execution:
Dynamic content loading
Wait for AJAX-loaded content:Iframe content extraction
Include iframe content in extraction:Block unnecessary resources
Improve performance by blocking ads and tracking:Fast rendering for simple sites
Use DOMContentLoaded for faster responses:Combining with browser actions
Rendering works seamlessly with browser actions:Best practices
Choose the right render type
Use load for standard pages:
Use domready for speed:
Use idle2 for dynamic content:
Use idle0 for complete loading:
Optimize timeout settings
Set appropriate timeouts:Block unnecessary domains
Common domains to block:- Faster page loads
- Lower bandwidth usage
- Reduced detection risk
- Cleaner HTML output
Handle iframes carefully
Enable only when needed:Combine with network capture
Monitor and capture API calls during rendering:Performance optimization
Choose the minimal driver:When to skip rendering
Use non-rendering (vx6) when:- Static content: HTML already contains all data
- API endpoints: Fetching JSON directly
- High throughput needed: Rendering is slower
- Simple pages: No JavaScript required
- Cost optimization: Non-rendering is cheaper