Stop a crawl
curl --request POST \
--url https://api.zenrows.com/v1/crawls/{crawl_id}/stop \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.zenrows.com/v1/crawls/{crawl_id}/stop"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.zenrows.com/v1/crawls/{crawl_id}/stop', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.zenrows.com/v1/crawls/{crawl_id}/stop';
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
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/crawls/{crawl_id}/stop"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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/crawls/{crawl_id}/stop",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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://api.zenrows.com/v1/crawls/{crawl_id}/stop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://api.zenrows.com/v1/crawls/{crawl_id}/stop")
.header("X-API-Key", "<api-key>")
.asString();{
"crawl_id": "c_01M3XP7RZD4JT88F7PNPGBFRAF",
"status": "stopped",
"stop_reason": "user",
"finished_at": "2026-10-09T09:01:30Z"
}{
"code": "unknown_parameter",
"title": "Unknown parameter",
"detail": "The request has a parameter this endpoint does not accept: limit.",
"status": 400,
"instance": "urn:zenrows:request:9ac5b40be6127c8809b91babda784059"
}{
"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": "crawl_not_found",
"title": "Crawl not found",
"detail": "No crawl with this identifier exists for this account.",
"status": 404,
"instance": "urn:zenrows:request:9ac5b40be6127c8809b91babda784059"
}{
"code": "too_many_crawls",
"title": "Too many active crawls",
"detail": "Your account already runs 3 active jobs. Wait for one to end, then start the crawl again.",
"status": 429,
"instance": "urn:zenrows:request:9ac5b40be6127c8809b91babda784059"
}{
"code": "internal_error",
"title": "Internal error",
"detail": "Something failed on our side. Retry later.",
"status": 500,
"instance": "urn:zenrows:request:9ac5b40be6127c8809b91babda784059"
}Crawl
Stop a crawl
Stop a running crawl. No new page is fetched; pages already being fetched finish, are billed and are kept for up to 10 minutes. Read the crawl until next_cursor is null for its final results. A crawl that already ended returns its final state. Send no body. Documented at https://docs.zenrows.com/crawl/endpoints#stop-a-crawl.
POST
/
crawls
/
{crawl_id}
/
stop
Stop a crawl
curl --request POST \
--url https://api.zenrows.com/v1/crawls/{crawl_id}/stop \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.zenrows.com/v1/crawls/{crawl_id}/stop"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.zenrows.com/v1/crawls/{crawl_id}/stop', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.zenrows.com/v1/crawls/{crawl_id}/stop';
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
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/crawls/{crawl_id}/stop"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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/crawls/{crawl_id}/stop",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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://api.zenrows.com/v1/crawls/{crawl_id}/stop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://api.zenrows.com/v1/crawls/{crawl_id}/stop")
.header("X-API-Key", "<api-key>")
.asString();{
"crawl_id": "c_01M3XP7RZD4JT88F7PNPGBFRAF",
"status": "stopped",
"stop_reason": "user",
"finished_at": "2026-10-09T09:01:30Z"
}{
"code": "unknown_parameter",
"title": "Unknown parameter",
"detail": "The request has a parameter this endpoint does not accept: limit.",
"status": 400,
"instance": "urn:zenrows:request:9ac5b40be6127c8809b91babda784059"
}{
"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": "crawl_not_found",
"title": "Crawl not found",
"detail": "No crawl with this identifier exists for this account.",
"status": 404,
"instance": "urn:zenrows:request:9ac5b40be6127c8809b91babda784059"
}{
"code": "too_many_crawls",
"title": "Too many active crawls",
"detail": "Your account already runs 3 active jobs. Wait for one to end, then start the crawl again.",
"status": 429,
"instance": "urn:zenrows:request:9ac5b40be6127c8809b91babda784059"
}{
"code": "internal_error",
"title": "Internal error",
"detail": "Something failed on our side. Retry later.",
"status": 500,
"instance": "urn:zenrows:request:9ac5b40be6127c8809b91babda784059"
}Authorizations
apiKeyHeaderapiKeyQuery
Batch, Crawl, the Extract endpoints and the account endpoint read the same key from the X-API-Key header.
Path Parameters
The crawl's ID, as returned when it started.
Was this page helpful?