Add URLs to an open job
curl --request POST \
--url https://async.api.zenrows.com/v1/jobs/{job_id}/tasks \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"tasks": [
{
"url": "https://www.scrapingcourse.com/ecommerce/page/2/"
}
]
}
'import requests
url = "https://async.api.zenrows.com/v1/jobs/{job_id}/tasks"
payload = { "tasks": [{ "url": "https://www.scrapingcourse.com/ecommerce/page/2/" }] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tasks: [{url: 'https://www.scrapingcourse.com/ecommerce/page/2/'}]})
};
fetch('https://async.api.zenrows.com/v1/jobs/{job_id}/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://async.api.zenrows.com/v1/jobs/{job_id}/tasks';
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tasks: [{url: 'https://www.scrapingcourse.com/ecommerce/page/2/'}]})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://async.api.zenrows.com/v1/jobs/{job_id}/tasks"
payload := strings.NewReader("{\n \"tasks\": [\n {\n \"url\": \"https://www.scrapingcourse.com/ecommerce/page/2/\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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://async.api.zenrows.com/v1/jobs/{job_id}/tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tasks' => [
[
'url' => 'https://www.scrapingcourse.com/ecommerce/page/2/'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://async.api.zenrows.com/v1/jobs/{job_id}/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tasks\": [\n {\n \"url\": \"https://www.scrapingcourse.com/ecommerce/page/2/\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://async.api.zenrows.com/v1/jobs/{job_id}/tasks")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tasks\": [\n {\n \"url\": \"https://www.scrapingcourse.com/ecommerce/page/2/\"\n }\n ]\n}")
.asString();{
"accepted_tasks": 1,
"job_status": "closed",
"latest_run": {
"run_id": "01M4E06YS7VZPY4G25DV6FR3B8",
"job_id": "01M4E06YS7BDRECVN5QRHJA6HR",
"run_sequence": 1,
"status": "completed",
"trigger": "manual",
"last_batch_received": false,
"stats": {
"total": 3,
"completed": 3,
"successful": 3,
"failed": 0,
"spend": {
"credits": 3,
"cost": 0.00027
}
},
"created_at": "2026-10-08T14:55:52Z",
"updated_at": "2026-10-08T14:56:06Z"
}
}{
"code": "invalid_argument",
"detail": "Validation failed.",
"instance": "/v1",
"status": 400,
"title": "Validation failed (invalid_argument)",
"type": "https://docs.zenrows.com/api-error-codes#invalid_argument"
}{
"code": "unauthenticated",
"detail": "Invalid API key.",
"instance": "/v1",
"status": 401,
"title": "Unauthenticated (unauthenticated)",
"type": "https://docs.zenrows.com/api-error-codes#unauthenticated"
}{
"code": "payment_required",
"detail": "No credits available.",
"instance": "/v1",
"status": 402,
"title": "No credits available (payment_required)",
"type": "https://docs.zenrows.com/api-error-codes#payment_required"
}{
"code": "conflict",
"detail": "Job is closed.",
"instance": "/v1",
"status": 409,
"title": "Job is closed (conflict)",
"type": "https://docs.zenrows.com/api-error-codes#conflict"
}{
"code": "quota_exceeded",
"detail": "Too many active jobs.",
"instance": "/v1",
"status": 429,
"title": "Too many active jobs (quota_exceeded)",
"type": "https://docs.zenrows.com/api-error-codes#quota_exceeded"
}{
"code": "internal",
"detail": "Temporary failure, retry with backoff.",
"instance": "/v1",
"status": 503,
"title": "Temporary failure, retry with backoff (internal)",
"type": "https://docs.zenrows.com/api-error-codes#internal"
}Batch
Add URLs to an open job
Append up to 10,000 URLs to an open job. Send last_batch: true on the final call to close it; later additions then return 409. Can also return 409 for a few seconds while a very large submission is still being written: retry.
POST
/
jobs
/
{job_id}
/
tasks
Add URLs to an open job
curl --request POST \
--url https://async.api.zenrows.com/v1/jobs/{job_id}/tasks \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"tasks": [
{
"url": "https://www.scrapingcourse.com/ecommerce/page/2/"
}
]
}
'import requests
url = "https://async.api.zenrows.com/v1/jobs/{job_id}/tasks"
payload = { "tasks": [{ "url": "https://www.scrapingcourse.com/ecommerce/page/2/" }] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tasks: [{url: 'https://www.scrapingcourse.com/ecommerce/page/2/'}]})
};
fetch('https://async.api.zenrows.com/v1/jobs/{job_id}/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://async.api.zenrows.com/v1/jobs/{job_id}/tasks';
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tasks: [{url: 'https://www.scrapingcourse.com/ecommerce/page/2/'}]})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://async.api.zenrows.com/v1/jobs/{job_id}/tasks"
payload := strings.NewReader("{\n \"tasks\": [\n {\n \"url\": \"https://www.scrapingcourse.com/ecommerce/page/2/\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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://async.api.zenrows.com/v1/jobs/{job_id}/tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tasks' => [
[
'url' => 'https://www.scrapingcourse.com/ecommerce/page/2/'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://async.api.zenrows.com/v1/jobs/{job_id}/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tasks\": [\n {\n \"url\": \"https://www.scrapingcourse.com/ecommerce/page/2/\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://async.api.zenrows.com/v1/jobs/{job_id}/tasks")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tasks\": [\n {\n \"url\": \"https://www.scrapingcourse.com/ecommerce/page/2/\"\n }\n ]\n}")
.asString();{
"accepted_tasks": 1,
"job_status": "closed",
"latest_run": {
"run_id": "01M4E06YS7VZPY4G25DV6FR3B8",
"job_id": "01M4E06YS7BDRECVN5QRHJA6HR",
"run_sequence": 1,
"status": "completed",
"trigger": "manual",
"last_batch_received": false,
"stats": {
"total": 3,
"completed": 3,
"successful": 3,
"failed": 0,
"spend": {
"credits": 3,
"cost": 0.00027
}
},
"created_at": "2026-10-08T14:55:52Z",
"updated_at": "2026-10-08T14:56:06Z"
}
}{
"code": "invalid_argument",
"detail": "Validation failed.",
"instance": "/v1",
"status": 400,
"title": "Validation failed (invalid_argument)",
"type": "https://docs.zenrows.com/api-error-codes#invalid_argument"
}{
"code": "unauthenticated",
"detail": "Invalid API key.",
"instance": "/v1",
"status": 401,
"title": "Unauthenticated (unauthenticated)",
"type": "https://docs.zenrows.com/api-error-codes#unauthenticated"
}{
"code": "payment_required",
"detail": "No credits available.",
"instance": "/v1",
"status": 402,
"title": "No credits available (payment_required)",
"type": "https://docs.zenrows.com/api-error-codes#payment_required"
}{
"code": "conflict",
"detail": "Job is closed.",
"instance": "/v1",
"status": 409,
"title": "Job is closed (conflict)",
"type": "https://docs.zenrows.com/api-error-codes#conflict"
}{
"code": "quota_exceeded",
"detail": "Too many active jobs.",
"instance": "/v1",
"status": 429,
"title": "Too many active jobs (quota_exceeded)",
"type": "https://docs.zenrows.com/api-error-codes#quota_exceeded"
}{
"code": "internal",
"detail": "Temporary failure, retry with backoff.",
"instance": "/v1",
"status": 503,
"title": "Temporary failure, retry with backoff (internal)",
"type": "https://docs.zenrows.com/api-error-codes#internal"
}Authorizations
Batch, Crawl, the Extract endpoints and the account endpoint read the same key from the X-API-Key header.
Path Parameters
Identifier returned when the job was created.
Body
application/json
Was this page helpful?