Skip to main content
This guide shows you the most common web scraping scenarios and the exact parameters you need for each one. Use these ready-to-implement recipes to quickly solve your specific scraping challenges with Fetch.

Use Case Overview

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
The 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. Keep the Same IP Across Requests

Use the same session_id value to route multiple requests through the same IP for up to 10 minutes. session_id does not store cookies or other request data: read cookies from the Zr--prefixed response headers and send them back yourself on the next request if the flow needs them.
Python
This approach is essential for workflows where you need to maintain the same IP across requests.
Add session_id only to the requests that must share an IP, such as a login step followed by an authenticated page. On a protected site, a blocked IP makes every retry on that session fail the same way, so if a request comes back blocked, retry with a new session_id value instead of reusing the blocked one. Leave session_id off requests that don’t need IP continuity.
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
Returns clean, structured data:
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
This example routes your request through Germany, allowing you to see content as it appears to German users.
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 the original_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 the allowed_status_codes parameter to receive the actual HTML content even when the page returns error status codes.
Python

Add custom headers

Use custom headers to simulate browser behavior for more reliable access.
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: