firecrawl-search

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

firecrawl search

firecrawl search

Web search with optional content scraping. Returns search results as JSON, optionally with full page content.
具备可选内容抓取功能的网页搜索工具。返回JSON格式的搜索结果,可选择包含全页面内容。

When to use

适用场景

  • You don't have a specific URL yet
  • You need to find pages, answer questions, or discover sources
  • First step in the workflow escalation pattern: search → scrape → map → crawl → browser
  • 你还没有具体的URL
  • 你需要查找页面、解答问题或发掘信息来源
  • 工作流升级模式的第一步:搜索 → 抓取 → 映射 → 爬取 → 浏览器

Quick start

快速开始

bash
undefined
bash
undefined

Basic search

基础搜索

firecrawl search "your query" -o .firecrawl/result.json --json
firecrawl search "你的查询内容" -o .firecrawl/result.json --json

Search and scrape full page content from results

搜索并抓取结果中的全页面内容

firecrawl search "your query" --scrape -o .firecrawl/scraped.json --json
firecrawl search "你的查询内容" --scrape -o .firecrawl/scraped.json --json

News from the past day

获取过去24小时的新闻

firecrawl search "your query" --sources news --tbs qdr:d -o .firecrawl/news.json --json
undefined
firecrawl search "你的查询内容" --sources news --tbs qdr:d -o .firecrawl/news.json --json
undefined

Options

选项

OptionDescription
--limit <n>
Max number of results
--sources <web,images,news>
Source types to search
--categories <github,research,pdf>
Filter by category
--tbs <qdr:h|d|w|m|y>
Time-based search filter
--location
Location for search results
--country <code>
Country code for search
--scrape
Also scrape full page content for each result
--scrape-formats
Formats when scraping (default: markdown)
-o, --output <path>
Output file path
--json
Output as JSON
选项说明
--limit <n>
最大结果数量
--sources <web,images,news>
要搜索的来源类型
--categories <github,research,pdf>
按类别筛选
--tbs <qdr:h|d|w|m|y>
基于时间的搜索筛选条件
--location
搜索结果的地理位置
--country <code>
搜索的国家代码
--scrape
同时抓取每个结果的全页面内容
--scrape-formats
抓取时的格式(默认:markdown)
-o, --output <path>
输出文件路径
--json
以JSON格式输出

Tips

使用技巧

  • --scrape
    fetches full content
    — don't re-scrape URLs from search results. This saves credits and avoids redundant fetches.
  • Always write results to
    .firecrawl/
    with
    -o
    to avoid context window bloat.
  • Use
    jq
    to extract URLs or titles:
    jq -r '.data.web[].url' .firecrawl/search.json
  • Naming convention:
    .firecrawl/search-{query}.json
    or
    .firecrawl/search-{query}-scraped.json
  • --scrape
    会获取全内容
    ——请勿重复抓取搜索结果中的URL。这样可以节省积分并避免冗余请求。
  • 始终使用
    -o
    参数将结果写入
    .firecrawl/
    目录,以避免上下文窗口过载。
  • 使用
    jq
    提取URL或标题:
    jq -r '.data.web[].url' .firecrawl/search.json
  • 命名规范:
    .firecrawl/search-{query}.json
    .firecrawl/search-{query}-scraped.json

See also

相关链接

  • firecrawl-scrape — scrape a specific URL
  • firecrawl-map — discover URLs within a site
  • firecrawl-crawl — bulk extract from a site
  • firecrawl-scrape — 抓取特定URL
  • firecrawl-map — 发掘站点内的URL
  • firecrawl-crawl — 批量提取站点内容