注意:现已推出该 API 的全新 v2 版本,功能与性能均有升级。该 /search 端点将网页搜索(SERP)与 Firecrawl 的抓取能力相结合,可为任意查询返回完整页面内容。 在请求中包含
scrapeOptions
并设置 formats: ["markdown"]
,即可为每个搜索结果获取完整的 markdown 内容;否则将默认仅返回 SERP 结果(url、title、description)。
支持的查询运算符
运算符 | 功能 | 示例 |
---|---|---|
"" | 对一段文本进行精确匹配 | "Firecrawl" |
- | 排除特定关键词或对其他运算符取反 | -bad , -site:firecrawl.dev |
site: | 仅返回来自指定网站的结果 | site:firecrawl.dev |
inurl: | 仅返回在 URL 中包含某个词的结果 | inurl:firecrawl |
allinurl: | 仅返回在 URL 中包含多个词的结果 | allinurl:git firecrawl |
intitle: | 仅返回在页面标题中包含某个词的结果 | intitle:Firecrawl |
allintitle: | 仅返回在页面标题中包含多个词的结果 | allintitle:firecrawl playground |
related: | 仅返回与特定域名相关的结果 | related:firecrawl.dev |
Location 参数
location
参数获取按地理位置定向的搜索结果。格式:“string”。示例:“Germany”、“San Francisco,California,United States”。
请参阅完整的支持位置列表,了解所有可用的国家和语言。
基于时间的搜索
tbs
参数按时间范围筛选结果,支持自定义日期区间。详见搜索功能文档,其中包含详细示例和支持的 formats。Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
The search query
Maximum number of results to return
Required range:
1 <= x <= 100
Time-based search parameter. Supports predefined time ranges (qdr:h
, qdr:d
, qdr:w
, qdr:m
, qdr:y
) and custom date ranges (cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY
)
Location parameter for search results
Timeout in milliseconds
Excludes URLs from the search results that are invalid for other Firecrawl endpoints. This helps reduce errors if you are piping data from search into other Firecrawl API endpoints.
Options for scraping search results