研究型 AI agent 的水平,取决于它能读到什么。给它提供这些能力:带有专为模型撰写的摘要的网页搜索、把任意网页转成干净 Markdown 的读取、为 RAG 索引整站爬取、YouTube 和 TikTok 字幕、Google News、Google Trends 以及 Reddit 讨论帖。你的智能体通过 MCP 调用它们,或者你的数据管道通过 REST 调用它们,使用的都是支付模型费用的同一个密钥。
交给你的 AI 智能体
把这段提示词复制到 Claude Code、Cursor、Codex 或任何编程智能体中。它会告诉智能体文档在哪里,以及如何使用你的 API 密钥。
Do grounded research for me with web search, clean page text, whole-site crawls, video transcripts, news and trends, and cite your sources. Use the Lovely Router data tools: each returns JSON and is billed per result.
- Docs (read first): https://lovelyrouter.com/docs/tools/mcp.md and https://lovelyrouter.com/docs/tools/run.md
- Plan first: POST https://lovelyrouter.com/v1/tools/suggest with `{"task": "<my task in plain words>"}` (free). It returns the tools to run in order, each with an example `input`, the `input_required` fields, an estimated cost and a ready-made `run` request. Replace the example values with my task's; if a field is unclear, read the tool with GET https://lovelyrouter.com/v1/tools/<id>. To browse instead, POST https://lovelyrouter.com/v1/tools/discover searches the catalog.
- Show me the plan and its estimated cost (`total_est_cost_usd`) before running anything large.
- Run: POST https://lovelyrouter.com/v1/tools/<id>/run with `{"input": {...}, "max_results": N}`. A 200 has the finished run with `items`; a 202 means it is still running, so poll the `poll` path until `status` is `succeeded`, `failed`, `timed_out` or `stopped`.
- Only delivered results are billed. Keep max_results small on the first run, check the output, then scale up.
- If you support MCP, connect https://lovelyrouter.com/mcp instead (Streamable HTTP, same key; https://lovelyrouter.com/docs/tools/mcp.md) and use suggest_tools, get_tool and run_tool.
- Auth: read my API key from the LOVELY_API_KEY environment variable and send it as `Authorization: Bearer $LOVELY_API_KEY`. Never print or commit the key. If it is not set, ask me to create one at https://lovelyrouter.com/app/keys.
- Billing is prepaid: every call is charged to my balance, so test with a small request before running anything large.
- Every docs page is plain Markdown; the full index is https://lovelyrouter.com/llms.txt.
My task: <the research question and the format of the answer>连接你的智能体
只需一条命令,MCP 服务器就能为 Claude Code、Cursor 和任何 MCP 客户端提供 web_search、web_fetch 以及完整的数据工具目录:
claude mcp add --transport http lovely-tools https://lovelyrouter.com/mcp \
--header "Authorization: Bearer $LOVELY_API_KEY"然后对它说:"调研哪些车企在 2026 年开始量产固态电池。用 after:2026-01-01 搜索,阅读最相关的五个来源,查看 Google News 最近 7 天的新闻,写一份简报,每个论断都要注明来源 URL。"
通过 MCP 调用时,web_fetch 会把长页面按每段约 12,000 个字符分段返回,继续读取后续内容不收费。
在你自己的数据管道中调用
同样的工具也可以通过 REST 运行。一次搜索就是 web-search 的一次运行:
curl https://lovelyrouter.com/v1/tools/web-search/run \
-H "Authorization: Bearer $LOVELY_API_KEY" \
-H "content-type: application/json" \
-d '{
"input": {
"query": "solid-state battery production site:reuters.com OR site:bloomberg.com after:2026",
"count": 10,
"question": "Which carmakers produce solid-state batteries in 2026?"
}
}'count 设置结果数量,范围 1 到 50,每次搜索价格相同。question 传入用户的原始问题,让结果排序更准确;摘要不够用时,need_content 会附上每个页面的正文。网页搜索 API 页面对搜索和网页读取有更深入的介绍。
工具一览
搜索网页:最多 50 条结果,包含标题、URL、日期、站点、简短摘要和供模型阅读的长摘要(需要时可附带网页正文)。支持运算符:site:、-site:、"精确短语"、-词、lang:、after:、before:。
把任意公开网页读取为干净的 Markdown:标题和正文,不含导航和广告。适用于已知 URL 的单个页面。
爬取整个网站(或其中一部分),把每个页面转成干净、可直接给 LLM 使用的 Markdown。适合 RAG 和文档站点。
YouTube 视频的完整字幕文本,带时间戳:每个视频链接一份,视频有该语言时按你指定的语言返回。
按 URL 获取 TikTok 视频的语音文字稿。
Google 新闻中某个搜索的新闻文章(支持运算符:"精确短语"、OR、-排除词、site:、intitle:),可限定时间范围:标题、来源、日期及发布网站上的文章链接。
某关键词随时间及按地区的 Google 趋势热度。
按搜索词或版块获取 Reddit 帖子:标题、正文、得分、评论数、作者、日期。
| 任务 | 工具 | 需要了解的输入 |
|---|---|---|
| 查找来源 | web-search | 带搜索运算符的 query、count、need_content、question |
| 读取单个页面 | web-fetch | url |
| 为 RAG 索引整站 | website-crawl | startUrls、maxCrawlPages、maxCrawlDepth、includeUrlGlobs、excludeUrlGlobs、useSitemaps |
| 从视频中获取信息 | youtube-transcript | startUrls、lang:带时间戳的完整字幕 |
| 看看某个 TikTok 视频说了什么 | tiktok-transcript | videos:口播内容转写 |
| 时事新闻 | google-news | 带搜索运算符的 query、openEndedDateRange、dateFrom、dateTo、language |
| 热度变化趋势 | google-trends | mode 设为 keyword、keyword、predefinedTimeframe、geo、fetchRegionalData |
| 大家在问什么 | reddit-search | queries、subredditName、sort、timeframe |
Tip
让摘要先过一遍。每条 web-search 结果都带有一段专为模型撰写的长摘要,所以智能体通常只需要对它要引用的少数几个页面调用 web-fetch。
实用配方
用带 after: 的 web-search 获取最新来源,对最好的三个调用 web-fetch,用 "openEndedDateRange": "7d" 运行 google-news 获取本周新闻,再让模型写一份附带链接的简报。
用 "startUrls": [{"url": "https://docs.example.com/"}]、"useSitemaps": true 和 "excludeUrlGlobs": ["https://docs.example.com/changelog/**"] 运行 website-crawl。每个页面都以可直接交给 LLM 的 Markdown 返回,在你自己的管道中切块并生成向量即可。
把会议演讲的 URL 发给 youtube-transcript,设置 "lang": "en"。借助时间戳,智能体可以准确引用讲者说出某句话的时刻。
用 "mode": "keyword"、"predefinedTimeframe": "today 5-y"、在 geo 中填一个国家并设置 "fetchRegionalData": true 运行 google-trends,再用 reddit-search 看看买家围绕这个话题在问什么。
把 TikTok 视频 URL 传给 tiktok-transcript,让模型把创作者说的话和产品规格表进行对比。
常见问题
网页搜索和读取网页有什么区别?+
网页搜索根据查询词查找页面,返回标题、URL、日期以及专为模型撰写的摘要。读取网页则接受一个 URL,把它的完整正文转成干净的 Markdown 返回,不含菜单和广告。
如何从一个网站建立 RAG 索引?+
对你需要的网站或栏目运行 website-crawl 工具,用 URL 通配规则包含或排除路径。它会把每个页面以 Markdown 返回,可直接切块并生成向量,放进你自己的索引。
网页搜索支持哪些搜索运算符?+
site:、-site:、"exact phrase"、-word、lang:、after: 和 before:。可以用 OR 组合多个站点,日期既可以只写年份,也可以写完整日期。
智能体能看懂 YouTube 视频吗?+
可以。youtube-transcript 工具就是一个视频字幕 API,会返回视频带时间戳的完整字幕;只要视频提供你指定的语言,就会返回该语言的字幕,包括自动生成的字幕。
研究智能体应该用哪个模型?+
你的密钥下的任何对话模型都可以,例如 claude-sonnet-5.5、gpt-6.1-sol 或 gemini-3.1-pro。无论由哪个模型调用,工具的费用都一样。