Extract content from specific URLs using Tavily's extraction API. Returns clean markdown/text from web pages. Use when you have specific URLs and need their content without writing code.
从特定URL中提取干净内容。当您明确知道需要从哪些页面获取内容时,此功能最为理想。
该脚本通过Tavily MCP服务器使用OAuth进行身份验证。无需手动设置——首次运行时,它将:
注意: 您必须拥有现有的Tavily账户。OAuth流程仅支持登录——无法通过此流程创建账户。如果您没有账户,请先在tavily.com注册。
如果您更倾向于使用API密钥,请前往https://tavily.com获取密钥,并将其添加到~/.claude/settings.json:
json
{
env: {
TAVILYAPIKEY: tvly-在此处输入您的API密钥
}
}
bash
./scripts/extract.sh
示例:
bash
bash
curl --request POST \
--url https://api.tavily.com/extract \
--header Authorization: Bearer $TAVILYAPIKEY \
--header Content-Type: application/json \
--data {
urls: [https://example.com/article]
}
bash
curl --request POST \
--url https://api.tavily.com/extract \
--header Authorization: Bearer $TAVILYAPIKEY \
--header Content-Type: application/json \
--data {
urls: [
https://example.com/ml-healthcare,
https://example.com/ai-diagnostics
],
query: AI diagnostic tools accuracy,
chunkspersource: 3
}
POST https://api.tavily.com/extract
| 请求头 | 值 |
|---|---|
| Authorization | Bearer <TAVILYAPIKEY> |
| Content-Type |
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| urls | 数组 | 必填 | 要提取的URL(最多20个) |
| query |
json
{
results: [
{
url: https://example.com/article,
raw_content: # 文章标题\n\n内容...
}
],
failed_results: [],
response_time: 2.3
}
| 深度 | 使用场景 |
|---|---|
| basic | 简单文本提取,速度更快 |
| advanced |
bash
curl --request POST \
--url https://api.tavily.com/extract \
--header Authorization: Bearer $TAVILYAPIKEY \
--header Content-Type: application/json \
--data {
urls: [https://docs.python.org/3/tutorial/classes.html],
extract_depth: basic
}
bash
curl --request POST \
--url https://api.tavily.com/extract \
--header Authorization: Bearer $TAVILYAPIKEY \
--header Content-Type: application/json \
--data {
urls: [
https://example.com/react-hooks,
https://example.com/react-state
],
query: useState and useEffect patterns,
chunkspersource: 2
}
bash
curl --request POST \
--url https://api.tavily.com/extract \
--header Authorization: Bearer $TAVILYAPIKEY \
--header Content-Type: application/json \
--data {
urls: [https://app.example.com/dashboard],
extract_depth: advanced,
timeout: 60
}
bash
curl --request POST \
--url https://api.tavily.com/extract \
--header Authorization: Bearer $TAVILYAPIKEY \
--header Content-Type: application/json \
--data {
urls: [
https://example.com/page1,
https://example.com/page2,
https://example.com/page3,
https://example.com/page4,
https://example.com/page5
],
extract_depth: basic
}
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 tavily-extract-1776163391 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 tavily-extract-1776163391 技能
skillhub install tavily-extract-1776163391
文件大小: 4.49 KB | 发布时间: 2026-4-15 13:00