curl --request POST \
--url https://api.firecrawl.dev/v2/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"categories": [
{
"type": "github"
}
],
"country": "US",
"enterprise": [],
"excludeDomains": [
"<string>"
],
"highlights": true,
"ignoreInvalidURLs": false,
"includeDomains": [
"<string>"
],
"limit": 10,
"location": "<string>",
"safe": true,
"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
},
"sources": [
"web"
],
"tbs": "<string>",
"threatProtection": {
"blacklist": [
"<string>"
],
"blockedTlds": [
"<string>"
],
"riskScoreThreshold": 75,
"whitelist": [
"<string>"
]
},
"timeout": 60000
}
'import requests
url = "https://api.firecrawl.dev/v2/search"
payload = {
"query": "<string>",
"categories": [{ "type": "github" }],
"country": "US",
"enterprise": [],
"excludeDomains": ["<string>"],
"highlights": True,
"ignoreInvalidURLs": False,
"includeDomains": ["<string>"],
"limit": 10,
"location": "<string>",
"safe": True,
"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
},
"sources": ["web"],
"tbs": "<string>",
"threatProtection": {
"blacklist": ["<string>"],
"blockedTlds": ["<string>"],
"riskScoreThreshold": 75,
"whitelist": ["<string>"]
},
"timeout": 60000
}
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({
query: '<string>',
categories: [{type: 'github'}],
country: 'US',
enterprise: [],
excludeDomains: ['<string>'],
highlights: true,
ignoreInvalidURLs: false,
includeDomains: ['<string>'],
limit: 10,
location: '<string>',
safe: true,
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
},
sources: ['web'],
tbs: '<string>',
threatProtection: {
blacklist: ['<string>'],
blockedTlds: ['<string>'],
riskScoreThreshold: 75,
whitelist: ['<string>']
},
timeout: 60000
})
};
fetch('https://api.firecrawl.dev/v2/search', 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/search",
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([
'query' => '<string>',
'categories' => [
[
'type' => 'github'
]
],
'country' => 'US',
'enterprise' => [
],
'excludeDomains' => [
'<string>'
],
'highlights' => true,
'ignoreInvalidURLs' => false,
'includeDomains' => [
'<string>'
],
'limit' => 10,
'location' => '<string>',
'safe' => true,
'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
],
'sources' => [
'web'
],
'tbs' => '<string>',
'threatProtection' => [
'blacklist' => [
'<string>'
],
'blockedTlds' => [
'<string>'
],
'riskScoreThreshold' => 75,
'whitelist' => [
'<string>'
]
],
'timeout' => 60000
]),
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/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"categories\": [\n {\n \"type\": \"github\"\n }\n ],\n \"country\": \"US\",\n \"enterprise\": [],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"highlights\": true,\n \"ignoreInvalidURLs\": false,\n \"includeDomains\": [\n \"<string>\"\n ],\n \"limit\": 10,\n \"location\": \"<string>\",\n \"safe\": true,\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 \"sources\": [\n \"web\"\n ],\n \"tbs\": \"<string>\",\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}")
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/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"categories\": [\n {\n \"type\": \"github\"\n }\n ],\n \"country\": \"US\",\n \"enterprise\": [],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"highlights\": true,\n \"ignoreInvalidURLs\": false,\n \"includeDomains\": [\n \"<string>\"\n ],\n \"limit\": 10,\n \"location\": \"<string>\",\n \"safe\": true,\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 \"sources\": [\n \"web\"\n ],\n \"tbs\": \"<string>\",\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/v2/search")
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 \"query\": \"<string>\",\n \"categories\": [\n {\n \"type\": \"github\"\n }\n ],\n \"country\": \"US\",\n \"enterprise\": [],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"highlights\": true,\n \"ignoreInvalidURLs\": false,\n \"includeDomains\": [\n \"<string>\"\n ],\n \"limit\": 10,\n \"location\": \"<string>\",\n \"safe\": true,\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 \"sources\": [\n \"web\"\n ],\n \"tbs\": \"<string>\",\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}"
response = http.request(request)
puts response.read_body{
"creditsUsed": 123,
"data": {
"images": [
{
"imageHeight": 123,
"imageUrl": "<string>",
"imageWidth": 123,
"position": 123,
"title": "<string>",
"url": "<string>"
}
],
"news": [
{
"audio": "<string>",
"date": "<string>",
"html": "<string>",
"imageUrl": "<string>",
"links": [
"<string>"
],
"markdown": "<string>",
"metadata": {
"description": "<string>",
"error": "<string>",
"numPages": 123,
"sourceURL": "<string>",
"statusCode": 123,
"title": "<string>",
"totalPages": 123,
"url": "<string>"
},
"position": 123,
"rawHtml": "<string>",
"screenshot": "<string>",
"snippet": "<string>",
"title": "<string>",
"url": "<string>",
"video": "<string>"
}
],
"web": [
{
"audio": "<string>",
"description": "<string>",
"html": "<string>",
"links": [
"<string>"
],
"markdown": "<string>",
"metadata": {
"description": "<string>",
"error": "<string>",
"numPages": 123,
"sourceURL": "<string>",
"statusCode": 123,
"title": "<string>",
"totalPages": 123,
"url": "<string>"
},
"rawHtml": "<string>",
"screenshot": "<string>",
"title": "<string>",
"url": "<string>",
"video": "<string>"
}
]
},
"id": "<string>",
"success": true,
"warning": "<string>"
}{
"error": "Request timed out",
"success": false
}{
"code": "UNKNOWN_ERROR",
"error": "An unexpected error occurred on the server.",
"success": false
}検索
curl --request POST \
--url https://api.firecrawl.dev/v2/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"categories": [
{
"type": "github"
}
],
"country": "US",
"enterprise": [],
"excludeDomains": [
"<string>"
],
"highlights": true,
"ignoreInvalidURLs": false,
"includeDomains": [
"<string>"
],
"limit": 10,
"location": "<string>",
"safe": true,
"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
},
"sources": [
"web"
],
"tbs": "<string>",
"threatProtection": {
"blacklist": [
"<string>"
],
"blockedTlds": [
"<string>"
],
"riskScoreThreshold": 75,
"whitelist": [
"<string>"
]
},
"timeout": 60000
}
'import requests
url = "https://api.firecrawl.dev/v2/search"
payload = {
"query": "<string>",
"categories": [{ "type": "github" }],
"country": "US",
"enterprise": [],
"excludeDomains": ["<string>"],
"highlights": True,
"ignoreInvalidURLs": False,
"includeDomains": ["<string>"],
"limit": 10,
"location": "<string>",
"safe": True,
"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
},
"sources": ["web"],
"tbs": "<string>",
"threatProtection": {
"blacklist": ["<string>"],
"blockedTlds": ["<string>"],
"riskScoreThreshold": 75,
"whitelist": ["<string>"]
},
"timeout": 60000
}
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({
query: '<string>',
categories: [{type: 'github'}],
country: 'US',
enterprise: [],
excludeDomains: ['<string>'],
highlights: true,
ignoreInvalidURLs: false,
includeDomains: ['<string>'],
limit: 10,
location: '<string>',
safe: true,
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
},
sources: ['web'],
tbs: '<string>',
threatProtection: {
blacklist: ['<string>'],
blockedTlds: ['<string>'],
riskScoreThreshold: 75,
whitelist: ['<string>']
},
timeout: 60000
})
};
fetch('https://api.firecrawl.dev/v2/search', 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/search",
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([
'query' => '<string>',
'categories' => [
[
'type' => 'github'
]
],
'country' => 'US',
'enterprise' => [
],
'excludeDomains' => [
'<string>'
],
'highlights' => true,
'ignoreInvalidURLs' => false,
'includeDomains' => [
'<string>'
],
'limit' => 10,
'location' => '<string>',
'safe' => true,
'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
],
'sources' => [
'web'
],
'tbs' => '<string>',
'threatProtection' => [
'blacklist' => [
'<string>'
],
'blockedTlds' => [
'<string>'
],
'riskScoreThreshold' => 75,
'whitelist' => [
'<string>'
]
],
'timeout' => 60000
]),
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/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"categories\": [\n {\n \"type\": \"github\"\n }\n ],\n \"country\": \"US\",\n \"enterprise\": [],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"highlights\": true,\n \"ignoreInvalidURLs\": false,\n \"includeDomains\": [\n \"<string>\"\n ],\n \"limit\": 10,\n \"location\": \"<string>\",\n \"safe\": true,\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 \"sources\": [\n \"web\"\n ],\n \"tbs\": \"<string>\",\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}")
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/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"categories\": [\n {\n \"type\": \"github\"\n }\n ],\n \"country\": \"US\",\n \"enterprise\": [],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"highlights\": true,\n \"ignoreInvalidURLs\": false,\n \"includeDomains\": [\n \"<string>\"\n ],\n \"limit\": 10,\n \"location\": \"<string>\",\n \"safe\": true,\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 \"sources\": [\n \"web\"\n ],\n \"tbs\": \"<string>\",\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/v2/search")
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 \"query\": \"<string>\",\n \"categories\": [\n {\n \"type\": \"github\"\n }\n ],\n \"country\": \"US\",\n \"enterprise\": [],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"highlights\": true,\n \"ignoreInvalidURLs\": false,\n \"includeDomains\": [\n \"<string>\"\n ],\n \"limit\": 10,\n \"location\": \"<string>\",\n \"safe\": true,\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 \"sources\": [\n \"web\"\n ],\n \"tbs\": \"<string>\",\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}"
response = http.request(request)
puts response.read_body{
"creditsUsed": 123,
"data": {
"images": [
{
"imageHeight": 123,
"imageUrl": "<string>",
"imageWidth": 123,
"position": 123,
"title": "<string>",
"url": "<string>"
}
],
"news": [
{
"audio": "<string>",
"date": "<string>",
"html": "<string>",
"imageUrl": "<string>",
"links": [
"<string>"
],
"markdown": "<string>",
"metadata": {
"description": "<string>",
"error": "<string>",
"numPages": 123,
"sourceURL": "<string>",
"statusCode": 123,
"title": "<string>",
"totalPages": 123,
"url": "<string>"
},
"position": 123,
"rawHtml": "<string>",
"screenshot": "<string>",
"snippet": "<string>",
"title": "<string>",
"url": "<string>",
"video": "<string>"
}
],
"web": [
{
"audio": "<string>",
"description": "<string>",
"html": "<string>",
"links": [
"<string>"
],
"markdown": "<string>",
"metadata": {
"description": "<string>",
"error": "<string>",
"numPages": 123,
"sourceURL": "<string>",
"statusCode": 123,
"title": "<string>",
"totalPages": 123,
"url": "<string>"
},
"rawHtml": "<string>",
"screenshot": "<string>",
"title": "<string>",
"url": "<string>",
"video": "<string>"
}
]
},
"id": "<string>",
"success": true,
"warning": "<string>"
}{
"error": "Request timed out",
"success": false
}{
"code": "UNKNOWN_ERROR",
"error": "An unexpected error occurred on the server.",
"success": false
}scrapeOptions に formats: [{"type": "markdown"}] を指定してください。指定しない場合は、結果(url、title、description)がデフォルトで返されます。要約されたコンテンツが必要な場合は、{"type": "summary"} など他のフォーマットも使用できます。
サポートされているクエリ演算子
| 演算子 | 機能 | 例 |
|---|---|---|
"" | テキストを厳密一致で検索する | "Firecrawl" |
- | 特定のキーワードを除外、または他の演算子を否定する | -bad, -site:firecrawl.dev |
site: | 指定したサイトの結果のみを返す | site:firecrawl.dev |
filetype: | 特定のファイル拡張子を持つ結果のみを返す | filetype:pdf, -filetype:pdf |
inurl: | URL に特定の語を含む結果のみを返す | inurl:firecrawl |
allinurl: | URL に複数の語を含む結果のみを返す | allinurl:git firecrawl |
intitle: | ページタイトルに特定の語を含む結果のみを返す | intitle:Firecrawl |
allintitle: | ページタイトルに複数の語を含む結果のみを返す | allintitle:firecrawl playground |
related: | 特定のドメインに関連する結果のみを返す | related:firecrawl.dev |
imagesize: | 指定した寸法と完全一致の画像のみを返す | imagesize:1920x1080 |
larger: | 指定した寸法より大きい画像のみを返す | larger:1920x1080 |
Location パラメータ
location パラメータで地域ターゲットの検索結果を取得します。形式: "string"。例: "Germany"、"San Francisco,California,United States"。
利用可能な国と言語の一覧は、サポート対象ロケーションの全リストをご覧ください。
Country パラメータ
country パラメータで、ISO の国コードを用いて検索結果の対象国を指定します。既定値: "US"。
例: "US", "DE", "FR", "JP", "UK", "CA"。
{
"query": "レストラン",
"country": "DE"
}
Categories パラメータ
categories パラメータで、特定のカテゴリに検索結果を絞り込みます:
github: GitHub のリポジトリ、コード、Issue、ドキュメントを検索research: 学術系・研究系のウェブサイト(arXiv、Nature、IEEE、PubMed など)を検索pdf: PDF を検索
使い方の例
{
"query": "機械学習",
"categories": ["github", "research"],
"limit": 10
}
ドメインフィルター
includeDomains を使うと結果を特定のドメインに限定でき、excludeDomains を使うと検索結果から特定のドメインを除外できます。ドメインには、プロトコルやパスを含めず、ホスト名のみを指定してください。
includeDomains と excludeDomains は同時に使用できません。
含めるドメインの例
{
"query": "web scraping",
"includeDomains": ["firecrawl.dev", "docs.firecrawl.dev"],
"limit": 10
}
除外ドメインの例
{
"query": "web scraping tools",
"excludeDomains": ["example.com"],
"limit": 10
}
カテゴリレスポンス
category フィールドが含まれます。
{
"success": true,
"data": {
"web": [
{
"url": "https://github.com/example/ml-project",
"title": "Machine Learning Project",
"description": "Implementation of ML algorithms",
"category": "github"
},
{
"url": "https://arxiv.org/abs/2024.12345",
"title": "ML Research Paper",
"description": "Latest advances in machine learning",
"category": "research"
}
]
}
}
時間ベースの検索
tbs パラメータを使用すると、カスタム日付範囲を含む期間で検索結果を時間別に絞り込むことができます。詳細な例とサポートされている形式については、検索機能のドキュメントを参照してください。
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.
ボディ
検索クエリ
500結果をカテゴリでフィルタリングするための指定。デフォルト値は [] で、この場合はカテゴリによるフィルタリングは行われません。
- GitHub
- Research
- PDF
Show child attributes
Show child attributes
検索結果のジオターゲティングに使用する ISO 国コード(例:US)。最適な結果を得るには、これと location パラメータの両方を設定してください。
Zero Data Retention(ZDR)向けのエンタープライズ search options。エンドツーエンドの ZDR には ["zdr"](10 credits / 10件の結果)、匿名化された ZDR には ["anon"](2 credits / 10件の結果)を使用します。利用するには、チームで有効になっている必要があります。
anon, zdr 指定したドメインからの検索結果を除外します。ドメインには、プロトコルやパスを含まないホスト名のみを指定してください。includeDomains とは併用できません。
検索結果に対して、query に関連するハイライトを生成します。false に設定すると、ハイライトなしでプロバイダーの説明またはスニペットを返します。
他の Firecrawl エンドポイントでは無効となる URL を検索結果から除外します。これにより、検索から取得したデータを他の Firecrawl API エンドポイントに渡す際のエラーを減らせます。
検索結果を指定したドメインに限定します。ドメインには、プロトコルやパスを含まないホスト名のみを指定してください。excludeDomains とは併用できません。
返す結果の最大件数(複数のソースを使用する場合は、ソースの種類ごと)
1 <= x <= 100検索結果のロケーションを指定するパラメータ(例: San Francisco,California,United States)。最適な結果を得るには、このパラメータと country パラメータの両方を設定してください。
trueの場合、検索結果から露骨なコンテンツを除外します(SafeSearch)。省略した場合は、フィルターを適用しないデフォルトの動作になります。
検索結果をスクレイピングする際のオプション
Show child attributes
Show child attributes
検索対象とするソース。レスポンスに含まれる配列の種類を決定します。デフォルトは ['web'] です。
- Web
- Images
- News
Show child attributes
Show child attributes
時間ベースの検索パラメータで、あらかじめ定義された期間(qdr:h, qdr:d, qdr:w, qdr:m, qdr:y)、カスタム日付範囲(cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY)、日付順でのソート(sbd:1)をサポートします。値は組み合わせて指定できます(例: sbd:1,qdr:w)。
このリクエスト単位の 脅威保護 オーバーライドです。指定したフィールドは、このリクエストに限り、組織のポリシー内の対応するフィールドを置き換えます。省略したフィールドには組織レベルの値がそのまま適用されます。利用するには、チームで脅威保護が有効になっている必要があります(エンタープライズ機能)。有効でない場合、リクエストは 403 で拒否されます。組織でリクエストごとのオーバーライドが無効になっている場合、このオブジェクトを含むリクエストはすべて 403 で拒否されます。チームに対して脅威保護が強制適用されている場合、mode に off は設定できません。
Show child attributes
Show child attributes
タイムアウト時間(ミリ秒)
このページは役に立ちましたか?

