Wait (Delay)
Add time-based delays to your scraping workflow to allow pages to load or simulate human behavior.Basic Wait
Add a simple delay before extracting content:Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "wait" |
duration | integer | Yes | Wait time in milliseconds |
Use Cases
Page Load Delays
Wait for slow-loading pages:Human-like Behavior
Simulate natural browsing patterns:Rate Limiting
Add delays between actions to avoid rate limits:Best Practices
Optimal Wait Times
- Short delays (500-1000ms) - For fast-loading elements
- Medium delays (2000-5000ms) - For complex page loads
- Long delays (5000ms+) - For very slow or heavy pages
Performance Considerations
- Use sparingly - Unnecessary waits slow down scraping
- Combine with other wait types - Use
wait_for_selectorwhen possible - Monitor timeouts - Ensure total request time stays reasonable
Error Handling
SDK Examples
Node.js
Python
Related Actions
- Wait for Selector - Wait for specific elements
- Wait and Click - Wait then click elements
- Scroll - Scroll page content

