curl --request POST \
--url https://api.firecrawl.dev/v1/crawl \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"excludePaths": [
"<string>"
],
"includePaths": [
"<string>"
],
"regexOnFullURL": false,
"maxDepth": 10,
"maxDiscoveryDepth": 123,
"ignoreSitemap": false,
"ignoreQueryParameters": false,
"limit": 10000,
"allowBackwardLinks": false,
"crawlEntireDomain": false,
"allowExternalLinks": false,
"allowSubdomains": false,
"delay": 123,
"maxConcurrency": 123,
"scrapeOptions": {
"onlyMainContent": true,
"includeTags": [
"<string>"
],
"excludeTags": [
"<string>"
],
"maxAge": 0,
"headers": {},
"waitFor": 0,
"mobile": false,
"skipTlsVerification": false,
"timeout": 30000,
"parsePDF": true,
"jsonOptions": {
"schema": {},
"systemPrompt": "<string>",
"prompt": "<string>",
"checkPromptInjection": false
},
"actions": [
{
"type": "wait",
"milliseconds": 2,
"selector": "#my-element"
}
],
"location": {
"country": "US",
"languages": [
"en-US"
]
},
"removeBase64Images": true,
"blockAds": true,
"storeInCache": true,
"threatProtection": {
"riskScoreThreshold": 75,
"blacklist": [
"<string>"
],
"whitelist": [
"<string>"
],
"blockedTlds": [
"<string>"
]
},
"formats": [
"markdown"
],
"changeTrackingOptions": {
"modes": [],
"schema": {},
"prompt": "<string>",
"tag": null
}
},
"zeroDataRetention": false
}
'import requests
url = "https://api.firecrawl.dev/v1/crawl"
payload = {
"url": "<string>",
"excludePaths": ["<string>"],
"includePaths": ["<string>"],
"regexOnFullURL": False,
"maxDepth": 10,
"maxDiscoveryDepth": 123,
"ignoreSitemap": False,
"ignoreQueryParameters": False,
"limit": 10000,
"allowBackwardLinks": False,
"crawlEntireDomain": False,
"allowExternalLinks": False,
"allowSubdomains": False,
"delay": 123,
"maxConcurrency": 123,
"scrapeOptions": {
"onlyMainContent": True,
"includeTags": ["<string>"],
"excludeTags": ["<string>"],
"maxAge": 0,
"headers": {},
"waitFor": 0,
"mobile": False,
"skipTlsVerification": False,
"timeout": 30000,
"parsePDF": True,
"jsonOptions": {
"schema": {},
"systemPrompt": "<string>",
"prompt": "<string>",
"checkPromptInjection": False
},
"actions": [
{
"type": "wait",
"milliseconds": 2,
"selector": "#my-element"
}
],
"location": {
"country": "US",
"languages": ["en-US"]
},
"removeBase64Images": True,
"blockAds": True,
"storeInCache": True,
"threatProtection": {
"riskScoreThreshold": 75,
"blacklist": ["<string>"],
"whitelist": ["<string>"],
"blockedTlds": ["<string>"]
},
"formats": ["markdown"],
"changeTrackingOptions": {
"modes": [],
"schema": {},
"prompt": "<string>",
"tag": None
}
},
"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>',
excludePaths: ['<string>'],
includePaths: ['<string>'],
regexOnFullURL: false,
maxDepth: 10,
maxDiscoveryDepth: 123,
ignoreSitemap: false,
ignoreQueryParameters: false,
limit: 10000,
allowBackwardLinks: false,
crawlEntireDomain: false,
allowExternalLinks: false,
allowSubdomains: false,
delay: 123,
maxConcurrency: 123,
scrapeOptions: {
onlyMainContent: true,
includeTags: ['<string>'],
excludeTags: ['<string>'],
maxAge: 0,
headers: {},
waitFor: 0,
mobile: false,
skipTlsVerification: false,
timeout: 30000,
parsePDF: true,
jsonOptions: {
schema: {},
systemPrompt: '<string>',
prompt: '<string>',
checkPromptInjection: false
},
actions: [{type: 'wait', milliseconds: 2, selector: '#my-element'}],
location: {country: 'US', languages: ['en-US']},
removeBase64Images: true,
blockAds: true,
storeInCache: true,
threatProtection: {
riskScoreThreshold: 75,
blacklist: ['<string>'],
whitelist: ['<string>'],
blockedTlds: ['<string>']
},
formats: ['markdown'],
changeTrackingOptions: {modes: [], schema: {}, prompt: '<string>', tag: null}
},
zeroDataRetention: false
})
};
fetch('https://api.firecrawl.dev/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://api.firecrawl.dev/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' => '<string>',
'excludePaths' => [
'<string>'
],
'includePaths' => [
'<string>'
],
'regexOnFullURL' => false,
'maxDepth' => 10,
'maxDiscoveryDepth' => 123,
'ignoreSitemap' => false,
'ignoreQueryParameters' => false,
'limit' => 10000,
'allowBackwardLinks' => false,
'crawlEntireDomain' => false,
'allowExternalLinks' => false,
'allowSubdomains' => false,
'delay' => 123,
'maxConcurrency' => 123,
'scrapeOptions' => [
'onlyMainContent' => true,
'includeTags' => [
'<string>'
],
'excludeTags' => [
'<string>'
],
'maxAge' => 0,
'headers' => [
],
'waitFor' => 0,
'mobile' => false,
'skipTlsVerification' => false,
'timeout' => 30000,
'parsePDF' => true,
'jsonOptions' => [
'schema' => [
],
'systemPrompt' => '<string>',
'prompt' => '<string>',
'checkPromptInjection' => false
],
'actions' => [
[
'type' => 'wait',
'milliseconds' => 2,
'selector' => '#my-element'
]
],
'location' => [
'country' => 'US',
'languages' => [
'en-US'
]
],
'removeBase64Images' => true,
'blockAds' => true,
'storeInCache' => true,
'threatProtection' => [
'riskScoreThreshold' => 75,
'blacklist' => [
'<string>'
],
'whitelist' => [
'<string>'
],
'blockedTlds' => [
'<string>'
]
],
'formats' => [
'markdown'
],
'changeTrackingOptions' => [
'modes' => [
],
'schema' => [
],
'prompt' => '<string>',
'tag' => null
]
],
'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/crawl"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"excludePaths\": [\n \"<string>\"\n ],\n \"includePaths\": [\n \"<string>\"\n ],\n \"regexOnFullURL\": false,\n \"maxDepth\": 10,\n \"maxDiscoveryDepth\": 123,\n \"ignoreSitemap\": false,\n \"ignoreQueryParameters\": false,\n \"limit\": 10000,\n \"allowBackwardLinks\": false,\n \"crawlEntireDomain\": false,\n \"allowExternalLinks\": false,\n \"allowSubdomains\": false,\n \"delay\": 123,\n \"maxConcurrency\": 123,\n \"scrapeOptions\": {\n \"onlyMainContent\": true,\n \"includeTags\": [\n \"<string>\"\n ],\n \"excludeTags\": [\n \"<string>\"\n ],\n \"maxAge\": 0,\n \"headers\": {},\n \"waitFor\": 0,\n \"mobile\": false,\n \"skipTlsVerification\": false,\n \"timeout\": 30000,\n \"parsePDF\": true,\n \"jsonOptions\": {\n \"schema\": {},\n \"systemPrompt\": \"<string>\",\n \"prompt\": \"<string>\",\n \"checkPromptInjection\": false\n },\n \"actions\": [\n {\n \"type\": \"wait\",\n \"milliseconds\": 2,\n \"selector\": \"#my-element\"\n }\n ],\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"removeBase64Images\": true,\n \"blockAds\": true,\n \"storeInCache\": true,\n \"threatProtection\": {\n \"riskScoreThreshold\": 75,\n \"blacklist\": [\n \"<string>\"\n ],\n \"whitelist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ]\n },\n \"formats\": [\n \"markdown\"\n ],\n \"changeTrackingOptions\": {\n \"modes\": [],\n \"schema\": {},\n \"prompt\": \"<string>\",\n \"tag\": null\n }\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/crawl")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"excludePaths\": [\n \"<string>\"\n ],\n \"includePaths\": [\n \"<string>\"\n ],\n \"regexOnFullURL\": false,\n \"maxDepth\": 10,\n \"maxDiscoveryDepth\": 123,\n \"ignoreSitemap\": false,\n \"ignoreQueryParameters\": false,\n \"limit\": 10000,\n \"allowBackwardLinks\": false,\n \"crawlEntireDomain\": false,\n \"allowExternalLinks\": false,\n \"allowSubdomains\": false,\n \"delay\": 123,\n \"maxConcurrency\": 123,\n \"scrapeOptions\": {\n \"onlyMainContent\": true,\n \"includeTags\": [\n \"<string>\"\n ],\n \"excludeTags\": [\n \"<string>\"\n ],\n \"maxAge\": 0,\n \"headers\": {},\n \"waitFor\": 0,\n \"mobile\": false,\n \"skipTlsVerification\": false,\n \"timeout\": 30000,\n \"parsePDF\": true,\n \"jsonOptions\": {\n \"schema\": {},\n \"systemPrompt\": \"<string>\",\n \"prompt\": \"<string>\",\n \"checkPromptInjection\": false\n },\n \"actions\": [\n {\n \"type\": \"wait\",\n \"milliseconds\": 2,\n \"selector\": \"#my-element\"\n }\n ],\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"removeBase64Images\": true,\n \"blockAds\": true,\n \"storeInCache\": true,\n \"threatProtection\": {\n \"riskScoreThreshold\": 75,\n \"blacklist\": [\n \"<string>\"\n ],\n \"whitelist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ]\n },\n \"formats\": [\n \"markdown\"\n ],\n \"changeTrackingOptions\": {\n \"modes\": [],\n \"schema\": {},\n \"prompt\": \"<string>\",\n \"tag\": null\n }\n },\n \"zeroDataRetention\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/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\": \"<string>\",\n \"excludePaths\": [\n \"<string>\"\n ],\n \"includePaths\": [\n \"<string>\"\n ],\n \"regexOnFullURL\": false,\n \"maxDepth\": 10,\n \"maxDiscoveryDepth\": 123,\n \"ignoreSitemap\": false,\n \"ignoreQueryParameters\": false,\n \"limit\": 10000,\n \"allowBackwardLinks\": false,\n \"crawlEntireDomain\": false,\n \"allowExternalLinks\": false,\n \"allowSubdomains\": false,\n \"delay\": 123,\n \"maxConcurrency\": 123,\n \"scrapeOptions\": {\n \"onlyMainContent\": true,\n \"includeTags\": [\n \"<string>\"\n ],\n \"excludeTags\": [\n \"<string>\"\n ],\n \"maxAge\": 0,\n \"headers\": {},\n \"waitFor\": 0,\n \"mobile\": false,\n \"skipTlsVerification\": false,\n \"timeout\": 30000,\n \"parsePDF\": true,\n \"jsonOptions\": {\n \"schema\": {},\n \"systemPrompt\": \"<string>\",\n \"prompt\": \"<string>\",\n \"checkPromptInjection\": false\n },\n \"actions\": [\n {\n \"type\": \"wait\",\n \"milliseconds\": 2,\n \"selector\": \"#my-element\"\n }\n ],\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"removeBase64Images\": true,\n \"blockAds\": true,\n \"storeInCache\": true,\n \"threatProtection\": {\n \"riskScoreThreshold\": 75,\n \"blacklist\": [\n \"<string>\"\n ],\n \"whitelist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ]\n },\n \"formats\": [\n \"markdown\"\n ],\n \"changeTrackingOptions\": {\n \"modes\": [],\n \"schema\": {},\n \"prompt\": \"<string>\",\n \"tag\": null\n }\n },\n \"zeroDataRetention\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"id": "<string>",
"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."
}Crawl
curl --request POST \
--url https://api.firecrawl.dev/v1/crawl \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"excludePaths": [
"<string>"
],
"includePaths": [
"<string>"
],
"regexOnFullURL": false,
"maxDepth": 10,
"maxDiscoveryDepth": 123,
"ignoreSitemap": false,
"ignoreQueryParameters": false,
"limit": 10000,
"allowBackwardLinks": false,
"crawlEntireDomain": false,
"allowExternalLinks": false,
"allowSubdomains": false,
"delay": 123,
"maxConcurrency": 123,
"scrapeOptions": {
"onlyMainContent": true,
"includeTags": [
"<string>"
],
"excludeTags": [
"<string>"
],
"maxAge": 0,
"headers": {},
"waitFor": 0,
"mobile": false,
"skipTlsVerification": false,
"timeout": 30000,
"parsePDF": true,
"jsonOptions": {
"schema": {},
"systemPrompt": "<string>",
"prompt": "<string>",
"checkPromptInjection": false
},
"actions": [
{
"type": "wait",
"milliseconds": 2,
"selector": "#my-element"
}
],
"location": {
"country": "US",
"languages": [
"en-US"
]
},
"removeBase64Images": true,
"blockAds": true,
"storeInCache": true,
"threatProtection": {
"riskScoreThreshold": 75,
"blacklist": [
"<string>"
],
"whitelist": [
"<string>"
],
"blockedTlds": [
"<string>"
]
},
"formats": [
"markdown"
],
"changeTrackingOptions": {
"modes": [],
"schema": {},
"prompt": "<string>",
"tag": null
}
},
"zeroDataRetention": false
}
'import requests
url = "https://api.firecrawl.dev/v1/crawl"
payload = {
"url": "<string>",
"excludePaths": ["<string>"],
"includePaths": ["<string>"],
"regexOnFullURL": False,
"maxDepth": 10,
"maxDiscoveryDepth": 123,
"ignoreSitemap": False,
"ignoreQueryParameters": False,
"limit": 10000,
"allowBackwardLinks": False,
"crawlEntireDomain": False,
"allowExternalLinks": False,
"allowSubdomains": False,
"delay": 123,
"maxConcurrency": 123,
"scrapeOptions": {
"onlyMainContent": True,
"includeTags": ["<string>"],
"excludeTags": ["<string>"],
"maxAge": 0,
"headers": {},
"waitFor": 0,
"mobile": False,
"skipTlsVerification": False,
"timeout": 30000,
"parsePDF": True,
"jsonOptions": {
"schema": {},
"systemPrompt": "<string>",
"prompt": "<string>",
"checkPromptInjection": False
},
"actions": [
{
"type": "wait",
"milliseconds": 2,
"selector": "#my-element"
}
],
"location": {
"country": "US",
"languages": ["en-US"]
},
"removeBase64Images": True,
"blockAds": True,
"storeInCache": True,
"threatProtection": {
"riskScoreThreshold": 75,
"blacklist": ["<string>"],
"whitelist": ["<string>"],
"blockedTlds": ["<string>"]
},
"formats": ["markdown"],
"changeTrackingOptions": {
"modes": [],
"schema": {},
"prompt": "<string>",
"tag": None
}
},
"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>',
excludePaths: ['<string>'],
includePaths: ['<string>'],
regexOnFullURL: false,
maxDepth: 10,
maxDiscoveryDepth: 123,
ignoreSitemap: false,
ignoreQueryParameters: false,
limit: 10000,
allowBackwardLinks: false,
crawlEntireDomain: false,
allowExternalLinks: false,
allowSubdomains: false,
delay: 123,
maxConcurrency: 123,
scrapeOptions: {
onlyMainContent: true,
includeTags: ['<string>'],
excludeTags: ['<string>'],
maxAge: 0,
headers: {},
waitFor: 0,
mobile: false,
skipTlsVerification: false,
timeout: 30000,
parsePDF: true,
jsonOptions: {
schema: {},
systemPrompt: '<string>',
prompt: '<string>',
checkPromptInjection: false
},
actions: [{type: 'wait', milliseconds: 2, selector: '#my-element'}],
location: {country: 'US', languages: ['en-US']},
removeBase64Images: true,
blockAds: true,
storeInCache: true,
threatProtection: {
riskScoreThreshold: 75,
blacklist: ['<string>'],
whitelist: ['<string>'],
blockedTlds: ['<string>']
},
formats: ['markdown'],
changeTrackingOptions: {modes: [], schema: {}, prompt: '<string>', tag: null}
},
zeroDataRetention: false
})
};
fetch('https://api.firecrawl.dev/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://api.firecrawl.dev/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' => '<string>',
'excludePaths' => [
'<string>'
],
'includePaths' => [
'<string>'
],
'regexOnFullURL' => false,
'maxDepth' => 10,
'maxDiscoveryDepth' => 123,
'ignoreSitemap' => false,
'ignoreQueryParameters' => false,
'limit' => 10000,
'allowBackwardLinks' => false,
'crawlEntireDomain' => false,
'allowExternalLinks' => false,
'allowSubdomains' => false,
'delay' => 123,
'maxConcurrency' => 123,
'scrapeOptions' => [
'onlyMainContent' => true,
'includeTags' => [
'<string>'
],
'excludeTags' => [
'<string>'
],
'maxAge' => 0,
'headers' => [
],
'waitFor' => 0,
'mobile' => false,
'skipTlsVerification' => false,
'timeout' => 30000,
'parsePDF' => true,
'jsonOptions' => [
'schema' => [
],
'systemPrompt' => '<string>',
'prompt' => '<string>',
'checkPromptInjection' => false
],
'actions' => [
[
'type' => 'wait',
'milliseconds' => 2,
'selector' => '#my-element'
]
],
'location' => [
'country' => 'US',
'languages' => [
'en-US'
]
],
'removeBase64Images' => true,
'blockAds' => true,
'storeInCache' => true,
'threatProtection' => [
'riskScoreThreshold' => 75,
'blacklist' => [
'<string>'
],
'whitelist' => [
'<string>'
],
'blockedTlds' => [
'<string>'
]
],
'formats' => [
'markdown'
],
'changeTrackingOptions' => [
'modes' => [
],
'schema' => [
],
'prompt' => '<string>',
'tag' => null
]
],
'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/crawl"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"excludePaths\": [\n \"<string>\"\n ],\n \"includePaths\": [\n \"<string>\"\n ],\n \"regexOnFullURL\": false,\n \"maxDepth\": 10,\n \"maxDiscoveryDepth\": 123,\n \"ignoreSitemap\": false,\n \"ignoreQueryParameters\": false,\n \"limit\": 10000,\n \"allowBackwardLinks\": false,\n \"crawlEntireDomain\": false,\n \"allowExternalLinks\": false,\n \"allowSubdomains\": false,\n \"delay\": 123,\n \"maxConcurrency\": 123,\n \"scrapeOptions\": {\n \"onlyMainContent\": true,\n \"includeTags\": [\n \"<string>\"\n ],\n \"excludeTags\": [\n \"<string>\"\n ],\n \"maxAge\": 0,\n \"headers\": {},\n \"waitFor\": 0,\n \"mobile\": false,\n \"skipTlsVerification\": false,\n \"timeout\": 30000,\n \"parsePDF\": true,\n \"jsonOptions\": {\n \"schema\": {},\n \"systemPrompt\": \"<string>\",\n \"prompt\": \"<string>\",\n \"checkPromptInjection\": false\n },\n \"actions\": [\n {\n \"type\": \"wait\",\n \"milliseconds\": 2,\n \"selector\": \"#my-element\"\n }\n ],\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"removeBase64Images\": true,\n \"blockAds\": true,\n \"storeInCache\": true,\n \"threatProtection\": {\n \"riskScoreThreshold\": 75,\n \"blacklist\": [\n \"<string>\"\n ],\n \"whitelist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ]\n },\n \"formats\": [\n \"markdown\"\n ],\n \"changeTrackingOptions\": {\n \"modes\": [],\n \"schema\": {},\n \"prompt\": \"<string>\",\n \"tag\": null\n }\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/crawl")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"excludePaths\": [\n \"<string>\"\n ],\n \"includePaths\": [\n \"<string>\"\n ],\n \"regexOnFullURL\": false,\n \"maxDepth\": 10,\n \"maxDiscoveryDepth\": 123,\n \"ignoreSitemap\": false,\n \"ignoreQueryParameters\": false,\n \"limit\": 10000,\n \"allowBackwardLinks\": false,\n \"crawlEntireDomain\": false,\n \"allowExternalLinks\": false,\n \"allowSubdomains\": false,\n \"delay\": 123,\n \"maxConcurrency\": 123,\n \"scrapeOptions\": {\n \"onlyMainContent\": true,\n \"includeTags\": [\n \"<string>\"\n ],\n \"excludeTags\": [\n \"<string>\"\n ],\n \"maxAge\": 0,\n \"headers\": {},\n \"waitFor\": 0,\n \"mobile\": false,\n \"skipTlsVerification\": false,\n \"timeout\": 30000,\n \"parsePDF\": true,\n \"jsonOptions\": {\n \"schema\": {},\n \"systemPrompt\": \"<string>\",\n \"prompt\": \"<string>\",\n \"checkPromptInjection\": false\n },\n \"actions\": [\n {\n \"type\": \"wait\",\n \"milliseconds\": 2,\n \"selector\": \"#my-element\"\n }\n ],\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"removeBase64Images\": true,\n \"blockAds\": true,\n \"storeInCache\": true,\n \"threatProtection\": {\n \"riskScoreThreshold\": 75,\n \"blacklist\": [\n \"<string>\"\n ],\n \"whitelist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ]\n },\n \"formats\": [\n \"markdown\"\n ],\n \"changeTrackingOptions\": {\n \"modes\": [],\n \"schema\": {},\n \"prompt\": \"<string>\",\n \"tag\": null\n }\n },\n \"zeroDataRetention\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/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\": \"<string>\",\n \"excludePaths\": [\n \"<string>\"\n ],\n \"includePaths\": [\n \"<string>\"\n ],\n \"regexOnFullURL\": false,\n \"maxDepth\": 10,\n \"maxDiscoveryDepth\": 123,\n \"ignoreSitemap\": false,\n \"ignoreQueryParameters\": false,\n \"limit\": 10000,\n \"allowBackwardLinks\": false,\n \"crawlEntireDomain\": false,\n \"allowExternalLinks\": false,\n \"allowSubdomains\": false,\n \"delay\": 123,\n \"maxConcurrency\": 123,\n \"scrapeOptions\": {\n \"onlyMainContent\": true,\n \"includeTags\": [\n \"<string>\"\n ],\n \"excludeTags\": [\n \"<string>\"\n ],\n \"maxAge\": 0,\n \"headers\": {},\n \"waitFor\": 0,\n \"mobile\": false,\n \"skipTlsVerification\": false,\n \"timeout\": 30000,\n \"parsePDF\": true,\n \"jsonOptions\": {\n \"schema\": {},\n \"systemPrompt\": \"<string>\",\n \"prompt\": \"<string>\",\n \"checkPromptInjection\": false\n },\n \"actions\": [\n {\n \"type\": \"wait\",\n \"milliseconds\": 2,\n \"selector\": \"#my-element\"\n }\n ],\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"removeBase64Images\": true,\n \"blockAds\": true,\n \"storeInCache\": true,\n \"threatProtection\": {\n \"riskScoreThreshold\": 75,\n \"blacklist\": [\n \"<string>\"\n ],\n \"whitelist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ]\n },\n \"formats\": [\n \"markdown\"\n ],\n \"changeTrackingOptions\": {\n \"modes\": [],\n \"schema\": {},\n \"prompt\": \"<string>\",\n \"tag\": null\n }\n },\n \"zeroDataRetention\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"id": "<string>",
"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."
}Note: A new v2 version of this API is now available with improved features and performance.
Authorizations
Body
URL pathname regex patterns that exclude matching URLs from the crawl. For example, if you set "excludePaths": ["blog/.*"] for the base URL firecrawl.dev, any results matching that pattern will be excluded, such as https://www.firecrawl.dev/blog/firecrawl-launch-week-1-recap. Patterns use Rust regex (RE2-style) syntax: look-around and backreferences are not supported, and a pattern that does not compile is rejected with a 400. Each field accepts at most 1000 patterns of at most 2000 characters each, and includePaths and excludePaths together may contain at most 1000 patterns and 100,000 characters in total. For keyword-style filtering, send one short pattern per term rather than combining terms into a single long alternation.
10002000URL pathname regex patterns that include matching URLs in the crawl. Only the paths that match the specified patterns will be included in the response. For example, if you set "includePaths": ["blog/.*"] for the base URL firecrawl.dev, only results matching that pattern will be included, such as https://www.firecrawl.dev/blog/firecrawl-launch-week-1-recap. Patterns use Rust regex (RE2-style) syntax: look-around and backreferences are not supported, and a pattern that does not compile is rejected with a 400. Each field accepts at most 1000 patterns of at most 2000 characters each, and includePaths and excludePaths together may contain at most 1000 patterns and 100,000 characters in total. For keyword-style filtering, send one short pattern per term rather than combining terms into a single long alternation.
10002000Allows the crawler to follow internal links to sibling or parent URLs, not just child paths.
false: Only crawls deeper (child) URLs. → e.g. /features/feature-1 → /features/feature-1/tips ✅ → Won't follow /pricing or / ❌
true: Crawls any internal links, including siblings and parents. → e.g. /features/feature-1 → /pricing, /, etc. ✅
Use true for broader internal coverage beyond nested paths.
If true, this will enable zero data retention for this crawl. To enable this feature, please contact help@firecrawl.dev

