curl --request PUT \
--url 'https://api.zenrows.com/v1/?apikey=' \
--header 'Content-Type: application/x-www-form-urlencoded'import requests
url = "https://api.zenrows.com/v1/?apikey="
payload = {}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({})
};
fetch('https://api.zenrows.com/v1/?apikey=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const encodedParams = new URLSearchParams();
const url = 'https://api.zenrows.com/v1/?apikey=';
const options = {
method: 'PUT',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: encodedParams
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zenrows.com/v1/?apikey="
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zenrows.com/v1/?apikey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.zenrows.com/v1/?apikey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.put("https://api.zenrows.com/v1/?apikey=")
.header("Content-Type", "application/x-www-form-urlencoded")
.asString();<!doctype html>
<html lang="en-US">
<head>
<title>Ecommerce Test Site to Learn Web Scraping</title>
</head>
<body>
<h1>Shop</h1>
...
</body>
</html>{
"code": "REQS004",
"instance": "/v1",
"status": 400,
"title": "Invalid value provided for 'js_render' parameter; invalid boolean value 'maybe' (REQS004)",
"type": "https://docs.zenrows.com/api-error-codes#REQS004"
}{
"code": "AUTH002",
"detail": "Invalid API key.",
"instance": "/v1",
"status": 401,
"title": "Invalid apikey provided (AUTH002)",
"type": "https://docs.zenrows.com/api-error-codes#AUTH002"
}{
"code": "AUTH004",
"detail": "This account has used all its credits for the period. Upgrade or add credits to continue.",
"instance": "/v1",
"status": 402,
"title": "Usage exceeded (AUTH004)",
"type": "https://docs.zenrows.com/api-error-codes#AUTH004"
}{
"code": "REQS007",
"detail": "Extract has not been prepared for example.org yet. Ask for it with POST /v1/extract/prepared-domains, then retry once it reports ready. GET /v1/extract/domains lists what Extract serves today.",
"instance": "/v1",
"status": 403,
"title": "Extract is not prepared for the requested domain (example.org) (REQS007)",
"type": "https://docs.zenrows.com/api-error-codes#REQS007"
}{
"code": "RESP001",
"detail": "The target could not be returned under this configuration. Try js_render=true and premium_proxy=true, or mode=auto.",
"instance": "/v1",
"status": 422,
"title": "Could not get content (RESP001)",
"type": "https://docs.zenrows.com/api-error-codes#RESP001"
}{
"code": "AUTH008",
"detail": "Every concurrency slot on the plan is in use. Retry when a request in flight finishes.",
"instance": "/v1",
"status": 429,
"title": "Concurrency limit reached (AUTH008)",
"type": "https://docs.zenrows.com/api-error-codes#AUTH008"
}Fetch a page with a PUT
Send a PUT to the target through Zenrows. Takes the same query parameters as fetchPage; the request body is forwarded to the target as is, and the response carries the target’s content.
curl --request PUT \
--url 'https://api.zenrows.com/v1/?apikey=' \
--header 'Content-Type: application/x-www-form-urlencoded'import requests
url = "https://api.zenrows.com/v1/?apikey="
payload = {}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({})
};
fetch('https://api.zenrows.com/v1/?apikey=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const encodedParams = new URLSearchParams();
const url = 'https://api.zenrows.com/v1/?apikey=';
const options = {
method: 'PUT',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: encodedParams
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zenrows.com/v1/?apikey="
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zenrows.com/v1/?apikey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.zenrows.com/v1/?apikey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.put("https://api.zenrows.com/v1/?apikey=")
.header("Content-Type", "application/x-www-form-urlencoded")
.asString();<!doctype html>
<html lang="en-US">
<head>
<title>Ecommerce Test Site to Learn Web Scraping</title>
</head>
<body>
<h1>Shop</h1>
...
</body>
</html>{
"code": "REQS004",
"instance": "/v1",
"status": 400,
"title": "Invalid value provided for 'js_render' parameter; invalid boolean value 'maybe' (REQS004)",
"type": "https://docs.zenrows.com/api-error-codes#REQS004"
}{
"code": "AUTH002",
"detail": "Invalid API key.",
"instance": "/v1",
"status": 401,
"title": "Invalid apikey provided (AUTH002)",
"type": "https://docs.zenrows.com/api-error-codes#AUTH002"
}{
"code": "AUTH004",
"detail": "This account has used all its credits for the period. Upgrade or add credits to continue.",
"instance": "/v1",
"status": 402,
"title": "Usage exceeded (AUTH004)",
"type": "https://docs.zenrows.com/api-error-codes#AUTH004"
}{
"code": "REQS007",
"detail": "Extract has not been prepared for example.org yet. Ask for it with POST /v1/extract/prepared-domains, then retry once it reports ready. GET /v1/extract/domains lists what Extract serves today.",
"instance": "/v1",
"status": 403,
"title": "Extract is not prepared for the requested domain (example.org) (REQS007)",
"type": "https://docs.zenrows.com/api-error-codes#REQS007"
}{
"code": "RESP001",
"detail": "The target could not be returned under this configuration. Try js_render=true and premium_proxy=true, or mode=auto.",
"instance": "/v1",
"status": 422,
"title": "Could not get content (RESP001)",
"type": "https://docs.zenrows.com/api-error-codes#RESP001"
}{
"code": "AUTH008",
"detail": "Every concurrency slot on the plan is in use. Retry when a request in flight finishes.",
"instance": "/v1",
"status": 429,
"title": "Concurrency limit reached (AUTH008)",
"type": "https://docs.zenrows.com/api-error-codes#AUTH008"
}Authorizations
Query Parameters
Adaptive Stealth Mode. auto starts from the cheapest viable configuration and escalates to JavaScript rendering or premium proxies only when the target requires it. You are billed for the configuration that succeeds. It manages js_render and premium_proxy itself, so setting either alongside it answers 400 REQS004; proxy_country is allowed.
auto Return structured JSON extracted from the page with no selectors to write (Extract). Omit it and Extract is off. auto and native return the website's own field names; standard returns a canonical schema shared by every website in a vertical (real estate only for now). Extract works on any prepared domain, with any active API key (prepare a new one with POST /extract/prepared-domains), and is currently free on top of the Fetch cost. A domain, or a kind of page on it, that is not prepared yet answers 403 REQS007: see requestExtractDomain.
auto, native, standard Body
Forwarded to the target as is.
The body is of type object.
Response
The target's content, in the shape the request asked for: HTML by default, Markdown or plaintext with response_type, a PDF or PNG/JPEG binary for response_type=pdf and the screenshot parameters, and JSON for extract, css_extractor, autoparse or json_response.
The page as returned by the target.
Was this page helpful?