client.get(), the SDK exposes client.post() and client.put() for targets that expect a form submission or a data payload. Both accept the same params and headers arguments as get, plus a data argument for the request body.
Basic usage
client.put() works identically, replacing .post with .put:
When to use POST or PUT
- POST: submitting a form on the target site, triggering a search or filter that requires a form submission, or calling a write endpoint on a target API.
- PUT: updating a resource on a target API that expects
PUTsemantics. - Neither: most scraping tasks (reading page content) only need
client.get(). Reach for POST/PUT specifically when the target requires it, not by default.
- POST
- PUT
Combining with request parameters
params still works the same way it does for GET requests, so you can enable premium_proxy, or other Universal Scraper API parameters alongside data:
json={...} as an extra keyword argument. It’s forwarded straight to the underlying requests call: client.post(url, json={"key1": "value1"}).
post and put also have async counterparts, post_async and put_async. See Async Requests and Concurrency.Troubleshooting
- Target site doesn’t reflect the submitted data: Some forms require specific headers (like
Content-Typeor aReferer) to accept the submission. See Custom Headers. - Getting
REQS005 Method Not Allowed: The target endpoint doesn’t accept the HTTP verb you’re using. ZenRows only supportsGET,POST, andPUT; confirm the target expects one of these. dataisn’t being sent as expected:datais form-encoded by default (like an HTML form submit). If the target expects JSON, use thejson=keyword argument instead, notdata=.
Pricing
POST and PUT requests are billed the same way as GET requests. Cost depends on theparams you use, not the HTTP method:
| Configuration | Cost multiplier vs. basic |
|---|---|
| Basic request | 1x |
premium_proxy=True | 10x |
FAQ (Frequently Asked Questions)
Can I send both params and data in the same request?
Can I send both params and data in the same request?
Yes.
params (ZenRows/API options like premium_proxy) and data (the payload sent to the target) are independent arguments and can be combined.Does ZenRows support DELETE or PATCH?
Does ZenRows support DELETE or PATCH?
No. Only
GET, POST, and PUT are supported by the Universal Scraper API and this SDK.How do I send multipart/form-data (file uploads)?
How do I send multipart/form-data (file uploads)?
Pass
files={...} as an extra keyword argument, forwarded directly to requests: client.post(url, files={"file": open("photo.jpg", "rb")}).