curl --request POST \
--url https://api.firecrawl.dev/v1/scrape \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"actions": [
{
"type": "wait",
"milliseconds": 2,
"selector": "#my-element"
}
],
"blockAds": true,
"excludeTags": [
"<string>"
],
"headers": {},
"includeTags": [
"<string>"
],
"jsonOptions": {
"prompt": "<string>",
"schema": {},
"systemPrompt": "<string>"
},
"location": {
"country": "US",
"languages": [
"en-US"
]
},
"maxAge": 0,
"mobile": false,
"onlyMainContent": true,
"parsePDF": true,
"removeBase64Images": true,
"skipTlsVerification": false,
"storeInCache": true,
"threatProtection": {
"blacklist": [
"<string>"
],
"blockedTlds": [
"<string>"
],
"riskScoreThreshold": 75,
"whitelist": [
"<string>"
]
},
"timeout": 30000,
"waitFor": 0,
"changeTrackingOptions": {
"modes": [],
"prompt": "<string>",
"schema": {},
"tag": null
},
"formats": [
"markdown"
],
"zeroDataRetention": false
}
'import requests
url = "https://api.firecrawl.dev/v1/scrape"
payload = {
"url": "<string>",
"actions": [
{
"type": "wait",
"milliseconds": 2,
"selector": "#my-element"
}
],
"blockAds": True,
"excludeTags": ["<string>"],
"headers": {},
"includeTags": ["<string>"],
"jsonOptions": {
"prompt": "<string>",
"schema": {},
"systemPrompt": "<string>"
},
"location": {
"country": "US",
"languages": ["en-US"]
},
"maxAge": 0,
"mobile": False,
"onlyMainContent": True,
"parsePDF": True,
"removeBase64Images": True,
"skipTlsVerification": False,
"storeInCache": True,
"threatProtection": {
"blacklist": ["<string>"],
"blockedTlds": ["<string>"],
"riskScoreThreshold": 75,
"whitelist": ["<string>"]
},
"timeout": 30000,
"waitFor": 0,
"changeTrackingOptions": {
"modes": [],
"prompt": "<string>",
"schema": {},
"tag": None
},
"formats": ["markdown"],
"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: [{type: 'wait', milliseconds: 2, selector: '#my-element'}],
blockAds: true,
excludeTags: ['<string>'],
headers: {},
includeTags: ['<string>'],
jsonOptions: {prompt: '<string>', schema: {}, systemPrompt: '<string>'},
location: {country: 'US', languages: ['en-US']},
maxAge: 0,
mobile: false,
onlyMainContent: true,
parsePDF: true,
removeBase64Images: true,
skipTlsVerification: false,
storeInCache: true,
threatProtection: {
blacklist: ['<string>'],
blockedTlds: ['<string>'],
riskScoreThreshold: 75,
whitelist: ['<string>']
},
timeout: 30000,
waitFor: 0,
changeTrackingOptions: {modes: [], prompt: '<string>', schema: {}, tag: null},
formats: ['markdown'],
zeroDataRetention: false
})
};
fetch('https://api.firecrawl.dev/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://api.firecrawl.dev/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' => '<string>',
'actions' => [
[
'type' => 'wait',
'milliseconds' => 2,
'selector' => '#my-element'
]
],
'blockAds' => true,
'excludeTags' => [
'<string>'
],
'headers' => [
],
'includeTags' => [
'<string>'
],
'jsonOptions' => [
'prompt' => '<string>',
'schema' => [
],
'systemPrompt' => '<string>'
],
'location' => [
'country' => 'US',
'languages' => [
'en-US'
]
],
'maxAge' => 0,
'mobile' => false,
'onlyMainContent' => true,
'parsePDF' => true,
'removeBase64Images' => true,
'skipTlsVerification' => false,
'storeInCache' => true,
'threatProtection' => [
'blacklist' => [
'<string>'
],
'blockedTlds' => [
'<string>'
],
'riskScoreThreshold' => 75,
'whitelist' => [
'<string>'
]
],
'timeout' => 30000,
'waitFor' => 0,
'changeTrackingOptions' => [
'modes' => [
],
'prompt' => '<string>',
'schema' => [
],
'tag' => null
],
'formats' => [
'markdown'
],
'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/v1/scrape"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"actions\": [\n {\n \"type\": \"wait\",\n \"milliseconds\": 2,\n \"selector\": \"#my-element\"\n }\n ],\n \"blockAds\": true,\n \"excludeTags\": [\n \"<string>\"\n ],\n \"headers\": {},\n \"includeTags\": [\n \"<string>\"\n ],\n \"jsonOptions\": {\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"systemPrompt\": \"<string>\"\n },\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"maxAge\": 0,\n \"mobile\": false,\n \"onlyMainContent\": true,\n \"parsePDF\": true,\n \"removeBase64Images\": true,\n \"skipTlsVerification\": false,\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\": 30000,\n \"waitFor\": 0,\n \"changeTrackingOptions\": {\n \"modes\": [],\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"tag\": null\n },\n \"formats\": [\n \"markdown\"\n ],\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/v1/scrape")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"actions\": [\n {\n \"type\": \"wait\",\n \"milliseconds\": 2,\n \"selector\": \"#my-element\"\n }\n ],\n \"blockAds\": true,\n \"excludeTags\": [\n \"<string>\"\n ],\n \"headers\": {},\n \"includeTags\": [\n \"<string>\"\n ],\n \"jsonOptions\": {\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"systemPrompt\": \"<string>\"\n },\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"maxAge\": 0,\n \"mobile\": false,\n \"onlyMainContent\": true,\n \"parsePDF\": true,\n \"removeBase64Images\": true,\n \"skipTlsVerification\": false,\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\": 30000,\n \"waitFor\": 0,\n \"changeTrackingOptions\": {\n \"modes\": [],\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"tag\": null\n },\n \"formats\": [\n \"markdown\"\n ],\n \"zeroDataRetention\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/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\": \"<string>\",\n \"actions\": [\n {\n \"type\": \"wait\",\n \"milliseconds\": 2,\n \"selector\": \"#my-element\"\n }\n ],\n \"blockAds\": true,\n \"excludeTags\": [\n \"<string>\"\n ],\n \"headers\": {},\n \"includeTags\": [\n \"<string>\"\n ],\n \"jsonOptions\": {\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"systemPrompt\": \"<string>\"\n },\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"maxAge\": 0,\n \"mobile\": false,\n \"onlyMainContent\": true,\n \"parsePDF\": true,\n \"removeBase64Images\": true,\n \"skipTlsVerification\": false,\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\": 30000,\n \"waitFor\": 0,\n \"changeTrackingOptions\": {\n \"modes\": [],\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"tag\": null\n },\n \"formats\": [\n \"markdown\"\n ],\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>"
]
},
"changeTracking": {
"diff": "<string>",
"json": {},
"previousScrapeAt": "2023-11-07T05:31:56Z"
},
"html": "<string>",
"links": [
"<string>"
],
"llm_extraction": {},
"markdown": "<string>",
"metadata": {
"<any other metadata> ": "<string>",
"description": "<string>",
"error": "<string>",
"keywords": "<string>",
"language": "<string>",
"numPages": 123,
"ogLocaleAlternate": [
"<string>"
],
"sourceURL": "<string>",
"statusCode": 123,
"title": "<string>",
"totalPages": 123
},
"rawHtml": "<string>",
"screenshot": "<string>",
"warning": "<string>"
},
"success": true
}{
"error": "Payment required to access this resource."
}{
"error": "Request rate limit exceeded. Please wait and try again later."
}{
"error": "An unexpected error occurred on the server."
}抓取
curl --request POST \
--url https://api.firecrawl.dev/v1/scrape \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"actions": [
{
"type": "wait",
"milliseconds": 2,
"selector": "#my-element"
}
],
"blockAds": true,
"excludeTags": [
"<string>"
],
"headers": {},
"includeTags": [
"<string>"
],
"jsonOptions": {
"prompt": "<string>",
"schema": {},
"systemPrompt": "<string>"
},
"location": {
"country": "US",
"languages": [
"en-US"
]
},
"maxAge": 0,
"mobile": false,
"onlyMainContent": true,
"parsePDF": true,
"removeBase64Images": true,
"skipTlsVerification": false,
"storeInCache": true,
"threatProtection": {
"blacklist": [
"<string>"
],
"blockedTlds": [
"<string>"
],
"riskScoreThreshold": 75,
"whitelist": [
"<string>"
]
},
"timeout": 30000,
"waitFor": 0,
"changeTrackingOptions": {
"modes": [],
"prompt": "<string>",
"schema": {},
"tag": null
},
"formats": [
"markdown"
],
"zeroDataRetention": false
}
'import requests
url = "https://api.firecrawl.dev/v1/scrape"
payload = {
"url": "<string>",
"actions": [
{
"type": "wait",
"milliseconds": 2,
"selector": "#my-element"
}
],
"blockAds": True,
"excludeTags": ["<string>"],
"headers": {},
"includeTags": ["<string>"],
"jsonOptions": {
"prompt": "<string>",
"schema": {},
"systemPrompt": "<string>"
},
"location": {
"country": "US",
"languages": ["en-US"]
},
"maxAge": 0,
"mobile": False,
"onlyMainContent": True,
"parsePDF": True,
"removeBase64Images": True,
"skipTlsVerification": False,
"storeInCache": True,
"threatProtection": {
"blacklist": ["<string>"],
"blockedTlds": ["<string>"],
"riskScoreThreshold": 75,
"whitelist": ["<string>"]
},
"timeout": 30000,
"waitFor": 0,
"changeTrackingOptions": {
"modes": [],
"prompt": "<string>",
"schema": {},
"tag": None
},
"formats": ["markdown"],
"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: [{type: 'wait', milliseconds: 2, selector: '#my-element'}],
blockAds: true,
excludeTags: ['<string>'],
headers: {},
includeTags: ['<string>'],
jsonOptions: {prompt: '<string>', schema: {}, systemPrompt: '<string>'},
location: {country: 'US', languages: ['en-US']},
maxAge: 0,
mobile: false,
onlyMainContent: true,
parsePDF: true,
removeBase64Images: true,
skipTlsVerification: false,
storeInCache: true,
threatProtection: {
blacklist: ['<string>'],
blockedTlds: ['<string>'],
riskScoreThreshold: 75,
whitelist: ['<string>']
},
timeout: 30000,
waitFor: 0,
changeTrackingOptions: {modes: [], prompt: '<string>', schema: {}, tag: null},
formats: ['markdown'],
zeroDataRetention: false
})
};
fetch('https://api.firecrawl.dev/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://api.firecrawl.dev/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' => '<string>',
'actions' => [
[
'type' => 'wait',
'milliseconds' => 2,
'selector' => '#my-element'
]
],
'blockAds' => true,
'excludeTags' => [
'<string>'
],
'headers' => [
],
'includeTags' => [
'<string>'
],
'jsonOptions' => [
'prompt' => '<string>',
'schema' => [
],
'systemPrompt' => '<string>'
],
'location' => [
'country' => 'US',
'languages' => [
'en-US'
]
],
'maxAge' => 0,
'mobile' => false,
'onlyMainContent' => true,
'parsePDF' => true,
'removeBase64Images' => true,
'skipTlsVerification' => false,
'storeInCache' => true,
'threatProtection' => [
'blacklist' => [
'<string>'
],
'blockedTlds' => [
'<string>'
],
'riskScoreThreshold' => 75,
'whitelist' => [
'<string>'
]
],
'timeout' => 30000,
'waitFor' => 0,
'changeTrackingOptions' => [
'modes' => [
],
'prompt' => '<string>',
'schema' => [
],
'tag' => null
],
'formats' => [
'markdown'
],
'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/v1/scrape"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"actions\": [\n {\n \"type\": \"wait\",\n \"milliseconds\": 2,\n \"selector\": \"#my-element\"\n }\n ],\n \"blockAds\": true,\n \"excludeTags\": [\n \"<string>\"\n ],\n \"headers\": {},\n \"includeTags\": [\n \"<string>\"\n ],\n \"jsonOptions\": {\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"systemPrompt\": \"<string>\"\n },\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"maxAge\": 0,\n \"mobile\": false,\n \"onlyMainContent\": true,\n \"parsePDF\": true,\n \"removeBase64Images\": true,\n \"skipTlsVerification\": false,\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\": 30000,\n \"waitFor\": 0,\n \"changeTrackingOptions\": {\n \"modes\": [],\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"tag\": null\n },\n \"formats\": [\n \"markdown\"\n ],\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/v1/scrape")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"actions\": [\n {\n \"type\": \"wait\",\n \"milliseconds\": 2,\n \"selector\": \"#my-element\"\n }\n ],\n \"blockAds\": true,\n \"excludeTags\": [\n \"<string>\"\n ],\n \"headers\": {},\n \"includeTags\": [\n \"<string>\"\n ],\n \"jsonOptions\": {\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"systemPrompt\": \"<string>\"\n },\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"maxAge\": 0,\n \"mobile\": false,\n \"onlyMainContent\": true,\n \"parsePDF\": true,\n \"removeBase64Images\": true,\n \"skipTlsVerification\": false,\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\": 30000,\n \"waitFor\": 0,\n \"changeTrackingOptions\": {\n \"modes\": [],\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"tag\": null\n },\n \"formats\": [\n \"markdown\"\n ],\n \"zeroDataRetention\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/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\": \"<string>\",\n \"actions\": [\n {\n \"type\": \"wait\",\n \"milliseconds\": 2,\n \"selector\": \"#my-element\"\n }\n ],\n \"blockAds\": true,\n \"excludeTags\": [\n \"<string>\"\n ],\n \"headers\": {},\n \"includeTags\": [\n \"<string>\"\n ],\n \"jsonOptions\": {\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"systemPrompt\": \"<string>\"\n },\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"maxAge\": 0,\n \"mobile\": false,\n \"onlyMainContent\": true,\n \"parsePDF\": true,\n \"removeBase64Images\": true,\n \"skipTlsVerification\": false,\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\": 30000,\n \"waitFor\": 0,\n \"changeTrackingOptions\": {\n \"modes\": [],\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"tag\": null\n },\n \"formats\": [\n \"markdown\"\n ],\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>"
]
},
"changeTracking": {
"diff": "<string>",
"json": {},
"previousScrapeAt": "2023-11-07T05:31:56Z"
},
"html": "<string>",
"links": [
"<string>"
],
"llm_extraction": {},
"markdown": "<string>",
"metadata": {
"<any other metadata> ": "<string>",
"description": "<string>",
"error": "<string>",
"keywords": "<string>",
"language": "<string>",
"numPages": 123,
"ogLocaleAlternate": [
"<string>"
],
"sourceURL": "<string>",
"statusCode": 123,
"title": "<string>",
"totalPages": 123
},
"rawHtml": "<string>",
"screenshot": "<string>",
"warning": "<string>"
},
"success": true
}{
"error": "Payment required to access this resource."
}{
"error": "Request rate limit exceeded. Please wait and try again later."
}{
"error": "An unexpected error occurred on the server."
}注意:全新的 此 API 的 v2 版本 现已上线,提供更强大的功能和更高的性能。
授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
要爬取的 URL
在抓取页面内容前需要执行的 actions
- Wait
- Screenshot
- Click
- Write text
- Press a key
- Scroll
- Scrape
- Execute JavaScript
- Generate PDF
Show child attributes
Show child attributes
启用广告拦截和 Cookie 弹窗屏蔽。
在输出结果中要排除的标签。
随请求发送的请求头。可用于携带 cookies、user-agent 等信息。
需要包含在输出中的标签。
JSON 配置对象
Show child attributes
Show child attributes
请求的地理位置设置。指定后,如果可用,将使用合适的代理服务器,并模拟相应的语言和时区设置。如果未指定,默认值为“US”。
Show child attributes
Show child attributes
如果页面的缓存版本的生成时间距现在小于此值(毫秒),则返回该缓存版本;如果缓存版本早于此值,则会重新抓取页面。如果你不需要极其实时的数据,启用此选项可以将抓取速度最多提升 5 倍。默认值为 0,表示禁用缓存。
若要模拟移动端抓取,请将其设置为 true。适用于测试响应式页面并获取移动端截图。
仅返回页面的主体内容,不包括页眉、导航、页脚等。
控制在爬取过程中如何处理 PDF 文件。为 true 时,会提取 PDF 内容并转换为 Markdown 格式,按页数计费(每页 1 个积分)。为 false 时,会返回以 base64 编码的 PDF 文件,统一按 1 个积分计费。
指定要使用的代理类型。
- basic:适用于抓取没有或仅有基础防爬机制网站的代理。速度快,通常足够好用。
- enhanced:适用于抓取具有高级防爬机制网站的增强型代理。速度较慢,但在某些网站上更可靠。每次请求最多消耗 5 个积分。
- auto:当使用 basic 代理抓取失败时,Firecrawl 会自动使用 enhanced 代理重试。如果使用 enhanced 重试成功,该次抓取将收取 5 个积分;如果首次使用 basic 即抓取成功,则只收取常规费用。
如果未指定代理类型,Firecrawl 将默认使用 basic。
basic, enhanced, auto 从输出中移除所有 Base64 图片,以避免内容过于冗长。图片的替代文本(alt 文本)会保留在输出中,但其 URL 会被占位符替换。
在发送请求时跳过 TLS 证书校验
如果为 true,该页面将被存储到 Firecrawl 的索引和缓存中。若你的抓取活动可能涉及数据保护方面的问题,将其设置为 false 会更合适。使用某些与敏感抓取相关的参数(如 actions、headers)时,该参数会被强制设为 false。
请求超时时间(毫秒)
设置在获取内容前的延迟时间(毫秒),以便页面有足够时间加载完成。
用于 changeTracking 的选项(Beta)。仅当在 formats 中包含 'changeTracking' 时才适用。使用 changeTracking 时,还必须同时指定 'markdown' 格式。
Show child attributes
Show child attributes
输出中要包含的formats。
markdown, html, rawHtml, links, screenshot, screenshot@fullPage, json, changeTracking 如果为 true,将对本次抓取启用零数据保留策略。要开启此功能,请联系 help@firecrawl.dev

