curl --request POST \
--url https://api.firecrawl.dev/v2/scrape \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"actions": [
{
"milliseconds": 2,
"type": "wait"
}
],
"blockAds": true,
"excludeTags": [
"<string>"
],
"formats": [
"markdown"
],
"headers": {},
"includeTags": [
"<string>"
],
"location": {
"country": "US",
"languages": [
"en-US"
]
},
"lockdown": false,
"maxAge": 172800000,
"minAge": 123,
"mobile": false,
"onlyCleanContent": false,
"onlyMainContent": true,
"parsers": [
"pdf"
],
"proxy": "auto",
"redactPII": false,
"removeBase64Images": true,
"skipTlsVerification": true,
"storeInCache": true,
"threatProtection": {
"blacklist": [
"<string>"
],
"blockedTlds": [
"<string>"
],
"riskScoreThreshold": 75,
"whitelist": [
"<string>"
]
},
"timeout": 60000,
"waitFor": 0,
"zeroDataRetention": false
}
'import requests
url = "https://api.firecrawl.dev/v2/scrape"
payload = {
"url": "<string>",
"actions": [
{
"milliseconds": 2,
"type": "wait"
}
],
"blockAds": True,
"excludeTags": ["<string>"],
"formats": ["markdown"],
"headers": {},
"includeTags": ["<string>"],
"location": {
"country": "US",
"languages": ["en-US"]
},
"lockdown": False,
"maxAge": 172800000,
"minAge": 123,
"mobile": False,
"onlyCleanContent": False,
"onlyMainContent": True,
"parsers": ["pdf"],
"proxy": "auto",
"redactPII": False,
"removeBase64Images": True,
"skipTlsVerification": True,
"storeInCache": True,
"threatProtection": {
"blacklist": ["<string>"],
"blockedTlds": ["<string>"],
"riskScoreThreshold": 75,
"whitelist": ["<string>"]
},
"timeout": 60000,
"waitFor": 0,
"zeroDataRetention": False
}
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: '<string>',
actions: [{milliseconds: 2, type: 'wait'}],
blockAds: true,
excludeTags: ['<string>'],
formats: ['markdown'],
headers: {},
includeTags: ['<string>'],
location: {country: 'US', languages: ['en-US']},
lockdown: false,
maxAge: 172800000,
minAge: 123,
mobile: false,
onlyCleanContent: false,
onlyMainContent: true,
parsers: ['pdf'],
proxy: 'auto',
redactPII: false,
removeBase64Images: true,
skipTlsVerification: true,
storeInCache: true,
threatProtection: {
blacklist: ['<string>'],
blockedTlds: ['<string>'],
riskScoreThreshold: 75,
whitelist: ['<string>']
},
timeout: 60000,
waitFor: 0,
zeroDataRetention: false
})
};
fetch('https://api.firecrawl.dev/v2/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.firecrawl.dev/v2/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' => '<string>',
'actions' => [
[
'milliseconds' => 2,
'type' => 'wait'
]
],
'blockAds' => true,
'excludeTags' => [
'<string>'
],
'formats' => [
'markdown'
],
'headers' => [
],
'includeTags' => [
'<string>'
],
'location' => [
'country' => 'US',
'languages' => [
'en-US'
]
],
'lockdown' => false,
'maxAge' => 172800000,
'minAge' => 123,
'mobile' => false,
'onlyCleanContent' => false,
'onlyMainContent' => true,
'parsers' => [
'pdf'
],
'proxy' => 'auto',
'redactPII' => false,
'removeBase64Images' => true,
'skipTlsVerification' => true,
'storeInCache' => true,
'threatProtection' => [
'blacklist' => [
'<string>'
],
'blockedTlds' => [
'<string>'
],
'riskScoreThreshold' => 75,
'whitelist' => [
'<string>'
]
],
'timeout' => 60000,
'waitFor' => 0,
'zeroDataRetention' => false
]),
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://api.firecrawl.dev/v2/scrape"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"actions\": [\n {\n \"milliseconds\": 2,\n \"type\": \"wait\"\n }\n ],\n \"blockAds\": true,\n \"excludeTags\": [\n \"<string>\"\n ],\n \"formats\": [\n \"markdown\"\n ],\n \"headers\": {},\n \"includeTags\": [\n \"<string>\"\n ],\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"lockdown\": false,\n \"maxAge\": 172800000,\n \"minAge\": 123,\n \"mobile\": false,\n \"onlyCleanContent\": false,\n \"onlyMainContent\": true,\n \"parsers\": [\n \"pdf\"\n ],\n \"proxy\": \"auto\",\n \"redactPII\": false,\n \"removeBase64Images\": true,\n \"skipTlsVerification\": true,\n \"storeInCache\": true,\n \"threatProtection\": {\n \"blacklist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ],\n \"riskScoreThreshold\": 75,\n \"whitelist\": [\n \"<string>\"\n ]\n },\n \"timeout\": 60000,\n \"waitFor\": 0,\n \"zeroDataRetention\": false\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://api.firecrawl.dev/v2/scrape")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"actions\": [\n {\n \"milliseconds\": 2,\n \"type\": \"wait\"\n }\n ],\n \"blockAds\": true,\n \"excludeTags\": [\n \"<string>\"\n ],\n \"formats\": [\n \"markdown\"\n ],\n \"headers\": {},\n \"includeTags\": [\n \"<string>\"\n ],\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"lockdown\": false,\n \"maxAge\": 172800000,\n \"minAge\": 123,\n \"mobile\": false,\n \"onlyCleanContent\": false,\n \"onlyMainContent\": true,\n \"parsers\": [\n \"pdf\"\n ],\n \"proxy\": \"auto\",\n \"redactPII\": false,\n \"removeBase64Images\": true,\n \"skipTlsVerification\": true,\n \"storeInCache\": true,\n \"threatProtection\": {\n \"blacklist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ],\n \"riskScoreThreshold\": 75,\n \"whitelist\": [\n \"<string>\"\n ]\n },\n \"timeout\": 60000,\n \"waitFor\": 0,\n \"zeroDataRetention\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/v2/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\": \"<string>\",\n \"actions\": [\n {\n \"milliseconds\": 2,\n \"type\": \"wait\"\n }\n ],\n \"blockAds\": true,\n \"excludeTags\": [\n \"<string>\"\n ],\n \"formats\": [\n \"markdown\"\n ],\n \"headers\": {},\n \"includeTags\": [\n \"<string>\"\n ],\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"lockdown\": false,\n \"maxAge\": 172800000,\n \"minAge\": 123,\n \"mobile\": false,\n \"onlyCleanContent\": false,\n \"onlyMainContent\": true,\n \"parsers\": [\n \"pdf\"\n ],\n \"proxy\": \"auto\",\n \"redactPII\": false,\n \"removeBase64Images\": true,\n \"skipTlsVerification\": true,\n \"storeInCache\": true,\n \"threatProtection\": {\n \"blacklist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ],\n \"riskScoreThreshold\": 75,\n \"whitelist\": [\n \"<string>\"\n ]\n },\n \"timeout\": 60000,\n \"waitFor\": 0,\n \"zeroDataRetention\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"actions": {
"javascriptReturns": [
{
"type": "<string>",
"value": "<unknown>"
}
],
"pdfs": [
"<string>"
],
"scrapes": [
{
"html": "<string>",
"url": "<string>"
}
],
"screenshots": [
"<string>"
]
},
"answer": "<string>",
"audio": "<string>",
"branding": {
"animations": {},
"colors": {
"accent": "<string>",
"background": "<string>",
"error": "<string>",
"link": "<string>",
"primary": "<string>",
"secondary": "<string>",
"success": "<string>",
"textPrimary": "<string>",
"textSecondary": "<string>",
"warning": "<string>"
},
"components": {
"buttonPrimary": {
"background": "<string>",
"borderRadius": "<string>",
"textColor": "<string>"
},
"buttonSecondary": {
"background": "<string>",
"borderColor": "<string>",
"borderRadius": "<string>",
"textColor": "<string>"
},
"input": {}
},
"fonts": [
{
"family": "<string>"
}
],
"icons": {},
"images": {
"favicon": "<string>",
"logo": "<string>",
"ogImage": "<string>"
},
"layout": {},
"logo": "<string>",
"personality": {},
"spacing": {
"baseUnit": 123,
"borderRadius": "<string>",
"margins": {},
"padding": {}
},
"typography": {
"fontFamilies": {
"code": "<string>",
"heading": "<string>",
"primary": "<string>"
},
"fontSizes": {
"body": "<string>",
"h1": "<string>",
"h2": "<string>",
"h3": "<string>"
},
"fontWeights": {
"bold": 123,
"light": 123,
"medium": 123,
"regular": 123
},
"lineHeights": {
"body": "<string>",
"heading": "<string>"
}
}
},
"changeTracking": {
"diff": "<string>",
"json": {},
"previousScrapeAt": "2023-11-07T05:31:56Z"
},
"highlights": "<string>",
"html": "<string>",
"links": [
"<string>"
],
"markdown": "<string>",
"menu": {
"isMenu": true,
"sections": [
{
"items": [
{
"name": "<string>",
"availability": {
"inStock": true,
"text": "<string>"
},
"calories": 123,
"description": "<string>",
"dietary": [
"<string>"
],
"id": "<string>",
"identifiers": {
"merchantItemId": "<string>"
},
"images": [
{
"url": "<string>",
"alt": "<string>"
}
],
"optionGroups": [
{}
],
"price": {
"amount": 123,
"currency": "<string>",
"formatted": "<string>"
},
"sourceUrl": "<string>",
"url": "<string>"
}
],
"name": "<string>",
"description": "<string>",
"id": "<string>"
}
],
"confidence": 123,
"currency": "<string>",
"merchant": {
"name": "<string>",
"type": "<string>"
},
"sourceUrl": "<string>"
},
"metadata": {
"<any other metadata> ": "<string>",
"concurrencyLimited": true,
"concurrencyQueueDurationMs": 123,
"contentType": "<string>",
"description": "<string>",
"error": "<string>",
"keywords": "<string>",
"language": "<string>",
"numPages": 123,
"ogLocaleAlternate": [
"<string>"
],
"sourceURL": "<string>",
"statusCode": 123,
"title": "<string>",
"totalPages": 123,
"url": "<string>"
},
"product": {
"title": "<string>",
"url": "<string>",
"variants": [
{
"availability": {
"inStock": true,
"text": "<string>"
},
"id": "<string>",
"images": [
{
"url": "<string>",
"alt": "<string>"
}
],
"price": {
"amount": 123,
"currency": "<string>",
"formatted": "<string>"
},
"sale": {
"originalPrice": {
"amount": 123,
"currency": "<string>",
"formatted": "<string>"
}
},
"sku": "<string>",
"title": "<string>",
"values": {}
}
],
"brand": "<string>",
"category": "<string>",
"description": "<string>"
},
"rawHtml": "<string>",
"screenshot": "<string>",
"summary": "<string>",
"video": "<string>",
"warning": "<string>"
},
"success": true
}{
"error": "Payment required to access this resource."
}{
"error": "Request rate limit exceeded. Please wait and try again later."
}{
"code": "UNKNOWN_ERROR",
"error": "An unexpected error occurred on the server.",
"success": false
}Scrape
curl --request POST \
--url https://api.firecrawl.dev/v2/scrape \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"actions": [
{
"milliseconds": 2,
"type": "wait"
}
],
"blockAds": true,
"excludeTags": [
"<string>"
],
"formats": [
"markdown"
],
"headers": {},
"includeTags": [
"<string>"
],
"location": {
"country": "US",
"languages": [
"en-US"
]
},
"lockdown": false,
"maxAge": 172800000,
"minAge": 123,
"mobile": false,
"onlyCleanContent": false,
"onlyMainContent": true,
"parsers": [
"pdf"
],
"proxy": "auto",
"redactPII": false,
"removeBase64Images": true,
"skipTlsVerification": true,
"storeInCache": true,
"threatProtection": {
"blacklist": [
"<string>"
],
"blockedTlds": [
"<string>"
],
"riskScoreThreshold": 75,
"whitelist": [
"<string>"
]
},
"timeout": 60000,
"waitFor": 0,
"zeroDataRetention": false
}
'import requests
url = "https://api.firecrawl.dev/v2/scrape"
payload = {
"url": "<string>",
"actions": [
{
"milliseconds": 2,
"type": "wait"
}
],
"blockAds": True,
"excludeTags": ["<string>"],
"formats": ["markdown"],
"headers": {},
"includeTags": ["<string>"],
"location": {
"country": "US",
"languages": ["en-US"]
},
"lockdown": False,
"maxAge": 172800000,
"minAge": 123,
"mobile": False,
"onlyCleanContent": False,
"onlyMainContent": True,
"parsers": ["pdf"],
"proxy": "auto",
"redactPII": False,
"removeBase64Images": True,
"skipTlsVerification": True,
"storeInCache": True,
"threatProtection": {
"blacklist": ["<string>"],
"blockedTlds": ["<string>"],
"riskScoreThreshold": 75,
"whitelist": ["<string>"]
},
"timeout": 60000,
"waitFor": 0,
"zeroDataRetention": False
}
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: '<string>',
actions: [{milliseconds: 2, type: 'wait'}],
blockAds: true,
excludeTags: ['<string>'],
formats: ['markdown'],
headers: {},
includeTags: ['<string>'],
location: {country: 'US', languages: ['en-US']},
lockdown: false,
maxAge: 172800000,
minAge: 123,
mobile: false,
onlyCleanContent: false,
onlyMainContent: true,
parsers: ['pdf'],
proxy: 'auto',
redactPII: false,
removeBase64Images: true,
skipTlsVerification: true,
storeInCache: true,
threatProtection: {
blacklist: ['<string>'],
blockedTlds: ['<string>'],
riskScoreThreshold: 75,
whitelist: ['<string>']
},
timeout: 60000,
waitFor: 0,
zeroDataRetention: false
})
};
fetch('https://api.firecrawl.dev/v2/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.firecrawl.dev/v2/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' => '<string>',
'actions' => [
[
'milliseconds' => 2,
'type' => 'wait'
]
],
'blockAds' => true,
'excludeTags' => [
'<string>'
],
'formats' => [
'markdown'
],
'headers' => [
],
'includeTags' => [
'<string>'
],
'location' => [
'country' => 'US',
'languages' => [
'en-US'
]
],
'lockdown' => false,
'maxAge' => 172800000,
'minAge' => 123,
'mobile' => false,
'onlyCleanContent' => false,
'onlyMainContent' => true,
'parsers' => [
'pdf'
],
'proxy' => 'auto',
'redactPII' => false,
'removeBase64Images' => true,
'skipTlsVerification' => true,
'storeInCache' => true,
'threatProtection' => [
'blacklist' => [
'<string>'
],
'blockedTlds' => [
'<string>'
],
'riskScoreThreshold' => 75,
'whitelist' => [
'<string>'
]
],
'timeout' => 60000,
'waitFor' => 0,
'zeroDataRetention' => false
]),
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://api.firecrawl.dev/v2/scrape"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"actions\": [\n {\n \"milliseconds\": 2,\n \"type\": \"wait\"\n }\n ],\n \"blockAds\": true,\n \"excludeTags\": [\n \"<string>\"\n ],\n \"formats\": [\n \"markdown\"\n ],\n \"headers\": {},\n \"includeTags\": [\n \"<string>\"\n ],\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"lockdown\": false,\n \"maxAge\": 172800000,\n \"minAge\": 123,\n \"mobile\": false,\n \"onlyCleanContent\": false,\n \"onlyMainContent\": true,\n \"parsers\": [\n \"pdf\"\n ],\n \"proxy\": \"auto\",\n \"redactPII\": false,\n \"removeBase64Images\": true,\n \"skipTlsVerification\": true,\n \"storeInCache\": true,\n \"threatProtection\": {\n \"blacklist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ],\n \"riskScoreThreshold\": 75,\n \"whitelist\": [\n \"<string>\"\n ]\n },\n \"timeout\": 60000,\n \"waitFor\": 0,\n \"zeroDataRetention\": false\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://api.firecrawl.dev/v2/scrape")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"actions\": [\n {\n \"milliseconds\": 2,\n \"type\": \"wait\"\n }\n ],\n \"blockAds\": true,\n \"excludeTags\": [\n \"<string>\"\n ],\n \"formats\": [\n \"markdown\"\n ],\n \"headers\": {},\n \"includeTags\": [\n \"<string>\"\n ],\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"lockdown\": false,\n \"maxAge\": 172800000,\n \"minAge\": 123,\n \"mobile\": false,\n \"onlyCleanContent\": false,\n \"onlyMainContent\": true,\n \"parsers\": [\n \"pdf\"\n ],\n \"proxy\": \"auto\",\n \"redactPII\": false,\n \"removeBase64Images\": true,\n \"skipTlsVerification\": true,\n \"storeInCache\": true,\n \"threatProtection\": {\n \"blacklist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ],\n \"riskScoreThreshold\": 75,\n \"whitelist\": [\n \"<string>\"\n ]\n },\n \"timeout\": 60000,\n \"waitFor\": 0,\n \"zeroDataRetention\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/v2/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\": \"<string>\",\n \"actions\": [\n {\n \"milliseconds\": 2,\n \"type\": \"wait\"\n }\n ],\n \"blockAds\": true,\n \"excludeTags\": [\n \"<string>\"\n ],\n \"formats\": [\n \"markdown\"\n ],\n \"headers\": {},\n \"includeTags\": [\n \"<string>\"\n ],\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"lockdown\": false,\n \"maxAge\": 172800000,\n \"minAge\": 123,\n \"mobile\": false,\n \"onlyCleanContent\": false,\n \"onlyMainContent\": true,\n \"parsers\": [\n \"pdf\"\n ],\n \"proxy\": \"auto\",\n \"redactPII\": false,\n \"removeBase64Images\": true,\n \"skipTlsVerification\": true,\n \"storeInCache\": true,\n \"threatProtection\": {\n \"blacklist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ],\n \"riskScoreThreshold\": 75,\n \"whitelist\": [\n \"<string>\"\n ]\n },\n \"timeout\": 60000,\n \"waitFor\": 0,\n \"zeroDataRetention\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"actions": {
"javascriptReturns": [
{
"type": "<string>",
"value": "<unknown>"
}
],
"pdfs": [
"<string>"
],
"scrapes": [
{
"html": "<string>",
"url": "<string>"
}
],
"screenshots": [
"<string>"
]
},
"answer": "<string>",
"audio": "<string>",
"branding": {
"animations": {},
"colors": {
"accent": "<string>",
"background": "<string>",
"error": "<string>",
"link": "<string>",
"primary": "<string>",
"secondary": "<string>",
"success": "<string>",
"textPrimary": "<string>",
"textSecondary": "<string>",
"warning": "<string>"
},
"components": {
"buttonPrimary": {
"background": "<string>",
"borderRadius": "<string>",
"textColor": "<string>"
},
"buttonSecondary": {
"background": "<string>",
"borderColor": "<string>",
"borderRadius": "<string>",
"textColor": "<string>"
},
"input": {}
},
"fonts": [
{
"family": "<string>"
}
],
"icons": {},
"images": {
"favicon": "<string>",
"logo": "<string>",
"ogImage": "<string>"
},
"layout": {},
"logo": "<string>",
"personality": {},
"spacing": {
"baseUnit": 123,
"borderRadius": "<string>",
"margins": {},
"padding": {}
},
"typography": {
"fontFamilies": {
"code": "<string>",
"heading": "<string>",
"primary": "<string>"
},
"fontSizes": {
"body": "<string>",
"h1": "<string>",
"h2": "<string>",
"h3": "<string>"
},
"fontWeights": {
"bold": 123,
"light": 123,
"medium": 123,
"regular": 123
},
"lineHeights": {
"body": "<string>",
"heading": "<string>"
}
}
},
"changeTracking": {
"diff": "<string>",
"json": {},
"previousScrapeAt": "2023-11-07T05:31:56Z"
},
"highlights": "<string>",
"html": "<string>",
"links": [
"<string>"
],
"markdown": "<string>",
"menu": {
"isMenu": true,
"sections": [
{
"items": [
{
"name": "<string>",
"availability": {
"inStock": true,
"text": "<string>"
},
"calories": 123,
"description": "<string>",
"dietary": [
"<string>"
],
"id": "<string>",
"identifiers": {
"merchantItemId": "<string>"
},
"images": [
{
"url": "<string>",
"alt": "<string>"
}
],
"optionGroups": [
{}
],
"price": {
"amount": 123,
"currency": "<string>",
"formatted": "<string>"
},
"sourceUrl": "<string>",
"url": "<string>"
}
],
"name": "<string>",
"description": "<string>",
"id": "<string>"
}
],
"confidence": 123,
"currency": "<string>",
"merchant": {
"name": "<string>",
"type": "<string>"
},
"sourceUrl": "<string>"
},
"metadata": {
"<any other metadata> ": "<string>",
"concurrencyLimited": true,
"concurrencyQueueDurationMs": 123,
"contentType": "<string>",
"description": "<string>",
"error": "<string>",
"keywords": "<string>",
"language": "<string>",
"numPages": 123,
"ogLocaleAlternate": [
"<string>"
],
"sourceURL": "<string>",
"statusCode": 123,
"title": "<string>",
"totalPages": 123,
"url": "<string>"
},
"product": {
"title": "<string>",
"url": "<string>",
"variants": [
{
"availability": {
"inStock": true,
"text": "<string>"
},
"id": "<string>",
"images": [
{
"url": "<string>",
"alt": "<string>"
}
],
"price": {
"amount": 123,
"currency": "<string>",
"formatted": "<string>"
},
"sale": {
"originalPrice": {
"amount": 123,
"currency": "<string>",
"formatted": "<string>"
}
},
"sku": "<string>",
"title": "<string>",
"values": {}
}
],
"brand": "<string>",
"category": "<string>",
"description": "<string>"
},
"rawHtml": "<string>",
"screenshot": "<string>",
"summary": "<string>",
"video": "<string>",
"warning": "<string>"
},
"success": true
}{
"error": "Payment required to access this resource."
}{
"error": "Request rate limit exceeded. Please wait and try again later."
}{
"code": "UNKNOWN_ERROR",
"error": "An unexpected error occurred on the server.",
"success": false
}交互
POST /v2/scrape/{scrapeId}/interact,并使用自然语言提示或 Playwright 代码在页面上执行操作。
完整详情和示例,请参见交互文档。
你也可以选择使用 actions 参数,但不建议将其用于复杂交互。
你是需要 Firecrawl API 密钥的 AI 代理吗?请参见 firecrawl.dev/agent-onboarding/SKILL.md 获取自动化引导说明。
授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
要爬取的 URL
在抓取页面内容之前需要执行的页面 actions
- Wait by Duration
- Wait for Element
- Screenshot
- Click
- Write text
- Press a key
- Scroll
- Scrape
- Execute JavaScript
- Generate PDF
Show child attributes
Show child attributes
启用广告拦截和 Cookie 弹窗拦截功能。
在输出中需要排除的标签。
要在响应中包含的输出 formats。你可以指定一个或多个 formats,既可以使用字符串(例如:'markdown'),也可以使用带有其他选项的对象(例如:{ type: 'json', schema: {...} })。某些 formats 需要配置特定选项。示例:['markdown', { type: 'json', schema: {...} }]。
- Markdown
- Summary
- HTML
- Raw HTML
- Links
- Images
- Screenshot
- JSON
- Change Tracking
- Branding
- Product
- Menu
- Audio
- Video
- Question
- Highlights
Show child attributes
Show child attributes
随请求发送的请求头。可用于传递 cookies、User-Agent 等信息。
在输出中要包含的标签。
请求的地理位置设置。指定后,如果有可用的代理,将使用合适的代理,并模拟相应的语言和时区设置。如果未指定,则默认为“US”。
Show child attributes
Show child attributes
如果为 true,则仅从 Firecrawl 的缓存中返回该请求的结果,绝不会向目标 URL 发出外部请求。此选项专为受合规要求限制或隔离网络环境而设计,因为爬取请求本身可能会泄露敏感信息。若缓存未命中,则返回 404 和错误代码 SCRAPE_LOCKDOWN_CACHE_MISS(未命中时绝不会记录该 URL)。Lockdown 请求按零数据保留处理。默认 maxAge 会延长至 2 年,因此现有缓存页面仍然仍可使用。命中缓存时计费 5 个额度,缓存未命中时计费 1 个额度。
如果页面的缓存版本的生成时间距今少于该毫秒数,则返回该缓存页面;如果缓存版本距今超过该时间,则会重新抓取页面。若你不需要特别新的数据,启用此选项可将抓取速度提升至 5 倍。默认值为 2 天。
<[ { "key": "0", "translation": "设置后,请求将仅检查缓存,不会触发新的抓取。该值以毫秒为单位,指定缓存数据必须满足的最小存在时长。如果存在匹配的缓存数据,将立即返回。若未找到缓存数据,则返回 404,错误代码为 SCRAPE_NO_CACHED_DATA。将其设为 1 可接受任意缓存数据,不受时长限制。" } ]</>
若要模拟在移动设备上进行抓取,请将其设置为 true。适用于测试响应式页面并获取移动端截图。
测试版。在已生成的 markdown 上额外执行一轮基于 LLM 的处理,以移除 onlyMainContent 可能遗漏的残余样板内容(如 cookie 横幅、广告块、社交分享组件、面包屑导航、新闻简报订阅区、评论区、相关文章列表)。标题、列表、表格、代码块、图片引用和内联链接都会保留。可与 onlyMainContent 结合使用(最常见的配置),也可单独使用。当 markdown 超过清理模型的输出 token 限制时,将跳过此步骤并发出警告(原始 markdown 会保留)。不支持零数据保留请求。
仅返回页面主体内容,不包括页眉、导航栏、页脚等。这是在生成 markdown 之前应用的确定性 HTML 层级过滤;不涉及 LLM。
用于控制在抓取过程中如何处理文件。包含 "pdf" 时(默认),会提取 PDF 内容并转换为 Markdown 格式,计费基于页数(每页 1 点数)。当传入空数组时,会以 base64 编码返回整个 PDF 文件,并对整份 PDF 按单一费率收取 1 点数。
Show child attributes
Show child attributes
在抓取和交互会话之间启用持久化浏览器存储。抓取时传入一个 profile,以保留 cookies、localStorage 和会话数据。使用相同 profile 名称的会话会共享浏览器状态。
Show child attributes
Show child attributes
指定要使用的代理类型。
- basic:用于抓取几乎没有或只有基础反爬策略的网站的代理。速度快,通常可用。
- enhanced:用于抓取具有高级反爬策略的网站的增强型代理。速度较慢,但在某些站点上更可靠。每个请求最多消耗 5 点积分。
- auto:当 basic 代理抓取失败时,Firecrawl 会自动重试并切换为 enhanced 代理。如果使用 enhanced 重试成功,该次抓取将收取 5 点积分;如果使用 basic 一次就成功,则只按常规定价计费。
basic, enhanced, auto 对返回的 markdown 中的个人身份识别信息进行脱敏。传入 true 可使用默认值,或传入一个对象来自定义模式、实体和替换样式。
从 markdown 输出中移除所有 base 64 图像,以避免输出内容过长。这不会影响 html 或 rawHtml formats。图像的 alt 文本会保留在输出中,但 URL 会替换为占位符。
在发起请求时跳过 TLS 证书验证。
如果为 true,该页面会存储到 Firecrawl 的索引和缓存中。如果你的抓取操作可能涉及数据保护方面的顾虑,将其设置为 false 会很有用。使用某些与敏感抓取相关的参数(例如 actions、headers)时,会被强制将此参数设为 false。
请求超时时间(以毫秒为单位)。最小值为 1000(1 秒)。默认值为 60000(60 秒)。最大值为 300000(300 秒)。
1000 <= x <= 300000指定在抓取内容前的延迟时间(毫秒),以便页面有足够时间完成加载。该等待时间是在 Firecrawl 的智能等待功能基础上的额外等待。
如果为 true,则本次抓取将不保留任何数据。要启用此功能,请联系 help@firecrawl.dev

