Start a batch scrape
curl --request POST \
--url https://api.beecrawl.dev/batch/scrape \
--header 'Content-Type: application/json' \
--header 'X-Web-Extract-Api-Key: <api-key>' \
--data '
{
"urls": [
"<string>"
],
"timeout_seconds": 30,
"wait_for_ms": 0,
"use_browser": "auto",
"maxRetries": 2
}
'import requests
url = "https://api.beecrawl.dev/batch/scrape"
payload = {
"urls": ["<string>"],
"timeout_seconds": 30,
"wait_for_ms": 0,
"use_browser": "auto",
"maxRetries": 2
}
headers = {
"X-Web-Extract-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-Web-Extract-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
urls: ['<string>'],
timeout_seconds: 30,
wait_for_ms: 0,
use_browser: 'auto',
maxRetries: 2
})
};
fetch('https://api.beecrawl.dev/batch/scrape', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.beecrawl.dev/batch/scrape",
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([
'urls' => [
'<string>'
],
'timeout_seconds' => 30,
'wait_for_ms' => 0,
'use_browser' => 'auto',
'maxRetries' => 2
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Web-Extract-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.beecrawl.dev/batch/scrape"
payload := strings.NewReader("{\n \"urls\": [\n \"<string>\"\n ],\n \"timeout_seconds\": 30,\n \"wait_for_ms\": 0,\n \"use_browser\": \"auto\",\n \"maxRetries\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Web-Extract-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))
}HttpResponse<String> response = Unirest.post("https://api.beecrawl.dev/batch/scrape")
.header("X-Web-Extract-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"<string>\"\n ],\n \"timeout_seconds\": 30,\n \"wait_for_ms\": 0,\n \"use_browser\": \"auto\",\n \"maxRetries\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beecrawl.dev/batch/scrape")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Web-Extract-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"urls\": [\n \"<string>\"\n ],\n \"timeout_seconds\": 30,\n \"wait_for_ms\": 0,\n \"use_browser\": \"auto\",\n \"maxRetries\": 2\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"total": 123
}Async jobs
Start a batch scrape
POST
/
batch
/
scrape
Start a batch scrape
curl --request POST \
--url https://api.beecrawl.dev/batch/scrape \
--header 'Content-Type: application/json' \
--header 'X-Web-Extract-Api-Key: <api-key>' \
--data '
{
"urls": [
"<string>"
],
"timeout_seconds": 30,
"wait_for_ms": 0,
"use_browser": "auto",
"maxRetries": 2
}
'import requests
url = "https://api.beecrawl.dev/batch/scrape"
payload = {
"urls": ["<string>"],
"timeout_seconds": 30,
"wait_for_ms": 0,
"use_browser": "auto",
"maxRetries": 2
}
headers = {
"X-Web-Extract-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-Web-Extract-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
urls: ['<string>'],
timeout_seconds: 30,
wait_for_ms: 0,
use_browser: 'auto',
maxRetries: 2
})
};
fetch('https://api.beecrawl.dev/batch/scrape', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.beecrawl.dev/batch/scrape",
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([
'urls' => [
'<string>'
],
'timeout_seconds' => 30,
'wait_for_ms' => 0,
'use_browser' => 'auto',
'maxRetries' => 2
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Web-Extract-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.beecrawl.dev/batch/scrape"
payload := strings.NewReader("{\n \"urls\": [\n \"<string>\"\n ],\n \"timeout_seconds\": 30,\n \"wait_for_ms\": 0,\n \"use_browser\": \"auto\",\n \"maxRetries\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Web-Extract-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))
}HttpResponse<String> response = Unirest.post("https://api.beecrawl.dev/batch/scrape")
.header("X-Web-Extract-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"<string>\"\n ],\n \"timeout_seconds\": 30,\n \"wait_for_ms\": 0,\n \"use_browser\": \"auto\",\n \"maxRetries\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beecrawl.dev/batch/scrape")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Web-Extract-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"urls\": [\n \"<string>\"\n ],\n \"timeout_seconds\": 30,\n \"wait_for_ms\": 0,\n \"use_browser\": \"auto\",\n \"maxRetries\": 2\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"total": 123
}Authorizations
API key. X-Api-Key and Bearer authentication are also accepted.
Body
application/json
⌘I