クロールジョブの状態を取得する
curl --request GET \
--url https://api.firecrawl.dev/v2/crawl/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.firecrawl.dev/v2/crawl/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.firecrawl.dev/v2/crawl/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.firecrawl.dev/v2/crawl/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.firecrawl.dev/v2/crawl/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/v2/crawl/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"completed": 123,
"completedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"creditsUsed": 123,
"data": [
{
"html": "<string>",
"links": [
"<string>"
],
"markdown": "<string>",
"metadata": {
"<any other metadata> ": "<string>",
"concurrencyLimited": true,
"concurrencyQueueDurationMs": 123,
"description": "<string>",
"error": "<string>",
"keywords": "<string>",
"language": "<string>",
"numPages": 123,
"ogLocaleAlternate": [
"<string>"
],
"sourceURL": "<string>",
"statusCode": 123,
"title": "<string>",
"totalPages": 123,
"url": "<string>"
},
"rawHtml": "<string>",
"screenshot": "<string>"
}
],
"duration": 123,
"expiresAt": "2023-11-07T05:31:56Z",
"next": "<string>",
"status": "<string>",
"total": 123
}{
"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."
}クロールエンドポイント
クロールのステータスを取得
GET
/
crawl
/
{id}
クロールジョブの状態を取得する
curl --request GET \
--url https://api.firecrawl.dev/v2/crawl/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.firecrawl.dev/v2/crawl/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.firecrawl.dev/v2/crawl/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.firecrawl.dev/v2/crawl/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.firecrawl.dev/v2/crawl/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/v2/crawl/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"completed": 123,
"completedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"creditsUsed": 123,
"data": [
{
"html": "<string>",
"links": [
"<string>"
],
"markdown": "<string>",
"metadata": {
"<any other metadata> ": "<string>",
"concurrencyLimited": true,
"concurrencyQueueDurationMs": 123,
"description": "<string>",
"error": "<string>",
"keywords": "<string>",
"language": "<string>",
"numPages": 123,
"ogLocaleAlternate": [
"<string>"
],
"sourceURL": "<string>",
"statusCode": 123,
"title": "<string>",
"totalPages": 123,
"url": "<string>"
},
"rawHtml": "<string>",
"screenshot": "<string>"
}
],
"duration": 123,
"expiresAt": "2023-11-07T05:31:56Z",
"next": "<string>",
"status": "<string>",
"total": 123
}{
"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キーが必要なAIエージェントの方は、自動オンボーディング手順についてfirecrawl.dev/agent-onboarding/SKILL.mdを参照してください。
承認
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
クロールジョブのID
レスポンス
成功時のレスポンス
クロールに成功したページ数。
クロールの終了日時。クロールが終了状態(completed、failed、cancelled)の場合にのみ設定されます。
クロールの開始日時。
このクロールで消費されたクレジット数。
クロールデータ。
Show child attributes
Show child attributes
クロールの所要時間(秒)。終了済みのクロールでは createdAt から completedAt までの経過時間、進行中のクロールでは createdAt から現在までの経過時間を示します。
クロールの有効期限となる日時。
次の 10MB 分のデータを取得するための URL。クロールが完了していない場合、またはレスポンスが 10MB を超える場合に返されます。
クロールの現在の状態です。scraping、completed、failed のいずれかです。
クロールを試行したページ数の合計。
⌘I

