
Douyin Search
- 257 installs
- 316 repo stars
- Updated August 4, 2026
- redfox-data/redfox-community
Use douyin-search for development tasks
About
douyin-search: A skill for development. This provides functionality for development workflows.
- douyin-search
Douyin Search by the numbers
- 257 all-time installs (skills.sh)
- +16 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #1,503 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/redfox-data/redfox-community --skill douyin-searchAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 257 |
|---|---|
| repo stars | ★ 316 |
| Last updated | August 4, 2026 |
| Repository | redfox-data/redfox-community ↗ |
What it does
Use douyin-search for development tasks
Files
抖音作品查询
📝 简介
根据关键词搜索抖音热门爆款作品,支持按日期范围筛选,返回点赞、评论、分享、收藏、发布时间等互动数据,结果以结构化表格展示。
✨ 功能特性
| 功能模块 | 能力描述 | 核心价值 |
|---|---|---|
| 爆款搜索 | 关键词搜索抖音爆款作品 | 精准发现高热度内容 |
| 日期筛选 | 支持按日期范围筛选 | 定位特定时间段的热门内容 |
| 智能拓展 | 泛化词自动拓展为 10 个细分词 | 避免泛化词搜索结果偏差 |
| 热门推荐 | 无结果时推荐热门作品和话题 | 兜底保障不空手而归 |
| 可点击链接 | 作品标题以超链接格式输出 | 一键跳转查看原作品 |
| 订阅推送 | 支持关键词每日推送 | 定时获取最新爆款动态 |
🔑 鉴权
- 获取 API Key:前往 红狐hub
- 配置方式1:写入
~/.openclaw/openclaw.json→{ "env": { "REDFOX_API_KEY": "ak_xxxx..." } } - 配置方式2:终端执行
export REDFOX_API_KEY="ak_xxxx..."
⚙️ 工作流程
Step 1: 🔍 用户意图理解
⚠️ 核心规则:优先提取细分方向词,而非泛化的大类词
| 用户输入 | 处理方式 |
|---|---|
| 无赛道关键词("最近热门作品") | 关键词传空字符串 "",查询全站热门 |
| 有细分词("职场穿搭"、"减脂餐") | 直接搜索,无需拓展 |
| 有泛化词("穿搭"、"美食") | 执行拓展策略(Step 2) |
细分词判断原则:有场景/人群/风格/意图修饰 → 细分词;纯大类无修饰 → 泛化词。
提取精确关键词:从用户描述中提取细分领域词,而非泛化词。例:用户说"帮我找电影领域热门话题"且自称"小众电影、港台文化" → 搜索"小众电影、港台电影、电影乐评",❌ 而非只搜"电影"。
Step 2: 🔄 泛化词拓展策略
⚠️ 必须等待用户明确回复后再调用脚本!
| 步骤 | 操作 |
|---|---|
| 1. 生成细分词 | 生成10个适中大小的细分词(趋势词、人群词、场景词、意图词各2-3个),禁止调用脚本 |
| 2. 等待用户回复 | 用户未回复时禁止调用脚本 |
| 3. 执行 | 回复「拓展」→ 10词以英文逗号连接,仅调用一次脚本;回复「不拓展」→ 搜索原关键词 |
输出示例:
我识别到「中产」是较大的分类,推荐以下细分方向:
老钱,轻奢,品质生活,松弛感,高级感穿搭,体面,法式穿搭,律师,医生,品质家居
回复「拓展」将同时搜索这10个词,回复「不拓展」将继续搜索「中产」Step 3: 📡 调用 API 接口
3.1 时间解析规则
| 用户输入 | 解析方式 | 示例 |
|---|---|---|
| 绝对日期 | 解析为 YYYY-MM-DD | 6月1号 → 2026-06-01 |
| 相对日期 | 基于当前日期计算 | 最近7天 → start=7天前, end=今天 |
| 日期范围 | 分别解析为 startDate/endDate | 5月30日到6月2日 |
| 模糊时间 | 不解析,保持默认空字符串 | 最近的、最新的 |
startDate/endDate默认空字符串,表示不限定时间- 单日期 → startDate = endDate;年份省略取当前年份
3.2 执行脚本
# 无时间参数
python3 ~/.qoderwork/skills/douyin-search/scripts/search_douyin.py "<关键词>"
# 有时间参数
python3 ~/.qoderwork/skills/douyin-search/scripts/search_douyin.py "<关键词>" --start-date <startDate> --end-date <endDate>仅传入非空的时间参数。脚本返回 JSON:
| 字段 | 说明 |
|---|---|
| articles | 搜索匹配的作品列表(按点赞数降序) |
| latestHotArticles | 近期热门推荐作品列表 |
| hotTopics | 热门话题列表 |
每条作品字段:title、author、like_count、comment_count、share_count、collect_count、work_url、publish_time、follower_count
Step 4: 📊 结果展示
⚠️ 总数校验:展示的 N 必须取自 articles 数组长度,禁止人工计数。
情况 A:articles > 0
A1. 输出查询范围:
📊 关键词「XXX」共匹配到 N 条抖音爆款作品,以下是详细数据:
A2. 展示前 20 条表格:
| # | 作品标题 | 作者 | 点赞数 | 评论数 | 分享数 | 收藏数 | 发布时间 |
|---|---------|------|--------|--------|--------|--------|----------|
| 1 | [标题](work_url) | 作者名 | 305.2w | 7.1w | 51.0w | 14.7w | 06-02 19:55 |格式化规则:
- 数字 < 10000 直接展示;≥ 10000 用
x.xw格式 publish_time转为MM-DD HH:MM;无论是否指定时间范围均展示- 标题超 30 字截断加
...,使用[标题](work_url)链接格式
A3. articles > 20 时提示:
以上展示了前 20 条数据,还剩 N 条未展示。回复「查看全部」展开剩余数据。
A4-A5. 仅 articles ≤ 10 时执行:
latestHotArticles非空 → 展示「🔥 近期热门推荐作品」表格(最多10条)hotTopics非空 → 展示「🏷️ 热门话题」列表- 为空则跳过,不输出
⚠️ A1~A5 同一轮输出连续完成,A5 后紧跟 Step 5。
情况 B:articles = 0
B1. 抱歉提示 + 10个扩展词(以英文逗号分隔):
😔 抱歉,未找到与「XXX」相关的内容,可尝试(扩展词1,扩展词2,...,扩展词10)
扩展词规则:基于原关键词语义扩展,每词2-6字,固定10个。
B2-B3. 展示 latestHotArticles(💡 推荐提示)和 hotTopics,为空则跳过。
⚠️ B1~B3 同一轮输出连续完成,B3 后紧跟 Step 5。
Step 5: 📩 提示订阅
展示完毕后末尾附上:
📩 是否订阅「XXX」的每日推送?订阅后每天 10:00 自动推送最新爆款作品。回复「确认订阅」即可创建定时任务。
Step 6: ⏰ 创建定时任务(用户回复「确认订阅」时执行)
优先使用平台内置定时任务,若无则提供通用方案:
- 任务名称:
抖音爆款作品订阅 - <关键词> - 执行频率:每天 10:00(cron
0 10 * * *) - 执行命令:
python3 <脚本路径>/search_douyin.py "<关键词>"(有时间参数则附加--start-date/--end-date) - 通用 crontab:
0 10 * * * python3 /path/to/search_douyin.py "<关键词>"
创建成功后告知:"已成功订阅关键词「<关键词>」的爆款作品推送,每天 10:00 将自动查询最新数据并通知你。"
Douyin Content Search / douyin-search
---
Overview
Enter a keyword to search for trending viral content on Douyin, presented in a structured table with engagement data including likes, comments, shares, and saves—helping you quickly understand how different content categories are performing on the platform.
Core Value
- Instant search: Enter any content keyword and immediately receive a list of viral works sorted by like count.
- Comprehensive data: Each result shows the author, likes, comments, shares, saves, and a clickable link to the original work.
- Continuous tracking: Subscribe to keywords of interest and receive daily push notifications with the latest trending data—never miss a trend.
Intended Users
- 📝 Content creators — Track viral content in your niche for data-driven topic and creative inspiration.
- 🏢 MCN / brand operators — Quickly gauge the popularity and top-performing content for a specific category on Douyin.
- 📊 Growth / marketing teams — Gain keyword-based content trend insights to inform ad placement and topic strategy.
---
Features
Core Capabilities
- Viral Search: Keyword-based search for Douyin viral works — precisely discover high-engagement content.
- Date Filtering: Filter by date range to pinpoint popular content within a specific timeframe.
- Smart Expansion: Automatically broadens generic keywords into 10 niche terms, avoiding skewed search results.
- Hot Recommendations: Recommends trending works and topics when no results found — never leave empty-handed.
- Clickable Links: Work titles output as hyperlinks — one click to the original Douyin video.
- Subscription Push: Subscribe to keywords for daily automated updates with the latest viral trends.
Highlights
- Generalization for guaranteed hits: No need for precise keywords—casual, conversational input still yields effective results, lowering the learning curve.
- One-click subscription: No extra steps—search, subscribe, and receive daily push notifications to stay on top of trend changes.
- Clickable data: Every work title in the table links directly to the original Douyin page for deeper inspection.
---
API Key Acquisition & Security
- This skill requires the environment variable:
REDFOX_API_KEY. REDFOX_API_KEYis issued by RedFoxHub (https://redfox.hk).- Register at RedFoxHub to obtain
REDFOX_API_KEY. - Configure
REDFOX_API_KEYon your device before using this skill. - Before providing your key, confirm its source, scope, validity period, and whether it can be reset or revoked.
- Do not hard-code or expose keys in plain text in code, prompts, logs, or output files.
---
Usage Guide
Simply describe the content category you want to explore in natural language—no fixed commands to memorize.
Quick Reference
| Intent | Example phrase | Result |
|---|---|---|
| Search viral content by category | "Today's trending food content" | Auto-generalizes to "food," returns a viral content table |
| Check a niche's performance | "Is travel content popular on Douyin?" | Queries "travel," displays results sorted by likes |
| Casual conversational search | "Funny videos seem hot lately" | Auto-extracts "funny," returns trending works |
| Filter by date range | "Travel content from May 30 to June 2" | Parses date range, returns viral works from that period |
| View all results | Select "View all" after the table appears | Continues displaying remaining data (up to 50) |
| Subscribe to daily updates | Select "Subscribe" after a search | Daily push at 10:00 AM with the latest viral content for that keyword |
Output Example
After a search, you'll see a table like this (illustrative):
| # | Work Title | Author | Likes | Comments | Shares | Saves | Published |
|---|---|---|---|---|---|---|---|
| 1 | Let me show you how to make this dish… | FoodieA | 305.2w | 7.1w | 51.0w | 14.7w | 06-01 19:55 |
| 2 | Travel vlog: A spontaneous weekend trip… | TravelBloggerB | 158.3w | 3.2w | 22.1w | 8.5w | 05-30 15:30 |
(20 results shown by default; when there are more, you'll be prompted to view all.)
---
Use Cases
| Scenario | Role | Example question | Benefit |
|---|---|---|---|
| Topic research | Content creator | "What food content is trending on Douyin lately?" | Quickly pinpoint high-engagement directions, reduce blind trial-and-error |
| Competitive monitoring | Brand operator | "Check the viral performance of the baby & maternity category on Douyin" | Understand top content formats, inform ad strategy |
| Trend tracking | Marketing team | "Is comedy content still popular on Douyin?" | Judge niche heat by data, adjust direction in time |
| Daily monitoring | Individual user | "Push me daily updates on travel viral content" | Subscribe once and receive automatic updates—never miss a trend |
---
抖音作品查询 / douyin-search
---
简介
输入关键词即可查询抖音热门爆款作品,以结构化表格呈现点赞、评论、分享、收藏等互动数据,帮你快速掌握各类内容在抖音的真实表现。
核心价值
- 即搜即看:输入任意内容关键词,立刻获取按点赞数排序的爆款作品列表。
- 数据全面:每条作品展示作者、点赞数、评论数、分享数、收藏数及可跳转的原文链接。
- 持续关注:支持订阅感兴趣的关键词,每天定时推送最新爆款数据,不错过任何趋势。
适用对象
- 📝 内容创作者 — 追踪同赛道爆款,为选题与创作提供数据参考。
- 🏢 MCN / 品牌运营 — 快速了解特定品类在抖音的热度与头部内容表现。
- 📊 增长 / 市场团队 — 按关键词洞察内容趋势,辅助投放与选题决策。
---
功能特性
核心功能
- 爆款搜索:关键词搜索抖音爆款作品,精准发现高热度内容。
- 日期筛选:支持按日期范围筛选,定位特定时间段的热门内容。
- 智能拓展:泛化词自动拓展为 10 个细分词,避免泛化词搜索结果偏差。
- 热门推荐:无结果时推荐热门作品和话题,兜底保障不空手而归。
- 可点击链接:作品标题以超链接格式输出,一键跳转查看原作品。
- 订阅推送:支持关键词每日推送,定时获取最新爆款动态。
特色亮点
- 泛化保命中:不要求精确关键词,口语化输入也能获得有效结果,降低使用门槛。
- 一键订阅:无需额外操作,查完即订,每日自动推送,持续追踪趋势变化。
- 数据可点击:表格中每条作品标题均可直接跳转到抖音原始页面,方便深度查看。
---
密钥获取与安全说明
- 本技能需要使用环境变量:
REDFOX_API_KEY。 REDFOX_API_KEY由 红狐 hub (https://redfox.hk)提供。- 请前往 红狐 hub 注册账号,获取
REDFOX_API_KEY。 - 配置设备环境变量
REDFOX_API_KEY后使用本技能。 - 在提供密钥前,请先确认密钥来源、可用范围、有效期及是否支持重置/撤销。
- 禁止在代码、提示词、日志或输出文件中硬编码/明文暴露密钥。
---
使用指南
直接用自然语言说出你想查的内容方向即可,无需记忆固定命令。
常用说法速查
| 意图 | 示例话术 | 效果 |
|---|---|---|
| 查某类内容的爆款 | "今日美食热门作品" | 自动泛化为"美食",返回爆款表格 |
| 查某个赛道表现 | "帮我看看旅行类在抖音火不火" | 以"旅行"查询,按点赞排序展示 |
| 口语化随意搜 | "最近搞笑视频挺火的" | 自动提取"搞笑",返回热门作品 |
| 按时间筛选 | "5月30号到6月2号的旅游作品" | 解析日期范围,返回该时段爆款作品 |
| 查看全部结果 | 表格展示后选择"查看全部" | 续接展示剩余数据(最多 50 条) |
| 订阅每日推送 | 查询后选择"确认订阅" | 每天 10:00 自动推送该关键词最新爆款 |
输出示例
查询完成后,你将看到类似以下格式的表格(示意):
| # | 作品标题 | 作者 | 点赞数 | 评论数 | 分享数 | 收藏数 | 发布时间 |
|---|---|---|---|---|---|---|---|
| 1 | 跟我一起来做这道菜… | 美食达人A | 305.2w | 7.1w | 51.0w | 14.7w | 06-01 19:55 |
| 2 | 旅行vlog:周末说走就走… | 旅行博主B | 158.3w | 3.2w | 22.1w | 8.5w | 05-30 15:30 |
(共展示 20 条,数据超过 20 条时提示查看全部。)
---
使用场景
| 场景 | 角色 | 示例问法 | 收益 |
|---|---|---|---|
| 选题调研 | 内容创作者 | "帮我看看美食赛道最近什么内容火" | 快速锁定高互动方向,减少盲目试错 |
| 竞品监控 | 品牌运营 | "查一下母婴品类在抖音的爆款表现" | 了解头部内容形态,辅助投放策略 |
| 趋势追踪 | 市场团队 | "搞笑类内容在抖音还火吗" | 按数据判断赛道热度,及时调整方向 |
| 日常关注 | 个人用户 | "每日推送旅行类爆款作品" | 订阅后自动获取,不错过任何热点 |
---
#!/usr/bin/env python3
"""
抖音爆款作品搜索脚本
调用 Redfox API 搜索抖音热门作品数据
用法: python3 search_douyin.py "<关键词>" [--start-date YYYY-MM-DD] [--end-date YYYY-MM-DD]
"""
import sys
import os
import json
import urllib.request
import urllib.error
API_URL = "https://redfox.hk/story/api/dy/search/search"
def get_api_key() -> str:
"""从环境变量获取 API Key,"""
for key_name in ["REDFOX_API_KEY"]:
val = os.environ.get(key_name)
if val:
return val
print("[error] 未找到环境变量 REDFOX_API_KEY,请确认已设置 API Key", file=sys.stderr)
sys.exit(1)
def format_articles(articles: list) -> list:
"""将原始 articles 数据转换为统一格式"""
items = []
for art in articles:
items.append({
"title": art.get("title", "").strip(),
"author": art.get("accountName", "").strip(),
"like_count": art.get("likeCount", 0) or 0,
"comment_count": art.get("commentCount", 0) or 0,
"share_count": art.get("shareCount", 0) or 0,
"collect_count": art.get("collectCount", 0) or 0,
"work_url": art.get("workUrl", ""),
"publish_time": art.get("publishTime", ""),
"follower_count": art.get("followerCount", 0) or 0,
})
# 按点赞数降序排列
items.sort(key=lambda x: x["like_count"], reverse=True)
return items
def search(keyword: str, start_date: str = "", end_date: str = "") -> dict:
"""调用搜索接口,返回完整数据(articles, latestHotArticles, hotTopics)"""
api_key = get_api_key()
payload_dict = {"keyword": keyword, "source": "抖音作品查询-GitHub"}
if start_date:
payload_dict["startDate"] = start_date
if end_date:
payload_dict["endDate"] = end_date
payload = json.dumps(payload_dict).encode("utf-8")
req = urllib.request.Request(
API_URL,
data=payload,
headers={
"Content-Type": "application/json",
"X-API-Key": api_key,
"User-Agent": "QoderWork/1.0",
},
method="POST",
)
try:
with urllib.request.urlopen(req, timeout=15) as resp:
result = json.loads(resp.read().decode("utf-8"))
except urllib.error.HTTPError as e:
body = e.read().decode("utf-8", errors="replace")
print(f"[error] HTTP {e.code}: {body}", file=sys.stderr)
sys.exit(1)
except urllib.error.URLError as e:
print(f"[error] 网络请求失败: {e.reason}", file=sys.stderr)
sys.exit(1)
except (json.JSONDecodeError, KeyError, TypeError) as e:
print(f"[error] 数据解析异常: {e}", file=sys.stderr)
sys.exit(1)
code = result.get("code")
if code != 2000:
print(f"[error] 接口返回错误: code={code}, msg={result.get('msg', '未知')}", file=sys.stderr)
sys.exit(1)
data = result.get("data") or {}
return {
"articles": format_articles(data.get("articles") or []),
"latestHotArticles": format_articles(data.get("latestHotArticles") or []),
"hotTopics": data.get("hotTopics") or [],
}
def main():
import argparse
parser = argparse.ArgumentParser(description="抖音爆款作品搜索脚本")
parser.add_argument("keyword", help="搜索关键词")
parser.add_argument("--start-date", "-s", default="", help="起始日期,格式 YYYY-MM-DD(默认:空字符串)")
parser.add_argument("--end-date", "-e", default="", help="结束日期,格式 YYYY-MM-DD(默认:空字符串)")
args = parser.parse_args()
keyword = args.keyword.strip()
if not keyword:
print("[error] 关键词不能为空", file=sys.stderr)
sys.exit(1)
result = search(keyword, start_date=args.start_date, end_date=args.end_date)
print(json.dumps(result, ensure_ascii=False, indent=2))
if __name__ == "__main__":
main()