curl --request POST \
--url https://api.firecrawl.dev/v2/crawl \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"allowExternalLinks": false,
"allowSubdomains": false,
"crawlEntireDomain": false,
"delay": 123,
"excludePaths": [
"<string>"
],
"ignoreQueryParameters": false,
"ignoreRobotsTxt": false,
"includePaths": [
"<string>"
],
"limit": 10000,
"maxConcurrency": 123,
"maxDiscoveryDepth": 123,
"prompt": "<string>",
"regexOnFullURL": false,
"robotsUserAgent": "<string>",
"scrapeOptions": {
"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
},
"sitemap": "include",
"zeroDataRetention": false
}
'import requests
url = "https://api.firecrawl.dev/v2/crawl"
payload = {
"url": "<string>",
"allowExternalLinks": False,
"allowSubdomains": False,
"crawlEntireDomain": False,
"delay": 123,
"excludePaths": ["<string>"],
"ignoreQueryParameters": False,
"ignoreRobotsTxt": False,
"includePaths": ["<string>"],
"limit": 10000,
"maxConcurrency": 123,
"maxDiscoveryDepth": 123,
"prompt": "<string>",
"regexOnFullURL": False,
"robotsUserAgent": "<string>",
"scrapeOptions": {
"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
},
"sitemap": "include",
"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>',
allowExternalLinks: false,
allowSubdomains: false,
crawlEntireDomain: false,
delay: 123,
excludePaths: ['<string>'],
ignoreQueryParameters: false,
ignoreRobotsTxt: false,
includePaths: ['<string>'],
limit: 10000,
maxConcurrency: 123,
maxDiscoveryDepth: 123,
prompt: '<string>',
regexOnFullURL: false,
robotsUserAgent: '<string>',
scrapeOptions: {
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
},
sitemap: 'include',
zeroDataRetention: false
})
};
fetch('https://api.firecrawl.dev/v2/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://api.firecrawl.dev/v2/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' => '<string>',
'allowExternalLinks' => false,
'allowSubdomains' => false,
'crawlEntireDomain' => false,
'delay' => 123,
'excludePaths' => [
'<string>'
],
'ignoreQueryParameters' => false,
'ignoreRobotsTxt' => false,
'includePaths' => [
'<string>'
],
'limit' => 10000,
'maxConcurrency' => 123,
'maxDiscoveryDepth' => 123,
'prompt' => '<string>',
'regexOnFullURL' => false,
'robotsUserAgent' => '<string>',
'scrapeOptions' => [
'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
],
'sitemap' => 'include',
'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/crawl"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"allowExternalLinks\": false,\n \"allowSubdomains\": false,\n \"crawlEntireDomain\": false,\n \"delay\": 123,\n \"excludePaths\": [\n \"<string>\"\n ],\n \"ignoreQueryParameters\": false,\n \"ignoreRobotsTxt\": false,\n \"includePaths\": [\n \"<string>\"\n ],\n \"limit\": 10000,\n \"maxConcurrency\": 123,\n \"maxDiscoveryDepth\": 123,\n \"prompt\": \"<string>\",\n \"regexOnFullURL\": false,\n \"robotsUserAgent\": \"<string>\",\n \"scrapeOptions\": {\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 },\n \"sitemap\": \"include\",\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/crawl")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"allowExternalLinks\": false,\n \"allowSubdomains\": false,\n \"crawlEntireDomain\": false,\n \"delay\": 123,\n \"excludePaths\": [\n \"<string>\"\n ],\n \"ignoreQueryParameters\": false,\n \"ignoreRobotsTxt\": false,\n \"includePaths\": [\n \"<string>\"\n ],\n \"limit\": 10000,\n \"maxConcurrency\": 123,\n \"maxDiscoveryDepth\": 123,\n \"prompt\": \"<string>\",\n \"regexOnFullURL\": false,\n \"robotsUserAgent\": \"<string>\",\n \"scrapeOptions\": {\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 },\n \"sitemap\": \"include\",\n \"zeroDataRetention\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/v2/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\": \"<string>\",\n \"allowExternalLinks\": false,\n \"allowSubdomains\": false,\n \"crawlEntireDomain\": false,\n \"delay\": 123,\n \"excludePaths\": [\n \"<string>\"\n ],\n \"ignoreQueryParameters\": false,\n \"ignoreRobotsTxt\": false,\n \"includePaths\": [\n \"<string>\"\n ],\n \"limit\": 10000,\n \"maxConcurrency\": 123,\n \"maxDiscoveryDepth\": 123,\n \"prompt\": \"<string>\",\n \"regexOnFullURL\": false,\n \"robotsUserAgent\": \"<string>\",\n \"scrapeOptions\": {\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 },\n \"sitemap\": \"include\",\n \"zeroDataRetention\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"success": true,
"url": "<string>"
}{
"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/v2/crawl \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"allowExternalLinks": false,
"allowSubdomains": false,
"crawlEntireDomain": false,
"delay": 123,
"excludePaths": [
"<string>"
],
"ignoreQueryParameters": false,
"ignoreRobotsTxt": false,
"includePaths": [
"<string>"
],
"limit": 10000,
"maxConcurrency": 123,
"maxDiscoveryDepth": 123,
"prompt": "<string>",
"regexOnFullURL": false,
"robotsUserAgent": "<string>",
"scrapeOptions": {
"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
},
"sitemap": "include",
"zeroDataRetention": false
}
'import requests
url = "https://api.firecrawl.dev/v2/crawl"
payload = {
"url": "<string>",
"allowExternalLinks": False,
"allowSubdomains": False,
"crawlEntireDomain": False,
"delay": 123,
"excludePaths": ["<string>"],
"ignoreQueryParameters": False,
"ignoreRobotsTxt": False,
"includePaths": ["<string>"],
"limit": 10000,
"maxConcurrency": 123,
"maxDiscoveryDepth": 123,
"prompt": "<string>",
"regexOnFullURL": False,
"robotsUserAgent": "<string>",
"scrapeOptions": {
"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
},
"sitemap": "include",
"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>',
allowExternalLinks: false,
allowSubdomains: false,
crawlEntireDomain: false,
delay: 123,
excludePaths: ['<string>'],
ignoreQueryParameters: false,
ignoreRobotsTxt: false,
includePaths: ['<string>'],
limit: 10000,
maxConcurrency: 123,
maxDiscoveryDepth: 123,
prompt: '<string>',
regexOnFullURL: false,
robotsUserAgent: '<string>',
scrapeOptions: {
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
},
sitemap: 'include',
zeroDataRetention: false
})
};
fetch('https://api.firecrawl.dev/v2/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://api.firecrawl.dev/v2/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' => '<string>',
'allowExternalLinks' => false,
'allowSubdomains' => false,
'crawlEntireDomain' => false,
'delay' => 123,
'excludePaths' => [
'<string>'
],
'ignoreQueryParameters' => false,
'ignoreRobotsTxt' => false,
'includePaths' => [
'<string>'
],
'limit' => 10000,
'maxConcurrency' => 123,
'maxDiscoveryDepth' => 123,
'prompt' => '<string>',
'regexOnFullURL' => false,
'robotsUserAgent' => '<string>',
'scrapeOptions' => [
'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
],
'sitemap' => 'include',
'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/crawl"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"allowExternalLinks\": false,\n \"allowSubdomains\": false,\n \"crawlEntireDomain\": false,\n \"delay\": 123,\n \"excludePaths\": [\n \"<string>\"\n ],\n \"ignoreQueryParameters\": false,\n \"ignoreRobotsTxt\": false,\n \"includePaths\": [\n \"<string>\"\n ],\n \"limit\": 10000,\n \"maxConcurrency\": 123,\n \"maxDiscoveryDepth\": 123,\n \"prompt\": \"<string>\",\n \"regexOnFullURL\": false,\n \"robotsUserAgent\": \"<string>\",\n \"scrapeOptions\": {\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 },\n \"sitemap\": \"include\",\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/crawl")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"allowExternalLinks\": false,\n \"allowSubdomains\": false,\n \"crawlEntireDomain\": false,\n \"delay\": 123,\n \"excludePaths\": [\n \"<string>\"\n ],\n \"ignoreQueryParameters\": false,\n \"ignoreRobotsTxt\": false,\n \"includePaths\": [\n \"<string>\"\n ],\n \"limit\": 10000,\n \"maxConcurrency\": 123,\n \"maxDiscoveryDepth\": 123,\n \"prompt\": \"<string>\",\n \"regexOnFullURL\": false,\n \"robotsUserAgent\": \"<string>\",\n \"scrapeOptions\": {\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 },\n \"sitemap\": \"include\",\n \"zeroDataRetention\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/v2/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\": \"<string>\",\n \"allowExternalLinks\": false,\n \"allowSubdomains\": false,\n \"crawlEntireDomain\": false,\n \"delay\": 123,\n \"excludePaths\": [\n \"<string>\"\n ],\n \"ignoreQueryParameters\": false,\n \"ignoreRobotsTxt\": false,\n \"includePaths\": [\n \"<string>\"\n ],\n \"limit\": 10000,\n \"maxConcurrency\": 123,\n \"maxDiscoveryDepth\": 123,\n \"prompt\": \"<string>\",\n \"regexOnFullURL\": false,\n \"robotsUserAgent\": \"<string>\",\n \"scrapeOptions\": {\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 },\n \"sitemap\": \"include\",\n \"zeroDataRetention\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"success": true,
"url": "<string>"
}{
"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."
}Firecrawl API key が必要な AI agent の方ですか?自動オンボーディング手順については、firecrawl.dev/agent-onboarding/SKILL.md をご覧ください。
承認
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ボディ
クロールを開始するベースURL
クローラーが外部のウェブサイトへのリンクをたどれるようにします。
クローラーがメインドメイン配下のサブドメインへのリンクをたどれるようにします。
クローラーが子パスだけでなく、同一階層(兄弟)や親の URL への内部リンクもたどれるようにします。
false: より深い(子)URL だけをクロールします。 → 例: /features/feature-1 → /features/feature-1/tips ✅ → /pricing や / には遷移しません ❌
true: 同一階層や親階層を含む、あらゆる内部リンクをクロールします。 → 例: /features/feature-1 → /pricing、/ など ✅
入れ子になったパスよりも広く内部ページ全体をカバーしたい場合は true を使用します。
スクレイピング間の遅延時間(秒)です。これにより、Web サイトのレート制限を守りやすくなります。これを設定すると、同時実行数は 1 に固定されます。
クロールから除外する URL パス名の正規表現パターンです。たとえば、ベース URL が firecrawl.dev の場合に "excludePaths": ["blog/.*"] を設定すると、https://www.firecrawl.dev/blog/firecrawl-launch-week-1-recap のようにそのパターンにマッチする URL はすべて除外されます。
同じパスを、クエリパラメータの有無や値を変えて再スクレイプしないでください
Web サイトの robots.txt のルールを無視します。Enterprise 限定 — 有効化するには support@firecrawl.com までお問い合わせください。
クロールに含めるURLを指定するための、URLパス名に対する正規表現パターンです。指定したパターンにマッチしたパスのみがレスポンスに含まれます。注意:開始URLもこれらのパターンでチェックされるため、マッチしない場合は1ページもクロールされず、ページ数が0になる可能性があります。例えば、ベースURLが firecrawl.dev/blog のときに "includePaths": ["blog/.*"] を指定すると、/blog/ 配下のページのみが結果に含まれます(例:https://www.firecrawl.dev/blog/firecrawl-launch-week-1-recap)。
クロールするページ数の最大値。デフォルトの上限は 10,000 です。
同時スクレイプ数の上限。このパラメータで、このクロールに対する同時実行数の上限を設定できます。指定しない場合、このクロールはチームに設定されている同時実行数の上限に従います。
検出順序に基づいてクロールする最大深度です。ルートサイトおよびサイトマップに含まれるページの検出深度は 0 です。例えば、これを 1 に設定し、かつ sitemap: 'skip' を指定した場合、入力した URL と、そのページからリンクされているすべての URL だけをクロールします。
自然言語からクローラーオプション(以下のすべてのパラメーター)を生成するために使用するプロンプトです。明示的に設定されたパラメーターは、生成された対応する値よりも優先されます。
true の場合、includePaths および excludePaths の正規表現パターンは、URL パス名だけでなく、クエリパラメータを含む URL 全体に対してマッチングされます。クエリ文字列に基づいて URL をフィルタリングしたい場合に便利です。
robots.txt の評価に使用するカスタム User-Agent 文字列です。設定すると、robots.txt はこの User-Agent で取得され、allow/disallow ルールはデフォルトではなくこの User-Agent に照らして評価されます。Enterprise 限定 — 有効化するには support@firecrawl.com までお問い合わせください。
Show child attributes
Show child attributes
クロール時のサイトマップモードを指定します。skip を指定すると、クローラーはウェブサイトのサイトマップを無視し、指定した開始URLを起点として、そこから発見したページだけをクロールします。only を指定すると、クローラーはサイトマップ内のURL(+開始URL)のみをクロールし、HTML内のリンクから新たなページをたどることはありません。
skip, include, only Webhook 仕様オブジェクト。
Show child attributes
Show child attributes
true の場合、このクロールではデータを一切保持しないゼロデータ保持モードが有効になります。この機能を有効化するには、help@firecrawl.dev までご連絡ください。

