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
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.
2. Maintain a Session Across Requests
Use the samesession_id value to maintain cookies and session state across multiple requests.
Python
3. Extract Specific Fields Only
Instead of getting the full HTML, extract only the data you need using CSS selectors.Python
JSON
4. Scrape Localized Content
Access geo-restricted content or get localized pricing by routing your request through specific countries.Python
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
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
Add custom headers
Use custom headers to simulate browser behavior for more reliable access.Python
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