跳转到主要内容
POST
/
map
基于选项对多个 URL 进行映射
curl --request POST \
  --url https://api.firecrawl.dev/v1/map \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "search": "<string>",
  "ignoreSitemap": true,
  "sitemapOnly": false,
  "includeSubdomains": true,
  "limit": 5000,
  "timeout": 123,
  "location": {
    "country": "US",
    "languages": [
      "en-US"
    ]
  }
}
'
{
  "success": true,
  "links": [
    "<string>"
  ]
}
注意:本 API 的全新 v2 版本 现已发布,具备更强大的功能和更高的性能。

授权

Authorization
string
header
必填

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

请求体

application/json
url
string<uri>
必填

开始爬取时使用的基础 URL

用于映射的搜索查询。在 Alpha 阶段,搜索功能中的「智能」部分最多只会处理 500 条搜索结果。不过,如果 Map 找到更多结果,则不会对这些结果施加任何限制。

ignoreSitemap
boolean
默认值:true

抓取网站时忽略其 sitemap。

sitemapOnly
boolean
默认值:false

仅返回网站站点地图中包含的链接

includeSubdomains
boolean
默认值:true

包含该网站子域名

limit
integer
默认值:5000

要返回的最大链接数

必填范围: x <= 30000
timeout
integer

超时时间(毫秒)。默认情况下没有超时限制。

location
object

请求的地理位置设置。指定后(如果可用),将使用相应的代理,并模拟对应的语言和时区设置。如果未指定,默认值为“US”。

响应

成功响应

success
boolean