9router-web-fetch 精选
Fetch URL → markdown / text / HTML via 9Router /v1/web/fetch using Ollama Cloud / Firecrawl / Jina Reader / Tavily Extract / Exa Contents. Use when the user wants to scrape a webpage, extract URL content, read article, or convert a URL to markdown.
安装方式
cp -r skills/9router-web-fetch ~/.claude/skills/9router-web-fetch把该 skill 目录放进客户端 skills 目录。不同客户端的目录可能不同,Claude Code 默认是 ~/.claude/skills/
https://raw.githubusercontent.com/decolua/9router/ce4460ef79382bfddb4aa5fc0ff9f3cb0d5f95a8/skills/9router-web-fetch/SKILL.md下载后另存为 ~/.claude/skills/9router-web-fetch/SKILL.md。链接锁定采集时的 commit,内容与本站展示一致。
整仓一次性获取:git clone --depth 1 https://github.com/decolua/9router.git
依赖与权限
- 需要 API Key —— 使用前需配置相应的密钥环境变量
- 需要联网访问外部服务
- 依赖外部命令:
curljqconvert - 以上为按正文与 frontmatter 自动推断的信号,仅供参考;安装前建议先阅读原文。
SKILL.md 正文
9Router — Web Fetch
Requires NINEROUTER_URL (and NINEROUTER_KEY if auth enabled). See https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router/SKILL.md for setup.
Discover
curl $NINEROUTER_URL/v1/models/web | jq '.data[] | select(.kind=="webFetch") | .id'
# Per-provider params
curl "$NINEROUTER_URL/v1/models/info?id=firecrawl/fetch"
IDs end in /fetch (e.g. firecrawl/fetch, jina/fetch). fetch-combo chains providers with auto-fallback.
Endpoint
POST $NINEROUTER_URL/v1/web/fetch
| Field | Required | Notes |
|---|---|---|
model (or provider) | yes | from /v1/models/web (e.g. firecrawl or jina-reader) |
url | yes | URL to extract |
format | no | markdown (default) / text / html |
max_characters | no | truncate output |
Examples
Jina Reader
curl -X POST $NINEROUTER_URL/v1/web/fetch \
-H "Authorization: Bearer $NINEROUTER_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"jina-reader","url":"https://9router.com","format":"markdown"}'
Exa
curl -X POST $NINEROUTER_URL/v1/web/fetch \
-H "Authorization: Bearer $NINEROUTER_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"exa","url":"https://example.com","format":"markdown","max_characters":0}'
Firecrawl
curl -X POST $NINEROUTER_URL/v1/web/fetch \
-H "Authorization: Bearer $NINEROUTER_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"firecrawl","url":"https://example.com","format":"markdown","max_characters":0}'
Tavily
curl -X POST $NINEROUTER_URL/v1/web/fetch \
-H "Authorization: Bearer $NINEROUTER_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"tavily","url":"https://example.com","format":"markdown","max_characters":0}'
Ollama Cloud
Uses the API key from the existing ollama connection.
curl -X POST $NINEROUTER_URL/v1/web/fetch \
-H "Authorization: Bearer $NINEROUTER_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"ollama","url":"https://example.com","format":"markdown"}'
JS:
const r = await fetch(`${process.env.NINEROUTER_URL}/v1/web/fetch`, {
method: "POST",
headers: { "Authorization": `Bearer ${process.env.NINEROUTER_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ model: "fetch-combo", url: "https://example.com", format: "markdown", max_characters: 5000 }),
});
const { data } = await r.json();
console.log(data.title, data.content.length);
Response shape
{
"provider": "jina-reader",
"url": "...",
"title": "...",
"content": { "format": "markdown", "text": "...", "length": 1234 },
"links": ["https://example.com/related"],
"metadata": { "author": null, "published_at": null, "language": null },
"usage": { "fetch_cost_usd": 0 },
"metrics": { "response_time_ms": 850, "upstream_latency_ms": 700 }
}
links is included when the upstream provider returns discovered page links (currently Ollama Cloud).
Provider quirks
| Provider | Auth | Best for |
|---|---|---|
firecrawl | Bearer | JS-rendered pages, format=markdown/html |
jina-reader | Bearer (optional) | Free tier (~1M chars/mo); fastest plain markdown |
tavily | Bearer | Bulk extract; returns raw_content |
exa | x-api-key | Pre-indexed pages; fast text extraction |
ollama | Bearer | Markdown plus page title and discovered links; uses the Ollama Cloud key |
质量与来源
- 所属仓库
- decolua/9router
- 仓库星标
- 3.1 万
- 最近更新
- 5 天前
- 采集时间
- 今天
- commit
- ce4460ef7938
- 内容指纹
- sha256:6502e1184525f4e
- 文件路径
- skills/9router-web-fetch/SKILL.md