📝 Introduction
One Skill covers the entire Xiaohongshu topic inspiration chain—from finding viral hits and tracking rankings to selecting benchmarks. Based on the Xiaohongshu viral library collected daily by Honghu Data (included when interactions are 1000 or more), it helps creators, brands, and MCNs quickly find their next topic. Data covers from yesterday to 30 days ago; see the corresponding sections for the update time of each module. All data comes from the Honghu API,any online search is strictly prohibited; it is executed only in the main Agent and is not dispatched to sub-Agents.
✨ Features
| Feature Module | Capability Description | Core Value |
|---|---|---|
| M1 Keyword Viral Search | Search viral notes by keyword (included when interactions are 1000+, updated daily at 7:00 for yesterday), with three-dimensional scoring and ranking recommendations | Find topic inspiration and lock onto niche hotspots |
| M2 Batch Work Retrieval | Batch retrieve works by keyword + date range + sorting (from yesterday to 30 days ago), supports Excel/HTML export | Data-driven topic selection, convenient for review and sharing |
| M3 Daily Viral TOP50 | Breakout ranking by interaction growth on the 3rd day after publication relative to the 2nd day (updated daily at 19:00) + viral pattern analysis | Track breakout trends and grasp viral rhythms |
| M4 Low-Follower Viral Discovery | TOP50 dark horse notes with followers < 5000 and likes > 500 (updated daily at 19:30) | Account launch samples that small bloggers can directly replicate |
| M5 Account Rankings | Daily/weekly/monthly account TOP50, weighted scoring by follower and interaction growth | See niche rankings and find follower growth benchmarks |
| M6 Benchmark Account Recommendations | Same-tier benchmarks (gameplay can be directly replicated) + high-tier benchmarks (3-5x follower count) | Account launch references and placement choices are well-founded |
🔑 Authentication (REDFOX_API_KEY)
Dependency Installation(only M2/M3 require requests; other modules use the standard library):
pip3 install "requests>=2.28.0"
How to Obtain:
- Visit Honghu Hub to learn about the service
- Go to the registration page to register (new users receive free credits)
- Get it on the API Key page , format
ak_xxxxxxxx
Configuration Method(the script automatically falls back by priority):
| Priority | Source | Description |
|---|---|---|
| 1 | Environment variable REDFOX_API_KEY |
Directly read the current process environment variable |
| 2 | Shell configuration file | Automatically scan ~/.zshrc ~/.bashrc ~/.bash_profile ~/.profile ~/.zprofile |
| 3 | Prompt the user to configure | When none of the above are found, guide the user to configure |
Configuration example:echo 'export REDFOX_API_KEY=ak_xxx' >> ~/.zshrc && source ~/.zshrc; verification:echo $REDFOX_API_KEY。Windows:[Environment]::SetEnvironmentVariable("REDFOX_API_KEY", "<值>", "User") then restart the terminal.
🔄 Feature Routing
| User Intent | Typical Expression | Module |
|---|---|---|
| Search viral notes by keyword, find topic inspiration | "Search for viral mascara notes" | M1 |
| Batch retrieve works by time range, export reports | "Get August outfit work data", "Export Excel" | M2 |
| Daily viral rankings, breakout notes, engagement growth | "Today's viral notes", "Mascara breakout ranking" | M3 |
| Low-follower viral hits, dark horse notes, small creator viral hits | "Low-follower viral hits", "Notes with few followers but very popular" | M4 |
| Account rankings, follower growth rankings, top accounts in a niche | "Xiaohongshu daily ranking", "Beauty weekly ranking TOP50" | M5 |
| Find benchmark accounts, similar accounts, account launch references | "My ID is xxx, recommend benchmarks", "3000-follower everyday cooking creator" | M6 |
Mixed intents are executed separately by module; when it cannot be determined, ask the user first.
⚙️ Global rules (shared by all modules)
Keyword type determination (shared by M1/M2/M3)
- Niche terms/vertical niches(including scenario/audience/style/attribute modifiers, such as "workplace outfits", "fat-loss meals") → query directly
- Broad terms/major categories(unmodified broad category terms, such as "beauty", "food", "outfits") → perform broad term expansion,calling scripts directly is prohibited
- Empty keyword → M1 directly queries site-wide popular content (no score column)
Broad term expansion strategy (mandatory wait):
- Combine with recent popular trends to generate 10 niche directions (2-3 each of trend terms, audience terms, scenario terms, intent terms)
- After outputting the recommendationsstop immediately, wait for the user to reply "expand" or a specific keyword,and do not continue calling scripts in the same round of dialogue
- User replies "expand" → search these 10 niche terms; replies with a specific keyword → use that term to query
Data time rules
- Xiaohongshu data coveragefrom yesterday to 30 days ago, today's data has not been ingested
- If the user queries "today" → inform them "today's data has not been updated yet; the most recent available data is shown for you"; if they request more than 30 days → inform them "currently only the last 30 days of data are supported; the closest data is shown for you"
- When data is insufficient, only expand the time range; changing terms is prohibited(M1/M2/M3): automatically expand in the order of last 1 day → last 3 days → last 7 days → last 30 days, and inform them "there is relatively little data for this keyword in the last X days; the time range has been automatically expanded to the last Y days"; ❌ changing keywords due to insufficient data, recommending other terms, or triggering broad term expansion is prohibited
- M5 ranking lookback limits: daily rankings last 7 days, weekly rankings last 3 weeks, monthly rankings last 3 months; when out of range, switch to the nearest available date and inform the user
Output iron rules
- Total count verification: the displayed number of items N must be taken from the array length returned by the script (e.g.,
articles); manual counting is prohibited - Faithful output: directly read the JSON/Markdown returned by the script and output according to each module's strategy; ❌ adding extra analysis or suggestions is prohibited, ❌ explaining reasons is prohibited, ❌ asking the user for their real purpose is prohibited (except for analyses included in the module itself, such as M3/M4)
- Number format: < 10000 display directly; ≥ 10000 use
x.xw(e.g., 56200 → 5.6w) - Title format:
[标题](链接), truncate and add if over 30 characters...; empty title displays "-" - Pagination loop: when data exceeds the displayed number of items, the remaining count and expansion method must be indicated; when the user replies to view all, output the complete results
- Single query, single API call: a normal query calls the interface only once, with no duplicate requests
Standard tracks (25)
All, Transportation, Leisure & Hobbies, Film & Entertainment, Digital Tech, Healthcare, General Misc, Astrology & Relationships, Fashion & Outfits, Weddings, Photography & Records, Study & Education, Makeup & Beauty, Home & Renovation, Travel & Vacation, Parenting, Personal Care, Delicious Food, Career Development, Pets, Trendy Shoes & Bags, Daily Life, Scientific Exploration, News & Information, Sports & Fitness.
🔍 M1 Keyword Viral Search
Search Xiaohongshu viral posts by keyword (inclusion criteria: 1000+ interactions), sorted and recommended by three-dimensional scoring.
Pre-notice (must be stated before displaying data): The inclusion principle for viral posts is articles with 1000+ interactions; yesterday's data is updated every morning at 7 AM; interaction data is as of the time of inclusion and is not real-time. Sorting explanation: when there is a keyword, weighting is by relevance (out of 10) + popularity (out of 3) + timeliness (out of 2), for a total score out of 15; site-wide trending is sorted by interaction count, with no score column.
Execution process
# 关键词搜索(默认取 10 条)
python3 scripts/fetch_xhs_hot_articles.py --keyword "睫毛膏" --max-items 10
# 指定时间范围(YYYY-MM-DD)
python3 scripts/fetch_xhs_hot_articles.py --keyword "睫毛膏" --start-date 2026-08-01 --end-date 2026-09-06
Main parameters:--keyword(required),--max-items(default 10),--start-date/--end-date、--page-num(default 1),--page-size(default 50),--output-format json|html。
Time range conversion: "recent" defaults to the last 7 days; "today" means yesterday; "last N days" = today - N days.
Display strategy (graded by number of articles)
Table field order (total score displayed in bold):
- With keyword:
| 笔记标题 | 作者 | 互动数 | 发布时间 | 相关性 | 热度 | 时效 | **总分** | - Site-wide trending:
| 笔记标题 | 作者 | 互动数 | 发布时间 |
| Case | Output content |
|---|---|
| A: ≥ 10 items | 📅 Query time range + data table + 🔤 term expansion recommendations (relatedSearches) |
| B:0 < n < 10 | Time range + 💡"Only found X results; you can expand terms or expand time" prompt + data table + term expansion recommendations + 💡 recommended recent popular posts (latestHotArticles top 10, no score column) + 📈 popular track list |
| C:= 0 | Fixed wording "🔍Sorry, the inclusion principle for viral posts is articles with 1000+ interactions. This search term is too niche within the query time range (X - Y), and no content directly related to "XXX" was found. You can try again with shorter/broader keywords" + Recommended search terms(relatedSearches in bold) + recommended popular posts + popular track list |
In case C, adding extra analysis, explaining reasons, or proactively providing other options is prohibited. Popular track list: outfits, food, makeup, film & TV, workplace, cute pets, home, travel, transportation, interests, technology, internet, healthcare, astrology & relationships, weddings, photography, education, parenting, personal care, trendy shoes & bags, life, scientific exploration, news & information, sports.
Pagination, subscription, and segmented tracks
- Pagination: when articles > 10, display the first 10 by default, with the prompt "💡 A total of X related posts were found, and the first 10 are displayed. Do you need to view all?"
- Subscription inquiry(Must be executed when articles > 0; skipping is prohibited, and asking before displaying results is prohibited):
📬 订阅服务
1️⃣ 是否需要订阅当前搜索条件笔记,订阅后将定时推送给您?
2️⃣ 暂不需要
When the user chooses to subscribe, first inform them "📅 Data update time: Yesterday's data is updated every day at 7:00 AM" and ask for the push time, then use the host's scheduled task/calendar tool to create the subscription (title: Xiaohongshu Popular Notes Subscription: {keyword}, parameters use the current query conditions).
- Recommended niche tracks(Must be executed after displaying data): Based on the current keyword, generate 10 niche directions (scene words, audience words, style words, intent words, 2-3 each, moderate in size), and prompt "Reply with a specific keyword, and I will query the popular notes for that track for you"; for an empty keyword, directly use the popular track list; words that have already been expanded do not need to be asked about again.
See the output format specification at references/m1_hot_article_format.md。
📥 M2 Batch Fetch Works
Batch fetch Xiaohongshu work data by keyword + date range + sorting method, supporting Excel/HTML report export.
Execution flow
# 基础查询(关键词为位置参数)
python3 scripts/crawl_xhs.py "睫毛膏"
# 指定日期范围与排序
python3 scripts/crawl_xhs.py "睫毛膏" --start-date 2026-08-01 --end-date 2026-09-06 --sort-type _0
--sort-type:_0 Comprehensive sorting (default) / _2 Most liked / _4 Latest published.
The script returns JSON:articles(work data),total、relatedSearches(related search terms),latestHotArticles(recent popular notes, for auxiliary display of 10 items),hotTopics(popular topics, not displayed in the conversation).
Display strategy (graded by number of articles)
Table format (titles use [标题](work_url) links):
| # | 笔记标题 | 作者 | 收藏 | 分享 | 评论 | 点赞 | 发布时间 |
| Case | Output content |
|---|---|
| A: ≥ 20 items | 📊 "Keyword 「XXX」 retrieved a total of N Xiaohongshu works" + risk control notice + first 20 rows in a table + "M items remain undisplayed, reply 「View All」 to expand" + recommended niche tracks (10) |
| B:0 < n < 20 | Query scope + 💡 "Few results; you can try a shorter keyword or expand the time range" prompt + risk control notice + full table + recommended niche tracks |
| C:= 0 | 😔 "Sorry, no Xiaohongshu works related to 「XXX」 were found" + 🔍 Recommended search terms(relatedSearches in bold) + 💡 Recommended popular notes (latestHotArticles first 10) + 📈 Popular track list |
Risk control notice(A/B must output it, immediately after the query scope):
!!! Due to Xiaohongshu's risk control rules, some work links may not open properly. You can copy the corresponding work title and search for it on Xiaohongshu to view it. Thank you for your understanding 🙇♀️🙇♀️
Formatting rules:publish_time convert to MM-DD HH:MM(display regardless of whether a time range is specified); the rest is the same as the output iron rules.
More operations and report export
After display, append at the end (the second item is displayed only when articles > 20, M = N - 20):
⚡ 更多操作
• 是否需要下载 Excel 文件或 HTML 可视化报告?便于您在浏览器中打开查看
• 本次共 N 条作品,是否需要查看剩余 M 条?
When exporting, first write the result JSON to a temporary file, then call the report script (output to ~/Downloads/XhsCrawl/, and inform the path after generation):
echo '<JSON数据>' > /tmp/xhs_crawl_data.json
python3 scripts/generate_xhs_report.py "关键词" --input /tmp/xhs_crawl_data.json --format both
--format:csv(Excel compatible) / html(visual report) / both(generate both).
📊 M3 Daily Viral TOP50
Query the TOP50 "viral notes" for a category/keyword on a given day — the metric is the interaction increase on the 3rd day after the note is published relative to the 2nd day. Yesterday's data is updated daily at 19:00 (if currently ≥19:00, query yesterday; if <19:00, query the day before yesterday).
Execution flow (two-step CLI, normally only 1 API call)
# 第一步:拉取数据并写缓存
python3 scripts/xhs_daily_fetcher.py --keyword "睫毛膏" --top_n 50 --output_json /tmp/xhs_daily_cache.json
# 第二步:从缓存生成 HTML(0 次 API 调用)
python3 scripts/gen_xhs_html.py --keyword "睫毛膏" --top 20 --input_json /tmp/xhs_daily_cache.json
Main parameters:--rank_date(YYYY-MM-DD, defaults to automatically taking the latest available date),--category、--keyword、--top_n(default 10),--list_categories(lists all categories),--output_json(data cache).
Output specification (fixed three parts, collapsed output prohibited)
- Viral Ranking: TOP50 table (title/author/interaction data/publish time)
- Analysis: viral pattern analysis automatically generated by the script
- Feature Service Inquiry: entry points for subscription push, report export, etc.
HTML file name format:小红书每日爆款笔记_{分类}_唯一时间戳.html, after generation inform the user of the path.
For the detailed workflow see references/m3_core_workflow.md。
💎 M4 Low-Follower Viral Discovery
Discover low-follower viral notes with followers < 5000 and likes > 500 (dark horse samples), suitable for finding topics and learning title-writing techniques. Updated daily at 19:30 with yesterday's data.
Execution Flow
# 查询低粉爆款(默认分类「综合全部」)
python3 scripts/fetch_explosive_articles.py --keyword "居家装修" --top_n 50
Main parameters:--keyword、--category(default: All),--rank_date(default: automatically takes the most recent available date),--top_n(default 50),--show_all、--realtime、--debug。
The script outputs a Markdown report (viral notes table + viral pattern analysis + feature selection entry),after reading, output it to the user as-is; at the same time generate *_cache.json cache file.
HTML Export (energy-saving mode, 0 API calls)
When the user requests export, render from cache first; only when the cache is missing, use fallback mode to re-request the API:
# 节能模式:从缓存生成(优先)
python3 scripts/generate_html_on_demand.py --from-cache ./小红书居家装修低粉爆款数据_xxx_cache.json --output ./output.html
# 回退模式:重新请求 API(仅缓存缺失时)
python3 scripts/generate_html_on_demand.py --rank_date 2026-09-06 --keyword 居家装修 --output ./output.html
After generation, display the HTML, deliver the file, and inform the save path. For interface specifications see references/m4_api_spec.md。
🏆 M5 Account Rankings (Daily/Weekly/Monthly TOP50)
Query Xiaohongshu account performance rankings: ranking is calculated by weighted total followers, follower/like/collect/share/comment increments within the period, with a full score of 100.
Execution Flow
# 推荐方式:直接传入用户原始问题,脚本自动解析周期/日期/赛道
python3 scripts/fetch_rank.py --query "小红书美妆日榜" --limit 20 --html
Main parameters:--query(automatically parsed from natural language),--period(day/week/month)、--date(YYYY-MM-DD)、--category(track),--limit(default 20),--format markdown|json、--html(also generate an HTML report).
Ranking Updates and Backtracking:
| Ranking | Update Time | Backtracking Limit |
|---|---|---|
| Daily Ranking | Daily at 19:00 (yesterday's data) | Last 7 days |
| Weekly Ranking | Every Monday at 15:00 (last week's data) | Last 3 weeks |
| Monthly Ranking | At 9:00 on the 1st of each month (last month's data, date taken as the 1st of each month) | Last 3 months |
For categories such as "Physical Exercise", some dates may return empty data, and the script automatically falls back to another date (up to 3 days).
Output specification (strictly in order)
📊 小红书{日榜|周榜|月榜} · {赛道}
数据日期:{date},共 {total} 个账号上榜
💡 榜单说明:{更新时间}更新昨日/上周/上月数据。
📐 排名算法:排名根据达人在小红书的总粉丝数、周期内的粉丝增量、点赞增量、收藏增量、分享增量以及评论增量加权计算所得,满分100分。
| 排名 | 账号名 | 综合评分 | 总粉丝数 | 新增笔记 | 新增粉丝 | 新增点赞 | 新增评论 | 新增收藏 | 新增分享 |
统计概览:上榜账号 {total} · 最高互动 {max_interaction} · 总新增笔记 {total_notes}
- Account name format "Account Name · Track", with homepage link; rankings 1-3 add 🥇🥈🥉
- Highest interaction = likes + comments + collects + shares (calculated, cannot directly use the API's
newInteractionfield) - Append a "📬 Subscription Service" inquiry: whether to subscribe to daily/weekly/monthly rankings or a specific track (25 standard tracks) push
- Deliver the HTML report, and append "⚡ More Actions": open in browser to export PDF; the ranking has a full 50 entries, do you need to view all
- When the user requests to view all, use
--limit 50to re-fetch and fully output the Markdown table + deliver the HTML, both are indispensable
API details see references/m5_api_docs.md, scoring rules see references/m5_score_rules.md。
🎯 M6 Benchmark Account Recommendations
Enter a Xiaohongshu account ID or "niche + follower count + tier" to recommend same-tier benchmarks (similar follower count, gameplay can be directly copied) and higher-tier benchmarks (3-5x follower count, can be referenced for catching up).
Execution Flow
# 方式 A:按账号 ID 查询
python3 scripts/xiaohongshu-similar-account.py --red_id "27493135897"
# 方式 B:按赛道 + 粉丝数 + 等级查询
python3 scripts/xiaohongshu-similar-account.py --track "美味佳肴" --min_fans 0 --max_fans 3000 --level "素人"
Follower Count Parameter Rules (Important):
- Single follower count (e.g. "3000 followers"):
--max_fans 3000 --min_fans 0 - Follower range (e.g. "1000-3000 followers"):
--max_fans 3000 --min_fans 1000 - No follower count specified: pass neither parameter
Smart Mapping:--track Supports automatic mapping of colloquial input (cooking/food/food exploration→Culinary Delights, beauty/makeup→Beauty & Makeup, skincare→Personal Care, outfit/fashion→Fashion & Style, fitness/sports→Physical Exercise, maternal & infant→Parenting, digital/AI→Digital Tech, etc., 25 standard niches in total, see global rules);--level Supports colloquial mapping (novice/beginner/personal account→amateur, big V/million followers→top KOL, mid-tier/100k followers→mid-tier KOL, etc., 7 tiers). When unrecognizable, the script will list the complete niche list for selection.
Output Specifications (strictly in order)
- Opening statement (only show groups with data)
- Same-tier benchmark table:
| 账号名 | 粉丝数 | 近30天互动数 | 推荐理由 |(account name with homepage link) - Higher-tier benchmark table (same format)
- Analysis Summary
- Subscription Service (must be output, regardless of whether there is data): whether to subscribe to benchmark account push notifications for the current query conditions, updated daily at 7 PM
- Read the script output
html_pathand display the HTML report
When there is no data, output "✨ No benchmark accounts matching the criteria were found yet, please try adjusting the filter conditions" + data description + subscription service. Numeric format follows the output iron rules (≥ 10000 displays X.Xw). Report template see references/m6_account_template.html。