在约稿或动笔之前,你想先知道已经有哪些内容:哪些角度收获了点赞,表现出色的文章有多长,哪些专栏刊物一直在报道这个主题。手动读五十篇 Medium 文章要花掉一个下午,Lovely Router 一次调用就能完成。发送一个搜索词、标签、作者或专栏刊物,每篇文章返回一个 JSON 对象,正文为 Markdown,按文章数从预付费余额中计费。
交给你的 AI 智能体
把这段提示词复制到 Claude Code、Cursor、Codex 或任何编程智能体中。它会告诉智能体文档在哪里,以及如何使用你的 API 密钥。
Medium 文章调研:内容大纲与选题挖掘. Use the Lovely Router data tools: each returns JSON and is billed per result.
- Docs (read first): https://lovelyrouter.com/docs/tools/find.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 inputs (links, keywords or accounts) and how many results you need>工作原理
选择入口
开放的主题用关键词搜索;整个领域用
machine-learning这样的标签;已经知道关键人物时,直接指定作者和专栏刊物。设置上限后运行工具
把输入连同
max_results发送到POST /v1/tools/medium-articles/run。运行会从你的余额中预留它的最高费用,并以 JSON 返回文章。阅读并排序
按点赞数和回应数排序,按标签分组,再把 Markdown 正文交给模型,让它总结每个角度,或提炼表现最好的文章的结构。
一次请求获取某个主题的文章
Medium 文章搜索在 searchQuery 中接受关键词,并用 maxArticles 限制文章数量:
curl https://lovelyrouter.com/v1/tools/medium-articles/run \
-H "Authorization: Bearer $LOVELY_API_KEY" \
-H "content-type: application/json" \
-d '{
"input": {
"searchQuery": "ai agents",
"maxArticles": 20
},
"max_results": 20
}'上面的调用最多返回 20 篇该主题的文章。你也可以不用搜索,改为传入 tags、authors、publications 或 articleUrls。运行超过 60 秒仍未结束时会返回 202;轮询方法见运行工具。
每篇文章包含什么
| 字段组 | 你会得到 |
|---|---|
| 身份 | 标题、副标题、作者、专栏刊物 |
| 热度 | 点赞数和回应数 |
| 形式 | 阅读时长和标签 |
| 时间 | 发布日期 |
| 内容 | Markdown 格式的文章正文 |
仅限会员阅读的文章返回的是 Medium 公开的预览内容而非全文,结果中会有标记,方便你区分。
实用配方
搜索你的目标关键词,取点赞最多的十篇文章,把 Markdown 交给模型,生成一份包含共有章节以及无人涉及的空白点的大纲。
运行一个标签,把 tagSort 设为 top,按标签组合对结果分组,比较点赞数和阅读时长,看看哪些形式更能吸引关注。
每周传入一次刊物的 slug 并保存新标题。标出它新开始报道、而你还没写过的主题。
收集你信任的作者的文章,让模型为每篇写两行摘要,再把摘要发给团队。
搜索你打算写的那个确切短语。如果排在前面的结果又旧又单薄,说明这个主题还有空间;否则就换一个更窄的角度。
更想直接用自然语言提问?连接 MCP 服务器,然后对 Claude Code 或 Cursor 说:"在 Medium 上搜索 'vector database',取 30 篇文章,按点赞数排序,给我一张包含标题、刊物、点赞数和阅读时长的表格,再列出三个反复出现的子话题。把 max_results 设为 30。"
与其他内容来源搭配
Medium 展示的是写作者发布了什么,搜索结果、新闻和论坛则展示读者在找什么:
按关键词、标签、作者、出版物或链接获取 Medium 文章及其 Markdown 正文:标题、副标题、作者、出版物、掌声、评论数、阅读时长、标签、日期。会员专享文章只返回 Medium 公开的预览(会标注)。
Google 搜索结果页:自然结果、广告、“相关问题”和相关搜索。一条结果 = 一个结果页(约 10 条自然链接)。
Google 新闻中某个搜索的新闻文章(支持运算符:"精确短语"、OR、-排除词、site:、intitle:),可限定时间范围:标题、来源、日期及发布网站上的文章链接。
按搜索词或版块获取 Reddit 帖子:标题、正文、得分、评论数、作者、日期。
google-search显示同一个关键词下哪些页面排名靠前,方便你把 Medium 与整个开放网络对照。google-news补充该主题近期的新闻报道。reddit-search用用户自己的话展示他们提出的问题。
想了解围绕某个主题的更广泛讨论,请看社交聆听。
费用说明
按文章付费:启动运行时会预留它的最高费用,即每次调用费加上每篇文章费乘以 max_results,结束后按实际返回的结果结算,预留的剩余部分退回你的余额。失败或超时的运行只为已交付的文章付费,在开始时就被拒绝的运行不收费。
扫描 200 篇文章,就按 200 篇文章计费。没有订阅,也没有每月最低消费:最低充值 $5,工具和模型共用一个余额。上方卡片显示的是当前价格;价格页面列出了所有工具。
常见问题
能拿到文章全文吗?+
可以,公开阅读的文章会以 Markdown 返回全文。仅限会员阅读的文章返回 Medium 的公开预览,结果中会有标记。
+
可以。使用 tags、authors 或 publications,或者在 articleUrls 中传入具体链接。标签可以按 newest 或 top 排序。
一次运行最多能返回多少篇文章?+
最多 200 篇,用 max_results 设置。
结果里包含评论吗?+
每篇文章都有回应数,但回应的文字内容不在结果中。
需要订阅吗?+
不需要。你向预付费余额充值,每次运行从中扣费。失败的运行只为已交付的结果付费,不会自动续费。