使用场景

深度研究智能体 API:
为 RAG 提供网页数据

通过 MCP 或 REST,为你的研究智能体提供网页搜索、干净的网页正文、整站爬取、视频字幕、新闻和趋势数据,按搜索次数或页数计费。

预付费,无订阅REST 或 MCP一个密钥搞定模型、数据和智能体
WebYouTubeGoogle NewsRedditGoogle Trendslovelyjsonsources[0]"title": "EV prices fall as…""site": "reuters.com""date": "2026-10-14""summary": "Average EV prices…""transcript": "…in the third quarter…"trend": [42, 57, 71, 88]

研究型 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>
01

工作原理

010203
  1. 网页搜索最多返回 50 条结果,每条都包含标题、URL、日期、站点、一段简短摘录,以及一段专为模型撰写的长摘要。可以用 site:、-site:、"exact phrase"、-word、lang:、after: 和 before: 缩小范围。

  2. 阅读

    读取网页会把单个页面转成干净的 Markdown 返回:只有标题和正文,没有菜单和广告。爬取网站则对整个网站或某个栏目做同样的事。

  3. 有据可依地作答

    智能体根据读到的内容撰写答案,并注明引用的 URL。做 RAG 时,你把爬取到的 Markdown 切块,放进你自己的索引。

02

连接你的智能体

search_toolsrun_toolget_run

只需一条命令,MCP 服务器就能为 Claude Code、Cursor 和任何 MCP 客户端提供 web_search、web_fetch 以及完整的数据工具目录:

Shell
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 个字符分段返回,继续读取后续内容不收费。

03

在你自己的数据管道中调用

同样的工具也可以通过 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 页面对搜索和网页读取有更深入的介绍。

04

工具一览

Web
网页搜索

搜索网页:最多 50 条结果,包含标题、URL、日期、站点、简短摘要和供模型阅读的长摘要(需要时可附带网页正文)。支持运算符:site:、-site:、"精确短语"、-词、lang:、after:、before:。

$0.0009 / search详情 →
Web
读取网页

把任意公开网页读取为干净的 Markdown:标题和正文,不含导航和广告。适用于已知 URL 的单个页面。

$0.0009 / page详情 →
Web
爬取整个网站并转为 Markdown

爬取整个网站(或其中一部分),把每个页面转成干净、可直接给 LLM 使用的 Markdown。适合 RAG 和文档站点。

$0.01 / page + $0.01 / call详情 →
YouTube
获取 YouTube 字幕文本

YouTube 视频的完整字幕文本,带时间戳:每个视频链接一份,视频有该语言时按你指定的语言返回。

$0.002475 / transcript详情 →
TikTok
获取 TikTok 视频文字稿

按 URL 获取 TikTok 视频的语音文字稿。

$0.0015 / transcript详情 →
Google News
搜索 Google 新闻

Google 新闻中某个搜索的新闻文章(支持运算符:"精确短语"、OR、-排除词、site:、intitle:),可限定时间范围:标题、来源、日期及发布网站上的文章链接。

$0.006 / article详情 →
Google Trends
Google 趋势热度

某关键词随时间及按地区的 Google 趋势热度。

$0.039 / call详情 →
Reddit
搜索 Reddit 帖子

按搜索词或版块获取 Reddit 帖子:标题、正文、得分、评论数、作者、日期。

$0.0057 / post详情 →
任务工具需要了解的输入
查找来源web-search带搜索运算符的 query、count、need_content、question
读取单个页面web-fetchurl
为 RAG 索引整站website-crawlstartUrls、maxCrawlPages、maxCrawlDepth、includeUrlGlobs、excludeUrlGlobs、useSitemaps
从视频中获取信息youtube-transcriptstartUrls、lang:带时间戳的完整字幕
看看某个 TikTok 视频说了什么tiktok-transcriptvideos:口播内容转写
时事新闻google-news带搜索运算符的 query、openEndedDateRange、dateFrom、dateTo、language
热度变化趋势google-trendsmode 设为 keyword、keyword、predefinedTimeframe、geo、fetchRegionalData
大家在问什么reddit-searchqueries、subredditName、sort、timeframe

Tip

让摘要先过一遍。每条 web-search 结果都带有一段专为模型撰写的长摘要,所以智能体通常只需要对它要引用的少数几个页面调用 web-fetch。

05

实用配方

带引用的市场简报。

用带 after: 的 web-search 获取最新来源,对最好的三个调用 web-fetch,用 "openEndedDateRange": "7d" 运行 google-news 获取本周新闻,再让模型写一份附带链接的简报。

为文档站建立 RAG 索引。

用 "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,让模型把创作者说的话和产品规格表进行对比。

06

费用说明

网页搜索和网页读取的费用为每次搜索或每个页面 $0.0009。没有结果的搜索、无法读取的页面不收费。其他工具按结果计费:按爬取的页面(另收每次调用费)、按字幕、按文章或按帖子计费;Google Trends 按调用计费。上方卡片显示的是当前价格。每次运行都会预留它的最高费用,结束后按实际返回的结果结算。负责推理的模型按其自身价格逐 token 计费,从同一个预付费余额中扣除;可以在模型页面比较。无需订阅。参阅价格。

07

常见问题

?
网页搜索和读取网页有什么区别?+

网页搜索根据查询词查找页面,返回标题、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。无论由哪个模型调用,工具的费用都一样。

相关内容:需要结构化 JSON,请看网页数据提取;需要讨论内容,请看社交聆听;在其他客户端中配置,请看 MCP 服务器文档。

一个预付费密钥,搞定模型、数据和智能体

无需订阅。充值后按需使用,每笔费用都能在日志中查看。