requests, but adds a few conveniences developers ask for on every scraping project: automatic retries, built-in concurrency control, and async/await support.
If you’re already comfortable making requests with Python’s
requests library, the SDK will feel familiar. Every call still returns a standard requests.Response object, so nothing about how you read the response changes.What the SDK handles for you
- Authentication – your API key is set once in the client constructor, not repeated on every call.
- Retries – optionally retry failed requests (
429,500,502,503,504, and422) with exponential backoff, without writing retry logic yourself. - Concurrency – cap how many requests run in parallel to match your ZenRows plan’s concurrency limit.
- Async support –
get_async,post_async, andput_asyncmethods for running many requests concurrently withasyncio.
What you’ll need
Python 3.6+
Any Python version from 3.6 onward works.
API key
Create a free account to get yours, no credit card required.
The SDK only covers the Universal Scraper API’s GET, POST, and PUT modes. For the full list of request parameters (
js_render, premium_proxy, css_extractor, and so on), see the Universal Scraper API setup guide. Every parameter documented there works the same way through the SDK’s params argument.Explore the Python SDK
Installation
Install the package and get your API key.
Quickstart
Make your first request in a few lines of code.
POST and PUT Requests
Submit forms or data payloads.
Async Requests and Concurrency
Scrape many URLs in parallel with
asyncio.Error Handling and Retries
Configure automatic retries and handle failures.
The Response Object
What you get back from every request.
Custom Headers
Forward specific headers to the target site.
FAQ
Answers to common questions.