列出交互会话
curl --request GET \
--url https://api.firecrawl.dev/v2/interact \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.firecrawl.dev/v2/interact"
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/interact', 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/interact",
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/interact"
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/interact")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/v2/interact")
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{
"sessions": [
{
"cdpUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"interactiveLiveViewUrl": "<string>",
"lastActivity": "2023-11-07T05:31:56Z",
"liveViewUrl": "<string>",
"streamWebView": true
}
],
"success": true
}{
"error": "Payment required to access this resource."
}交互端点
列出交互会话
检索你的独立交互会话,并可选地按状态进行过滤。
GET
/
interact
列出交互会话
curl --request GET \
--url https://api.firecrawl.dev/v2/interact \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.firecrawl.dev/v2/interact"
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/interact', 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/interact",
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/interact"
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/interact")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firecrawl.dev/v2/interact")
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{
"sessions": [
{
"cdpUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"interactiveLiveViewUrl": "<string>",
"lastActivity": "2023-11-07T05:31:56Z",
"liveViewUrl": "<string>",
"streamWebView": true
}
],
"success": true
}{
"error": "Payment required to access this resource."
}请求头
| 请求头 | 值 |
|---|---|
Authorization | Bearer <API_KEY> |
查询参数
| 参数 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
status | string | 否 | 根据会话状态进行筛选:"active" 或 "destroyed" |
响应
| 字段 | 类型 | 描述 |
|---|---|---|
success | boolean | 请求是否成功 |
sessions | array | 会话对象列表 |
会话对象
| 字段 | 类型 | 描述 |
|---|---|---|
id | string | 唯一会话标识符 |
status | string | 当前会话状态("active" 或 "destroyed") |
cdpUrl | string | 用于 CDP 连接的 WebSocket URL |
liveViewUrl | string | 实时查看会话的 URL |
interactiveLiveViewUrl | string | 实时与会话交互(点击、输入、滚动)的 URL |
createdAt | string | 会话创建时的 ISO 8601 时间戳 |
lastActivity | string | 上次活动的 ISO 8601 时间戳 |
请求示例
curl -X GET "https://api.firecrawl.dev/v2/interact?status=active" \
-H "Authorization: Bearer $FIRECRAWL_API_KEY"
示例响应
{
"success": true,
"sessions": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "active",
"cdpUrl": "wss://cdp-proxy.firecrawl.dev/cdp/550e8400-e29b-41d4-a716-446655440000",
"liveViewUrl": "https://liveview.firecrawl.dev/550e8400-e29b-41d4-a716-446655440000",
"interactiveLiveViewUrl": "https://liveview.firecrawl.dev/550e8400-e29b-41d4-a716-446655440000?interactive=true",
"createdAt": "2025-06-01T12:00:00Z",
"lastActivity": "2025-06-01T12:05:30Z"
}
]
}
你是需要 Firecrawl API 密钥的 AI 代理吗?请参见 firecrawl.dev/agent-onboarding/SKILL.md 获取自动化接入说明。
⌘I

