The Node.js SDK currently only exposes
get() and post(). There is no put() method. If you need to send a PUT request, see Sending a PUT request below.client.get(), the SDK exposes client.post() for targets that expect a form submission or a data payload. It accepts the same config object as get, plus a third argument for headers and data.
Basic usage
When to use POST
- POST: submitting a form on the target site, triggering a search that requires a form submission, or calling a write endpoint on a target API.
- GET (most cases): reading page content only needs
client.get(). Reach for POST specifically when the target requires it.
Sending JSON instead of form data
Pass a plain object asdata and override the Content-Type header to application/json. The SDK JSON.stringifys any object passed as data:
Combining with request parameters
The config object (first argument after the URL) still works the same way it does for GET requests, so you can enablepremium_proxy or other Universal Scraper API parameters:
Sending a PUT request
The SDK doesn’t expose aput() method, so call the ZenRows API directly with native fetch for PUT:
put() natively.
Troubleshooting
- Target site doesn’t reflect the submitted data: Some forms require specific headers (like a
Referer) 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, andPUTat the API level; confirm the target expects one of these. - Body doesn’t match Content-Type: If
datais a plain object, it’s sent as JSON regardless of whatContent-Typeyou set. Either encode it as a string withURLSearchParamsfor form submissions, or explicitly setContent-Type: application/jsonwhen passing an object.
Pricing
POST requests are billed the same way as GET requests. Cost depends on the config you use, not the HTTP method:| Configuration | Cost multiplier vs. basic |
|---|---|
| Basic request | 1x |
premium_proxy: true | 10x |
FAQ (Frequently Asked Questions)
Does the SDK support PUT or DELETE?
Does the SDK support PUT or DELETE?
No. Only
GET and POST are exposed as methods on the ZenRows class. See Sending a PUT request for a workaround using native fetch.Can I send both a config object and data in the same request?
Can I send both a config object and data in the same request?
Yes. The config object (ZenRows/API options like
premium_proxy) and data (the payload sent to the target) are independent arguments and can be combined.How do I send multipart/form-data (file uploads)?
How do I send multipart/form-data (file uploads)?
The SDK doesn’t support this directly. Any object passed as
data is run through JSON.stringify(), which doesn’t serialize a FormData instance correctly. For file uploads, call the ZenRows API directly with native fetch and a FormData body instead, the same way as the PUT workaround above.