跳转到主要内容
POST
/
crawl
/
params-preview
预览由自然语言提示词生成的爬取参数
curl --request POST \
  --url https://api.firecrawl.dev/v2/crawl/params-preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "prompt": "<string>"
}
'
{
  "success": true,
  "data": {
    "url": "<string>",
    "includePaths": [
      "<string>"
    ],
    "excludePaths": [
      "<string>"
    ],
    "maxDepth": 123,
    "maxDiscoveryDepth": 123,
    "crawlEntireDomain": true,
    "allowExternalLinks": true,
    "allowSubdomains": true,
    "sitemap": "skip",
    "ignoreQueryParameters": true,
    "deduplicateSimilarURLs": true,
    "delay": 123,
    "limit": 123
  }
}

v2 新变化

爬取参数预览

{
  "url": "https://example.com",
  "prompt": "抓取整个网站,但排除 /admin 与 /api"
}   

响应

{
  "url": "https://example.com",
  "prompt": "抓取整个网站",
  "crawlEntireDomain": true,
  "excludePaths": ["/admin/.*", "/api/.*"],
  "sitemap": "include"
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
url
string<uri>
必填

要抓取的 URL

prompt
string
必填

用自然语言编写的、描述你想爬取内容的提示词

Maximum string length: 10000

响应

成功响应(包含生成的爬取参数)

success
boolean
示例:

true

data
object