收集人们在 X、Reddit、TikTok、Instagram、YouTube、Threads、Telegram 和 Google News 上对你的品牌、竞品或某个话题的讨论,以 JSON 格式返回,方便你存储、绘制图表或交给模型分析。在这套社交聆听 API 里,每个平台都是一个数据工具,有各自的搜索筛选条件,按帖子、评论或文章计价。你可以用代码按自己的计划运行它们,也可以让 AI 智能体通过 MCP 来运行。
交给你的 AI 智能体
把这段提示词复制到 Claude Code、Cursor、Codex 或任何编程智能体中。它会告诉智能体文档在哪里,以及如何使用你的 API 密钥。
Track mentions and conversations about a brand or topic on X, Reddit, TikTok, Instagram, YouTube, Threads, Telegram and Google News. 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 brand or keywords, the platforms, the time window and how to summarize what you find>工作原理
找到提及
搜索类工具会返回与你的关键词、话题标签或搜索运算符匹配的帖子:X 搜索、Reddit 搜索、TikTok 搜索、Instagram 话题标签、Threads 和 Google News。
拉取讨论内容
把值得关注的帖子发给评论类工具:X 回复、Reddit 评论、TikTok 评论、Instagram 评论和 YouTube 评论。
用模型解读
用同一个密钥把文本交给模型,例如
claude-sonnet-5.5,按话题和情感分类,或提取其中的投诉和提问。
监测 X 上的品牌提及
下面这次运行会收集本周提及某个品牌的英文帖子,并排除该品牌自己的账号:
curl https://lovelyrouter.com/v1/tools/x-search/run \
-H "Authorization: Bearer $LOVELY_API_KEY" \
-H "content-type: application/json" \
-d '{
"input": {
"searchTerms": ["\"brewbox\" OR @brewbox -from:brewbox lang:en since:2026-10-13"],
"queryType": "Latest",
"maxItems": 200
},
"max_results": 200
}'items 中的每一条都是一个帖子,包含正文、作者、互动数据和日期。searchTerms 中的每个条目都按 X 搜索框的写法书写,因此可以使用搜索运算符:"exact phrase"、OR、-word、from:、to:、since: 和 until:、min_faves:、filter: 以及 lang:。queryType 可选 Latest、Top 或 Latest + Top。运行超过 60 秒时会返回 202;按运行工具中的方法轮询即可。
把提及整理成报告
同一个密钥也能调用模型。下面的脚本拉取一周的 Reddit 帖子,然后让 Claude 总结大家在抱怨什么:
import json
import os
import anthropic
import requests
KEY = os.environ["LOVELY_API_KEY"]
run = requests.post(
"https://lovelyrouter.com/v1/tools/reddit-search/run",
headers={"Authorization": f"Bearer {KEY}"},
json={"input": {"queries": ["brewbox"], "sort": "new", "timeframe": "week"}, "max_results": 50, "wait": 120},
timeout=150,
).json() # 超过 `wait` 仍未结束的运行会返回 202:请轮询
client = anthropic.Anthropic(base_url="https://lovelyrouter.com", api_key=KEY)
msg = client.messages.create(
model="claude-sonnet-5.5",
max_tokens=1500,
messages=[{"role": "user", "content": "Group these Reddit posts about Brewbox by topic and sentiment, "
"and quote the three most common complaints:\n" + json.dumps(run["items"])}],
)
print(msg.content[0].text)模型 token 按该模型的价格逐 token 计费;参阅模型。
工具一览
匹配关键词、话题标签或指定账号的推文:内容、作者、互动数据、日期。
按 URL 获取 X/Twitter 帖子的回复:内容、作者、互动、日期。
按搜索词或版块获取 Reddit 帖子:标题、正文、得分、评论数、作者、日期。
按 URL 获取 Reddit 帖子及其评论。
按关键词或话题标签搜索 TikTok 视频:文案、播放、点赞、分享、作者、音乐。
按 URL 获取 TikTok 视频的评论。
Instagram 话题标签或关键词下的帖子或 Reels:文案、点赞、评论、作者、媒体。
按 URL 获取 Instagram 帖子或 Reels 的评论。
YouTube 视频或 Shorts 的评论:内容、点赞、回复数、作者、日期。按热门或最新排序。
Threads 用户的帖子或关键词搜索结果。
公开 Telegram 频道的消息。
Google 新闻中某个搜索的新闻文章(支持运算符:"精确短语"、OR、-排除词、site:、intitle:),可限定时间范围:标题、来源、日期及发布网站上的文章链接。
| 平台 | 查找帖子 | 获取讨论内容 | 值得了解的筛选条件 |
|---|---|---|---|
| X | x-search:正文、作者、互动数据、日期 | x-replies,按 postUrls | X 搜索运算符、queryType、lang、twitterHandles |
reddit-search:标题、正文、得分、评论数、作者、日期 | reddit-comments,按帖子 urls,含回复层级 | subredditName、sort、timeframe | |
| TikTok | tiktok-search:文案、播放量、点赞数、分享数、作者、音乐 | tiktok-comments,按视频 URL | dateRange、sortType、location、includeReplies |
instagram-hashtag:文案、点赞数、评论数、作者、媒体 | instagram-comments:正文、点赞数、回复数 | 话题标签 startUrls 或 keywords、sortOrder | |
| YouTube | 用 YouTube 搜索查找视频 | youtube-comments:正文、点赞数、回复数 | sort:top 或 latest |
| Threads | threads-posts,mode 设为 search | threads-posts,mode 设为 thread | postedAfter、postedBefore |
| Telegram | telegram-channel:公开频道消息 | oldestMessageDate | |
| 新闻 | google-news:标题、来源、日期、链接 | 搜索运算符、openEndedDateRange、language |
Tip
使用每个工具的日期筛选条件,避免定时运行为已经拿到的帖子重复付费:X 用 since:,Reddit 用 timeframe,Google News 用 openEndedDateRange,Threads 用 postedAfter,Telegram 用 oldestMessageDate。
实用配方
每天早上运行 x-search 并把 since: 设为昨天,运行 reddit-search 并设置 "timeframe": "day",运行 google-news 并设置 "openEndedDateRange": "1d",再以 search 模式运行 threads-posts 并设置 postedAfter。合并结果后,让模型写一页摘要。
发布新品视频后,对它运行 youtube-comments 并设置 "sort": "latest",对你的 TikTok 帖子运行 tiktok-comments 并设置 "includeReplies": true。让模型总结最常见的问题。
用竞品名称运行 reddit-search 并设置 "sort": "comments",再对讨论最多的帖子运行 reddit-comments。
对 https://www.instagram.com/explore/tags/yourcampaign/ 运行 instagram-hashtag,并运行 tiktok-search,在 keywords 中填入同一个话题标签,设置 "sortType": "DATE_POSTED"。
在 X 搜索词中加上 min_faves:100,及时发现关于你、正在升温的帖子;同时用 telegram-channel 关注你所在市场的公开 Telegram 频道。
让智能体来运行
连接 MCP 服务器后(claude mcp add --transport http lovely-tools https://lovelyrouter.com/mcp --header "Authorization: Bearer $LOVELY_API_KEY"),对 Claude Code 或 Cursor 说:"找出本周大家在 X、Reddit 和 TikTok 上对 Brewbox 的评价,读取讨论最多的五个帖子下的回复,附上链接总结好评和投诉。每次运行都设置 max_results。"
常见问题
能用一个 API 监测多个平台上的品牌提及吗?+
可以。每个平台都是同一个端点 POST /v1/tools/{id}/run 背后的一个工具,使用同一个 API 密钥和预付费余额。各工具的输入不同,请通过 GET /v1/tools/{id} 或在工具页面上查看每个工具的输入结构。
API 会返回情感分数吗?+
不会。工具返回的是帖子和评论本身。用同一个密钥把文本发给模型,例如 claude-sonnet-5.5,让它按你需要的格式给出情感、话题或投诉分析,做成你自己的社媒舆情监测。
能使用 X 的高级搜索运算符吗?+
可以。x-search 的 searchTerms 列表中的每个条目都按 X 搜索框的写法书写,支持 "exact phrase"、OR、-word、from:、to:、since:、until:、min_faves:、filter: 和 lang:。
如何避免重复收集同样的帖子?+
按计划定时运行,并把每个工具的日期筛选条件设为上次运行以来的时间段:X 用 since:,Reddit 用 timeframe,Google News 用 openEndedDateRange,Threads 用 postedAfter,Telegram 用 oldestMessageDate。
AI 智能体能替我做社交聆听吗?+
可以。把 MCP 服务器连接到 Claude Code、Cursor 或其他 MCP 客户端,智能体会用 suggest_tools 找到合适的工具,读取其输入结构并运行,费用从你的余额中扣除。给它一个设置了消费上限的密钥。