Skip to main content
The Wait parameter introduces a fixed delay during JavaScript rendering, allowing web pages additional time to load dynamic content before Zenrows fully captures the HTML. Many websites load content progressively through JavaScript, AJAX calls, or other asynchronous processes that occur after the initial page has been rendered. When you add the wait parameter to your request, Zenrows pauses for the specified duration (in milliseconds) after the page initially loads, ensuring that slow-loading elements, animations, and dynamically generated content have time to appear before the HTML is extracted. The maximum wait value acceptable is 30 seconds (30,000 milliseconds).
The Wait parameter requires js_render=true to function, as it operates within the browser environment during JavaScript rendering.

How the Wait parameter works

The Wait parameter creates a pause in the scraping process after the initial page load completes. During this waiting period, the headless browser remains active, allowing JavaScript to continue executing, AJAX requests to complete, and dynamic content to render. This process ensures you capture:
  • Content loaded through delayed AJAX calls
  • Elements that appear after animations complete
  • Data populated by slow third-party APIs
  • Progressive loading sequences
  • Time-sensitive dynamic updates
The wait occurs after the initial DOM load but before the final HTML extraction, giving websites the necessary time to complete their loading processes.

Basic usage

Add the wait parameter with a value in milliseconds to your JavaScript rendering request:
This example waits 5 seconds (5000 milliseconds) after the page loads before capturing the HTML content. During this time, any JavaScript-driven content loading processes can complete.

When to use the Wait parameter

The Wait parameter is essential in these scenarios:

Content loading delays:

  • Slow API responses - Pages that fetch data from slow external APIs
  • Progressive content loading - Sites that load content in multiple stages
  • Heavy JavaScript processing - Pages with complex calculations or data processing
  • Third-party widgets - External content like maps, charts, or embedded media
  • Animation sequences - Content that appears after CSS or JavaScript animations

Timing-dependent content:

  • Real-time data - Stock prices, live scores, or updating counters
  • Lazy loading - Images or content that loads as needed
  • Scroll preparation - Initial content that loads before scroll triggers
  • Form validation - Dynamic form elements that appear based on user input simulation

Best practices

Start with reasonable defaults

Begin with moderate wait times and adjust based on results:
Python

Combine with other parameters for maximum effectiveness

Use Wait with Premium Proxy for protected sites:
Python

Troubleshooting

Common issues and solutions

Debugging missing content with Wait

When content is still missing despite using the Wait parameter:
1

Check browser behavior manually

  • Compare with manual browser testing
  • Open the page in a browser and time how long content takes to appear
  • Use that timing as your baseline wait duration
2

Increase wait time gradually

Python
3

Switch to the element-specific waiting (`wait_for`)

Python
See more on Wait_for documentation page

Understanding wait time limits

Zenrows has built-in limits for wait times to ensure service stability:
  • Maximum total wait time: 30 seconds (30,000 milliseconds)
  • Recommended range: 2,000 - 10,000 milliseconds (2-10 seconds)
  • Minimum practical wait: 1,000 milliseconds (1 second). Values below that are acceptable but impractical

Pricing

The wait parameter doesn’t increase the request cost. You pay the JavaScript Render (5 times the standard price) regardless of the wait value you choose.
You can monitor your Zenrows usage in multiple ways to stay informed about your account activity and prevent unexpected overages.Dashboard monitoring: View real-time usage statistics, remaining requests, success rates, and request history on your Analytics Page. You can also set up usage alerts in your notification settings to receive notifications when you approach your limits.Programmatic monitoring: For automated monitoring in your applications, call the /v1/subscriptions/self/details endpoint with your API key in the X-API-Key header. This returns real-time usage data that you can integrate into your monitoring systems. Learn more about the usage endpoint.Response header monitoring: Track your concurrency usage through response headers included with each request:
  • Concurrency-Limit: Your maximum concurrent requests
  • Concurrency-Remaining: Available concurrent request slots
  • X-Request-Cost: Cost of the current request

Frequently Asked Questions (FAQ)

The wait parameter introduces a fixed delay in milliseconds, while wait_for waits for a specific element to appear on the page. Use wait when you know content takes a particular amount of time to load, and wait_for when you want to wait for specific elements to appear.
No, the wait parameter only works with JavaScript rendering enabled. Without js_render=true, the wait parameter will be ignored since there’s no browser environment to pause within.
Test different wait times and monitor content length, as well as the presence of target elements. If content is missing, increase the wait time. If you’re getting complete content with shorter waits, you can reduce the time to improve efficiency.
Not necessarily. Different pages may have different loading characteristics. Product pages may require longer wait times than category pages. Consider implementing adaptive wait times based on page type or previous successful timings.
Yes, the wait parameter works perfectly with any other feature.
When using both wait and wait_for, the wait_for parameter takes precedence and overrides the wait parameter.