使用场景

Medium 文章调研:
内容大纲与选题挖掘

以 JSON 获取某个主题下的 Medium 文章,含全文、点赞数、回应数和阅读时长,用来给写手做内容大纲,并看清哪些角度已经获得关注。

预付费,无订阅REST 或 MCP一个密钥搞定模型、数据和智能体
Mediumlovelyjsonitems[0]"title": "Why agent frameworks …"author": "Dana Whit""publication": "Better Programming""claps": 1840"reading_time": "7 min read""tags": "ai-agents, llm"

在约稿或动笔之前,你想先知道已经有哪些内容:哪些角度收获了点赞,表现出色的文章有多长,哪些专栏刊物一直在报道这个主题。手动读五十篇 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>
01

工作原理

010203
  1. 选择入口

    开放的主题用关键词搜索;整个领域用 machine-learning 这样的标签;已经知道关键人物时,直接指定作者和专栏刊物。

  2. 设置上限后运行工具

    把输入连同 max_results 发送到 POST /v1/tools/medium-articles/run。运行会从你的余额中预留它的最高费用,并以 JSON 返回文章。

  3. 阅读并排序

    按点赞数和回应数排序,按标签分组,再把 Markdown 正文交给模型,让它总结每个角度,或提炼表现最好的文章的结构。

02

一次请求获取某个主题的文章

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;轮询方法见运行工具。

03

每篇文章包含什么

字段组你会得到
身份标题、副标题、作者、专栏刊物
热度点赞数和回应数
形式阅读时长和标签
时间发布日期
内容Markdown 格式的文章正文

仅限会员阅读的文章返回的是 Medium 公开的预览内容而非全文,结果中会有标记,方便你区分。

04

实用配方

给写手做大纲。

搜索你的目标关键词,取点赞最多的十篇文章,把 Markdown 交给模型,生成一份包含共有章节以及无人涉及的空白点的大纲。

找出有效的角度。

运行一个标签,把 tagSort 设为 top,按标签组合对结果分组,比较点赞数和阅读时长,看看哪些形式更能吸引关注。

盯住一家专栏刊物。

每周传入一次刊物的 slug 并保存新标题。标出它新开始报道、而你还没写过的主题。

整理阅读清单。

收集你信任的作者的文章,让模型为每篇写两行摘要,再把摘要发给团队。

为一个选题想法检查竞争。

搜索你打算写的那个确切短语。如果排在前面的结果又旧又单薄,说明这个主题还有空间;否则就换一个更窄的角度。

更想直接用自然语言提问?连接 MCP 服务器,然后对 Claude Code 或 Cursor 说:"在 Medium 上搜索 'vector database',取 30 篇文章,按点赞数排序,给我一张包含标题、刊物、点赞数和阅读时长的表格,再列出三个反复出现的子话题。把 max_results 设为 30。"

06

费用说明

按文章付费:启动运行时会预留它的最高费用,即每次调用费加上每篇文章费乘以 max_results,结束后按实际返回的结果结算,预留的剩余部分退回你的余额。失败或超时的运行只为已交付的文章付费,在开始时就被拒绝的运行不收费。

扫描 200 篇文章,就按 200 篇文章计费。没有订阅,也没有每月最低消费:最低充值 $5,工具和模型共用一个余额。上方卡片显示的是当前价格;价格页面列出了所有工具。

07

常见问题

?
能拿到文章全文吗?+

可以,公开阅读的文章会以 Markdown 返回全文。仅限会员阅读的文章返回 Medium 的公开预览,结果中会有标记。

可以按标签、作者或专栏刊物搜索,而不只是关键词吗?+

可以。使用 tags、authors 或 publications,或者在 articleUrls 中传入具体链接。标签可以按 newest 或 top 排序。

一次运行最多能返回多少篇文章?+

最多 200 篇,用 max_results 设置。

结果里包含评论吗?+

每篇文章都有回应数,但回应的文字内容不在结果中。

需要订阅吗?+

不需要。你向预付费余额充值,每次运行从中扣费。失败的运行只为已交付的结果付费,不会自动续费。

想看的是对话而不是文章?请看社交聆听、研究智能体,以及其余的工具目录。

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

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