Crawl website
curl --request POST \
--url https://app.dumplingai.com/api/v1/crawl \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com",
"limit": 5,
"depth": 2
}
'import requests
url = "https://app.dumplingai.com/api/v1/crawl"
payload = {
"url": "https://example.com",
"limit": 5,
"depth": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://example.com', limit: 5, depth: 2})
};
fetch('https://app.dumplingai.com/api/v1/crawl', 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://app.dumplingai.com/api/v1/crawl",
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([
'url' => 'https://example.com',
'limit' => 5,
'depth' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.dumplingai.com/api/v1/crawl"
payload := strings.NewReader("{\n \"url\": \"https://example.com\",\n \"limit\": 5,\n \"depth\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.dumplingai.com/api/v1/crawl")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com\",\n \"limit\": 5,\n \"depth\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/crawl")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com\",\n \"limit\": 5,\n \"depth\": 2\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>",
"format": "markdown",
"depth": 123,
"limit": 123,
"pages": 123,
"results": [
{}
],
"creditUsage": 123
}{
"error": "<string>"
}{
"error": "<string>"
}Web Scraping
Crawl Website
Crawl a site or sitemap and return captured pages with metadata.
POST
/
api
/
v1
/
crawl
Crawl website
curl --request POST \
--url https://app.dumplingai.com/api/v1/crawl \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com",
"limit": 5,
"depth": 2
}
'import requests
url = "https://app.dumplingai.com/api/v1/crawl"
payload = {
"url": "https://example.com",
"limit": 5,
"depth": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://example.com', limit: 5, depth: 2})
};
fetch('https://app.dumplingai.com/api/v1/crawl', 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://app.dumplingai.com/api/v1/crawl",
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([
'url' => 'https://example.com',
'limit' => 5,
'depth' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.dumplingai.com/api/v1/crawl"
payload := strings.NewReader("{\n \"url\": \"https://example.com\",\n \"limit\": 5,\n \"depth\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.dumplingai.com/api/v1/crawl")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com\",\n \"limit\": 5,\n \"depth\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/crawl")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com\",\n \"limit\": 5,\n \"depth\": 2\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>",
"format": "markdown",
"depth": 123,
"limit": 123,
"pages": 123,
"results": [
{}
],
"creditUsage": 123
}{
"error": "<string>"
}{
"error": "<string>"
}Description
This endpoint crawls a website and returns structured content from multiple pages.Endpoint
POST https://app.dumplingai.com/api/v1/crawl
Headers
- Content-Type:
application/json - Authorization: Bearer
<API_KEY>(required)
Request Body
{
"url": "string", // Required. The website URL to crawl
"limit": "number", // Optional. Max pages to crawl (default: 5)
"depth": "number", // Optional. Crawl depth (default: 2)
"format": "string" // Optional. Output format: "markdown", "text", or "raw" (default: "markdown")
}
Responses
Success (200)
{
"url": "string",
"format": "string",
"depth": "number",
"limit": "number",
"pages": "number",
"results": [
{
"content": "string",
"url": "string",
"status": "number"
}
],
"creditUsage": "number"
}
Example Request
curl -X POST https://app.dumplingai.com/api/v1/crawl \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"url": "https://example.com",
"limit": 10,
"depth": 3,
"format": "markdown"
}'
Notes
- Uses 10 credits per crawled page
- Uses anti-bot measures and stealth crawling techniques
- Limit is the max number of pages to crawl
- Depth refers to the distance between the base URL path and sub paths
Rate Limiting
Rate limit headers (X-RateLimit-Limit and X-RateLimit-Remaining) are included in the response.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Parameters controlling a crawl job.
Root URL to crawl.
Maximum crawl depth.
Required range:
x >= 1Maximum number of pages to fetch.
Required range:
x >= 1Output format for the crawled pages.
Available options:
markdown, text, raw Optional request source identifier.