tavily-map

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

tavily map

tavily map

Discover URLs on a website without extracting content. Faster than crawling.
发现网站上的URL,无需提取内容。比爬虫速度更快。

Prerequisites

前提条件

Requires the Tavily CLI. See tavily-cli for install and auth setup.
Quick install:
curl -fsSL https://cli.tavily.com/install.sh | bash && tvly login
需要安装Tavily CLI。请查看tavily-cli了解安装和身份验证设置。
快速安装命令:
curl -fsSL https://cli.tavily.com/install.sh | bash && tvly login

When to use

使用场景

  • You need to find a specific subpage on a large site
  • You want a list of all URLs before deciding what to extract or crawl
  • Step 3 in the workflow: search → extract → map → crawl → research
  • 你需要在大型网站上找到特定子页面
  • 你想先获取所有URL列表,再决定要提取或爬取哪些内容
  • 作为工作流的第三步:搜索 → 提取 → 映射 → 爬取 → 调研

Quick start

快速开始

bash
undefined
bash
undefined

Discover all URLs

发现所有URL

tvly map "https://docs.example.com" --json
tvly map "https://docs.example.com" --json

With natural language filtering

结合自然语言过滤

tvly map "https://docs.example.com" --instructions "Find API docs and guides" --json
tvly map "https://docs.example.com" --instructions "Find API docs and guides" --json

Filter by path

按路径过滤

tvly map "https://example.com" --select-paths "/blog/.*" --limit 500 --json
tvly map "https://example.com" --select-paths "/blog/.*" --limit 500 --json

Deep map

深度映射

tvly map "https://example.com" --max-depth 3 --limit 200 --json
undefined
tvly map "https://example.com" --max-depth 3 --limit 200 --json
undefined

Options

可选参数

OptionDescription
--max-depth
Levels deep (1-5, default: 1)
--max-breadth
Links per page (default: 20)
--limit
Max URLs to discover (default: 50)
--instructions
Natural language guidance for URL filtering
--select-paths
Comma-separated regex patterns to include
--exclude-paths
Comma-separated regex patterns to exclude
--select-domains
Comma-separated regex for domains to include
--exclude-domains
Comma-separated regex for domains to exclude
--allow-external / --no-external
Include external links
--timeout
Max wait (10-150 seconds)
-o, --output
Save output to file
--json
Structured JSON output
参数说明
--max-depth
遍历深度(1-5,默认值:1)
--max-breadth
每页提取的链接数(默认值:20)
--limit
最多发现的URL数量(默认值:50)
--instructions
用于URL过滤的自然语言指导
--select-paths
要包含的路径正则表达式,用逗号分隔
--exclude-paths
要排除的路径正则表达式,用逗号分隔
--select-domains
要包含的域名正则表达式,用逗号分隔
--exclude-domains
要排除的域名正则表达式,用逗号分隔
--allow-external / --no-external
是否包含外部链接
--timeout
最长等待时间(10-150秒)
-o, --output
将结果保存到文件
--json
输出结构化JSON格式

Map + Extract pattern

Map + Extract 组合使用模式

Use
map
to find the right page, then
extract
it. This is often more efficient than crawling an entire site:
bash
undefined
先使用
map
找到目标页面,再用
extract
提取内容。这种方式通常比爬取整个网站更高效:
bash
undefined

Step 1: Find the authentication docs

步骤1:找到身份验证相关文档

tvly map "https://docs.example.com" --instructions "authentication" --json
tvly map "https://docs.example.com" --instructions "authentication" --json

Step 2: Extract the specific page you found

步骤2:提取你找到的特定页面内容

undefined
undefined

Tips

小贴士

  • Map is URL discovery only — no content extraction. Use
    extract
    or
    crawl
    for content.
  • Map + extract beats crawl when you only need a few specific pages from a large site.
  • Use
    --instructions
    for semantic filtering when path patterns aren't enough.
  • Map仅用于URL发现 —— 不提取内容。如需提取内容,请使用
    extract
    crawl
    功能。
  • 当你只需要从大型网站获取少量特定页面时,Map + Extract的组合比直接爬取更高效。
  • 当路径模式无法满足需求时,使用
    --instructions
    进行语义过滤。

See also

相关链接

  • tavily-extract — extract content from URLs you discover
  • tavily-crawl — bulk extract when you need many pages
  • tavily-extract —— 提取你发现的URL中的内容
  • tavily-crawl —— 当你需要获取大量页面内容时,进行批量提取