tavily-map
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesetavily 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 loginWhen 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
undefinedbash
undefinedDiscover 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
undefinedtvly map "https://example.com" --max-depth 3 --limit 200 --json
undefinedOptions
可选参数
| Option | Description |
|---|---|
| Levels deep (1-5, default: 1) |
| Links per page (default: 20) |
| Max URLs to discover (default: 50) |
| Natural language guidance for URL filtering |
| Comma-separated regex patterns to include |
| Comma-separated regex patterns to exclude |
| Comma-separated regex for domains to include |
| Comma-separated regex for domains to exclude |
| Include external links |
| Max wait (10-150 seconds) |
| Save output to file |
| Structured JSON output |
| 参数 | 说明 |
|---|---|
| 遍历深度(1-5,默认值:1) |
| 每页提取的链接数(默认值:20) |
| 最多发现的URL数量(默认值:50) |
| 用于URL过滤的自然语言指导 |
| 要包含的路径正则表达式,用逗号分隔 |
| 要排除的路径正则表达式,用逗号分隔 |
| 要包含的域名正则表达式,用逗号分隔 |
| 要排除的域名正则表达式,用逗号分隔 |
| 是否包含外部链接 |
| 最长等待时间(10-150秒) |
| 将结果保存到文件 |
| 输出结构化JSON格式 |
Map + Extract pattern
Map + Extract 组合使用模式
Use to find the right page, then it. This is often more efficient than crawling an entire site:
mapextractbash
undefined先使用找到目标页面,再用提取内容。这种方式通常比爬取整个网站更高效:
mapextractbash
undefinedStep 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:提取你找到的特定页面内容
tvly extract "https://docs.example.com/api/authentication" --json
undefinedtvly extract "https://docs.example.com/api/authentication" --json
undefinedTips
小贴士
- Map is URL discovery only — no content extraction. Use or
extractfor content.crawl - Map + extract beats crawl when you only need a few specific pages from a large site.
- Use for semantic filtering when path patterns aren't enough.
--instructions
- 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 —— 当你需要获取大量页面内容时,进行批量提取