Scrape webpage
curl --request POST \
--url https://app.dumplingai.com/api/v1/scrape \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/article",
"format": "markdown",
"cleaned": true,
"renderJs": true
}
'import requests
url = "https://app.dumplingai.com/api/v1/scrape"
payload = {
"url": "https://example.com/article",
"format": "markdown",
"cleaned": True,
"renderJs": True
}
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/article',
format: 'markdown',
cleaned: true,
renderJs: true
})
};
fetch('https://app.dumplingai.com/api/v1/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://app.dumplingai.com/api/v1/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([
'url' => 'https://example.com/article',
'format' => 'markdown',
'cleaned' => true,
'renderJs' => true
]),
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/scrape"
payload := strings.NewReader("{\n \"url\": \"https://example.com/article\",\n \"format\": \"markdown\",\n \"cleaned\": true,\n \"renderJs\": true\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/scrape")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/article\",\n \"format\": \"markdown\",\n \"cleaned\": true,\n \"renderJs\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/scrape")
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/article\",\n \"format\": \"markdown\",\n \"cleaned\": true,\n \"renderJs\": true\n}"
response = http.request(request)
puts response.read_body{
"title": "<string>",
"url": "<string>",
"content": "<string>",
"metadata": {}
}{
"error": "<string>"
}{
"error": "<string>"
}Web Scraping
Scrape
Fetch structured data and HTML from a URL using DumplingAI’s scraper.
POST
/
api
/
v1
/
scrape
Scrape webpage
curl --request POST \
--url https://app.dumplingai.com/api/v1/scrape \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/article",
"format": "markdown",
"cleaned": true,
"renderJs": true
}
'import requests
url = "https://app.dumplingai.com/api/v1/scrape"
payload = {
"url": "https://example.com/article",
"format": "markdown",
"cleaned": True,
"renderJs": True
}
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/article',
format: 'markdown',
cleaned: true,
renderJs: true
})
};
fetch('https://app.dumplingai.com/api/v1/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://app.dumplingai.com/api/v1/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([
'url' => 'https://example.com/article',
'format' => 'markdown',
'cleaned' => true,
'renderJs' => true
]),
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/scrape"
payload := strings.NewReader("{\n \"url\": \"https://example.com/article\",\n \"format\": \"markdown\",\n \"cleaned\": true,\n \"renderJs\": true\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/scrape")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/article\",\n \"format\": \"markdown\",\n \"cleaned\": true,\n \"renderJs\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/scrape")
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/article\",\n \"format\": \"markdown\",\n \"cleaned\": true,\n \"renderJs\": true\n}"
response = http.request(request)
puts response.read_body{
"title": "<string>",
"url": "<string>",
"content": "<string>",
"metadata": {}
}{
"error": "<string>"
}{
"error": "<string>"
}Description
This endpoint allows users to scrape data from a specified URL, format the scraped data, and optionally clean it before returning the result.Endpoint
POST https://app.dumplingai.com/api/v1/scrape
Headers
- Content-Type:
application/json - Authorization: Bearer
<API_KEY>(required)
Request Body
{
"url": "string", // Required. The URL to scrape.
"format": "string", // Optional. The format of the output. Valid values: "markdown", "html", "screenshot".
"cleaned": "boolean", // Optional. Whether the output should be cleaned.
"renderJs": "boolean" // Optional. Whether to render JavaScript before scraping. Default is true.
}
Responses
Success (200)
Returns the scraped data in the specified format.{
"title": "string",
"metadata": "object",
"url": "string",
"format": "string", // "markdown", "html", "screenshot"
"cleaned": "boolean",
"content": "string"
}
Content-Type: application/json- X-RateLimit-Limit: The rate limit for the user.
- X-RateLimit-Remaining: The remaining number of requests for the user.
Example Request
curl -X POST https://app.dumplingai.com/api/v1/scrape \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"url": "https://example.com",
"format": "markdown",
"cleaned": true,
"renderJs": true
}'
Rate Limiting
Rate limit headers (X-RateLimit-Limit and X-RateLimit-Remaining) are included in the response to indicate the user’s current rate limit status.
Notes
- This endpoint uses 10 credits per request.
- Disable JavaScript rendering by setting
renderJstofalsefor faster results if you don’t need it.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The URL to scrape
Output format for the scraped content
Available options:
markdown, html, screenshot Whether to return cleaned/simplified content
Whether to execute JavaScript on the page before scraping
Optional identifier describing where the API request originated.
Available options:
API, WEB, MAKE_DOT_COM, ZAPIER, N8N, PLAYGROUND, DEFAULT_AUTOMATION, AGENT_PREVIEW, AGENT_LIVE, AUTOPILOT, STUDIO