Use Case Overview
Use Case | Key Parameters | When You Need This |
---|---|---|
Load dynamic pages (SPAs, dashboards, infinite scroll) | js_render , wait_for , block_resources , js_instructions | When content loads via JavaScript or requires user interaction |
Keep session/IP across requests | session_id , custom_headers | For multi-step workflows like account access → search → checkout |
Submit forms or simulate user actions | js_instructions , js_render , wait_for | When you need to click buttons, fill forms, or navigate pages |
Access geo-restricted content | premium_proxy , proxy_country | When content varies by location or is region-locked |
Handle pagination and infinite scroll | js_render , js_instructions , wait_for | When content loads dynamically as you scroll or click “Load More” |
Extract only specific data fields | css_extractor , autoparse , outputs | When you want structured data instead of full HTML |
Capture API calls and background requests | json_response , js_render , wait_for | When the data you need comes from AJAX/XHR requests |
Bypass anti-bot protection | premium_proxy , js_render , custom_headers , session_id | When sites use Cloudflare or other bot detection |
Debug failed requests | original_status , allowed_status_codes , screenshot | When requests fail and you need to understand why |
Optimize performance and costs | block_resources , outputs , wait_for | When you want faster responses and lower bandwidth usage |
Code Recipes
1. Search for products using the search form
This example shows how to automatically fill and submit a search form, then wait for the search results to load.Python
js_instructions
parameter fills the search field with “hoodie”, clicks the search button, and waits for the main content area to load with search results before returning the content.
Head to the JS Instructions Documentation for more details.
2. Maintain a Session Across Requests
Use the samesession_id
value to maintain cookies and session state across multiple requests.
Python
Learn more about the
session_id
parameter here.3. Extract Specific Fields Only
Instead of getting the full HTML, extract only the data you need using CSS selectors.Python
JSON
Check the CSS Extractor Documentation for more details.
4. Scrape Localized Content
Access geo-restricted content or get localized pricing by routing your request through specific countries.Python
Find more details about geolocation on the Proxy Country Documentation.
5. Debugging a Blocked Request
When requests fail, use these parameters to understand what’s happening without losing the response data.Check the actual HTTP status
Use theoriginal_status
parameter to see the real HTTP status code the target page returns.
Python
Check more about the
original_status
parameter here.Allow specific error status codes
Use theallowed_status_codes
parameter to receive the actual HTML content even when the page returns error status codes.
Python
Find out more on the Allowed Status Codes Documentation.
Add custom headers
Use custom headers to simulate browser behavior and avoid detection.Python
ZenRows handles all browser-based headers. To find out more about it, check our Headers Documentation.
What’s Next
Ready to implement these recipes? Here are your next steps:- Explore the Parameter Reference
- Follow the First Request Guide
- Jump back to Welcome