curl --request POST \
--url https://api.firecrawl.dev/v1/extract \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"urls": [
"<string>"
],
"enableWebSearch": false,
"ignoreInvalidURLs": false,
"ignoreSitemap": false,
"includeSubdomains": true,
"prompt": "<string>",
"schema": {},
"scrapeOptions": {
"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"
]
},
"showSources": false,
"threatProtection": {
"blacklist": [
"<string>"
],
"blockedTlds": [
"<string>"
],
"riskScoreThreshold": 75,
"whitelist": [
"<string>"
]
}
}
'import requests
url = "https://api.firecrawl.dev/v1/extract"
payload = {
"urls": ["<string>"],
"enableWebSearch": False,
"ignoreInvalidURLs": False,
"ignoreSitemap": False,
"includeSubdomains": True,
"prompt": "<string>",
"schema": {},
"scrapeOptions": {
"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"]
},
"showSources": False,
"threatProtection": {
"blacklist": ["<string>"],
"blockedTlds": ["<string>"],
"riskScoreThreshold": 75,
"whitelist": ["<string>"]
}
}
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({
urls: ['<string>'],
enableWebSearch: false,
ignoreInvalidURLs: false,
ignoreSitemap: false,
includeSubdomains: true,
prompt: '<string>',
schema: {},
scrapeOptions: {
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']
},
showSources: false,
threatProtection: {
blacklist: ['<string>'],
blockedTlds: ['<string>'],
riskScoreThreshold: 75,
whitelist: ['<string>']
}
})
};
fetch('https://api.firecrawl.dev/v1/extract', 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/extract",
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([
'urls' => [
'<string>'
],
'enableWebSearch' => false,
'ignoreInvalidURLs' => false,
'ignoreSitemap' => false,
'includeSubdomains' => true,
'prompt' => '<string>',
'schema' => [
],
'scrapeOptions' => [
'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'
]
],
'showSources' => false,
'threatProtection' => [
'blacklist' => [
'<string>'
],
'blockedTlds' => [
'<string>'
],
'riskScoreThreshold' => 75,
'whitelist' => [
'<string>'
]
]
]),
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/extract"
payload := strings.NewReader("{\n \"urls\": [\n \"<string>\"\n ],\n \"enableWebSearch\": false,\n \"ignoreInvalidURLs\": false,\n \"ignoreSitemap\": false,\n \"includeSubdomains\": true,\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"scrapeOptions\": {\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 },\n \"showSources\": false,\n \"threatProtection\": {\n \"blacklist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ],\n \"riskScoreThreshold\": 75,\n \"whitelist\": [\n \"<string>\"\n ]\n }\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/extract")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"<string>\"\n ],\n \"enableWebSearch\": false,\n \"ignoreInvalidURLs\": false,\n \"ignoreSitemap\": false,\n \"includeSubdomains\": true,\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"scrapeOptions\": {\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 },\n \"showSources\": false,\n \"threatProtection\": {\n \"blacklist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ],\n \"riskScoreThreshold\": 75,\n \"whitelist\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/v1/extract")
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 \"urls\": [\n \"<string>\"\n ],\n \"enableWebSearch\": false,\n \"ignoreInvalidURLs\": false,\n \"ignoreSitemap\": false,\n \"includeSubdomains\": true,\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"scrapeOptions\": {\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 },\n \"showSources\": false,\n \"threatProtection\": {\n \"blacklist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ],\n \"riskScoreThreshold\": 75,\n \"whitelist\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"invalidURLs": [
"<string>"
],
"success": true
}{
"error": "Invalid input data."
}{
"error": "An unexpected error occurred on the server."
}抽出
curl --request POST \
--url https://api.firecrawl.dev/v1/extract \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"urls": [
"<string>"
],
"enableWebSearch": false,
"ignoreInvalidURLs": false,
"ignoreSitemap": false,
"includeSubdomains": true,
"prompt": "<string>",
"schema": {},
"scrapeOptions": {
"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"
]
},
"showSources": false,
"threatProtection": {
"blacklist": [
"<string>"
],
"blockedTlds": [
"<string>"
],
"riskScoreThreshold": 75,
"whitelist": [
"<string>"
]
}
}
'import requests
url = "https://api.firecrawl.dev/v1/extract"
payload = {
"urls": ["<string>"],
"enableWebSearch": False,
"ignoreInvalidURLs": False,
"ignoreSitemap": False,
"includeSubdomains": True,
"prompt": "<string>",
"schema": {},
"scrapeOptions": {
"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"]
},
"showSources": False,
"threatProtection": {
"blacklist": ["<string>"],
"blockedTlds": ["<string>"],
"riskScoreThreshold": 75,
"whitelist": ["<string>"]
}
}
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({
urls: ['<string>'],
enableWebSearch: false,
ignoreInvalidURLs: false,
ignoreSitemap: false,
includeSubdomains: true,
prompt: '<string>',
schema: {},
scrapeOptions: {
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']
},
showSources: false,
threatProtection: {
blacklist: ['<string>'],
blockedTlds: ['<string>'],
riskScoreThreshold: 75,
whitelist: ['<string>']
}
})
};
fetch('https://api.firecrawl.dev/v1/extract', 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/extract",
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([
'urls' => [
'<string>'
],
'enableWebSearch' => false,
'ignoreInvalidURLs' => false,
'ignoreSitemap' => false,
'includeSubdomains' => true,
'prompt' => '<string>',
'schema' => [
],
'scrapeOptions' => [
'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'
]
],
'showSources' => false,
'threatProtection' => [
'blacklist' => [
'<string>'
],
'blockedTlds' => [
'<string>'
],
'riskScoreThreshold' => 75,
'whitelist' => [
'<string>'
]
]
]),
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/extract"
payload := strings.NewReader("{\n \"urls\": [\n \"<string>\"\n ],\n \"enableWebSearch\": false,\n \"ignoreInvalidURLs\": false,\n \"ignoreSitemap\": false,\n \"includeSubdomains\": true,\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"scrapeOptions\": {\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 },\n \"showSources\": false,\n \"threatProtection\": {\n \"blacklist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ],\n \"riskScoreThreshold\": 75,\n \"whitelist\": [\n \"<string>\"\n ]\n }\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/extract")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"<string>\"\n ],\n \"enableWebSearch\": false,\n \"ignoreInvalidURLs\": false,\n \"ignoreSitemap\": false,\n \"includeSubdomains\": true,\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"scrapeOptions\": {\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 },\n \"showSources\": false,\n \"threatProtection\": {\n \"blacklist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ],\n \"riskScoreThreshold\": 75,\n \"whitelist\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/v1/extract")
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 \"urls\": [\n \"<string>\"\n ],\n \"enableWebSearch\": false,\n \"ignoreInvalidURLs\": false,\n \"ignoreSitemap\": false,\n \"includeSubdomains\": true,\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"scrapeOptions\": {\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 },\n \"showSources\": false,\n \"threatProtection\": {\n \"blacklist\": [\n \"<string>\"\n ],\n \"blockedTlds\": [\n \"<string>\"\n ],\n \"riskScoreThreshold\": 75,\n \"whitelist\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"invalidURLs": [
"<string>"
],
"success": true
}{
"error": "Invalid input data."
}{
"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です。URLはglobパターン形式で指定してください。
true の場合、抽出では Web 検索を使用して追加データを取得します
urls 配列に無効な URL が指定されている場合、それらは無視されます。リクエスト全体が失敗するのではなく、有効な URL のみを使って抽出処理が実行され、無効な URL はレスポンスの invalidURLs フィールドに返されます。
true の場合、ウェブサイトのスキャン時に sitemap.xml ファイルは無視されます。
true の場合、指定した URL のサブドメインもスキャン対象になります
抽出プロセスを指示するプロンプト
抽出されたデータの構造を定義するスキーマ。JSON Schema に準拠している必要があります。
Show child attributes
Show child attributes
true の場合、データ抽出に使用されたソースが、レスポンス内の sources キーとして含まれます
リクエスト単位の脅威保護オーバーライドです。指定したフィールドは、このリクエストに限り、組織のポリシー内の対応するフィールドを上書きします。省略したフィールドには組織レベルの値がそのまま使用されます。利用するには、チームで脅威保護(エンタープライズ機能)が有効になっている必要があります。そうでない場合、リクエストは 403 で拒否されます。組織でリクエストのオーバーライドが無効になっている場合、このオブジェクトを含むリクエストはすべて 403 で拒否されます。チームで脅威保護の適用が必須になっている場合、mode に off は設定できません。
Show child attributes
Show child attributes

