SuperAPI AI Directory

xiaohongshu-top-account

Data & analytics

View repository

Updated 10-15 23:57

About this skill

Xiaohongshu popular account recommendations

Overview

This Skill is based on https://redfox.hk/story/api/xhsData/query data interface, provides daily/weekly/monthly performance ranking queries for Xiaohongshu accounts across all categories/subcategories. Supports three core capabilities:

  1. Ranking query — query daily, weekly, and monthly top 50
  2. Domain query — filter by category (beauty, food, travel, maternal and infant, fitness/physical exercise, etc.)
  3. Report download — generate HTML visualization reports, supports export to PDF/screenshots
  4. Scheduled subscription — set up automated scheduled push

Authentication

Get API Key

Please go to RedFox Hub to get the API KEY

Configure API Key

Option 1: Using OpenClaw as an example, add REDFOX_API_KEY to ~/.openclaw/openclaw.json

{ "env": { "REDFOX_API_KEY": "ak_xxxx..." } }

Option 2: Terminal configuration: export REDFOX_API_KEY="ak_xxxx..."

export REDFOX_API_KEY="ak_xxxx..."

Trigger words and intent recognition

User intent Typical trigger words Corresponding action
Ranking query Xiaohongshu daily ranking, weekly ranking, monthly ranking, TOP50, hottest accounts, leaderboard, latest recommendations Call the API and format the output
Domain query Beauty category/food category/travel category/maternal and infant category/fitness category... Xiaohongshu ranking Call the API and filter by category
Report download Download report, export ranking, generate report Use the --html parameter to automatically generate HTML
Scheduled subscription Subscribe to daily ranking/weekly ranking/monthly ranking, scheduled push, send it to me every day Create WorkBuddy Automation

Execution flow

Strict output order (must be executed in order, must not be skipped)

Step 1: Content output

  1. Call the script to query ranking data (by default only 20 records are queried):
    python scripts/fetch_rank.py --query "用户原始问题" --limit 20 --html
    
  2. Format and output the ranking data according to the standard template (in Markdown table form, up to 20 records)

Step 2: Ask about scheduled subscription

  • After outputting the ranking data,directlyappend the following question (do not wait for the user's reply):
    📬 订阅服务
    1️⃣ 是否需要订阅每日/周/月的小红书账号最新排名,订阅后定时推送给您?
    

2️⃣ Do you need to subscribe to account performance in a specific track? We support: All Comprehensive, Transportation, Leisure Hobbies, Film and Television Entertainment, Digital Technology, Healthcare, Comprehensive Miscellaneous, Astrology and Relationships, Fashion and Outfits, Weddings, Photography and Recording, Education and Learning, Makeup and Beauty, Home Decoration, Travel and Vacation, Parenting, Personal Care, Delicious Food, Career Development, Pets, Trendy Shoes and Bags, Daily Life, Scientific Exploration, News and Information, Physical Exercise

Step 3: Deliver the HTML report

  • The script has automatically generated the HTML file. Use the deliver_attachments tool to deliver the HTML file path output by the script.
  • Append the following content:
    ⚡ 更多操作
    • 点击下方下载HTML报告文件,可在浏览器中打开查看,支持一键导出PDF/高清图片
    • 本次榜单完整共50条数据,是否需要查看全部?
    

When the user indicates they need to view all data:

⚠️ Mandatory requirement: You must output both the Markdown table and deliver the HTML report; neither can be omitted.

  1. Recall the script to obtain the complete 50 records:
    python scripts/fetch_rank.py --query "用户原始问题" --limit 50 --html
    
  2. Output a complete Markdown table of 50 data entries in the conversation (in the standard template format)
  3. Must use deliver_attachments to deliver the HTML file(Key step, must not be omitted), inform the user: "Below is the HTML report of the complete 50 data entries, which you can click to download and view directly"

Process 1: Ranking query (recommended: natural language mode)

Pass in the user's original question directly, the script automatically completes all parsing:

python scripts/fetch_rank.py --query "用户原始问题" --limit 20 --html

Automatic parsing logic:

① Time determination and date calculation

Determine whether the latest data has been updated based on the current time:

Ranking type Update time Current time < update time Current time >= update time
Daily ranking Daily 19:00 Take the previous 2 days (offset=2) Take the previous day (offset=1)
Weekly ranking Every Monday 15:00 Take the previous 2 weeks (offset=2) Take the previous 1 week (offset=1)
Monthly ranking The 1st of each month at 9:00 AM Take the previous 2 months (offset=2) Take the previous 1 month (offset=1)

Date calculation formula:

  • Daily ranking:date.today() - timedelta(days=offset)
  • Weekly ranking:date.today() - timedelta(weeks=offset) the most recent Monday after
  • Monthly ranking:date.today() - timedelta(days=30*offset) the 1st of each month after

Update rules (inform the user when outputting):

  • Daily ranking: daily 19:00 update
  • Weekly ranking: every Monday 15:00 update
  • Monthly ranking: every month 1st 9:00 update

② Period determination

Automatically identify daily/weekly/monthly from the user's text (if not specified, defaultDaily ranking):

  • Contains "week"/"weekly ranking" → week
  • Contains "month"/"monthly ranking" → month
  • All others default → day

③ Lookback range validation

Ranking type Maximum lookback Out-of-range handling
Daily ranking Last 7 days Automatically switch to the most recent available date
Weekly ranking Last 3 weeks Automatically switch to the most recent available date
Monthly ranking Last 3 months Automatically switch to the most recent available date

When out of range: - If the user queries rankings for the current day or a future date, add to the ranking description output: "We are very sorry 🙏, our latest data is from yesterday/last week/last month, and we will provide you with the yesterday/last week/last month hot ranking closest to your needs." - If the user's query time is earlier than the lookback date, add to the ranking description output: "We are very sorry 🙏, the rankings currently support a maximum lookback of 'the past 7 days/the past 3 weeks/the past 3 months'. I will query the time range closest to your needs~"

④ Track (type) matching

Fuzzy matching is supported, see the mapping table at references/api_docs.md。

Common mappings:

User says Maps to
Fitness, exercise, yoga Physical exercise
Beauty, makeup, skincare Makeup and beauty care/personal care
Food, store visits, cooking Delicious Food
Travel, Tourism Travel & Vacation
Maternal & Infant, Parenting Parent-Child Parenting
Outfit, Fashion Fashion & Outfits

If no match can be found, output the overall combination and inform the user that the track category cannot be identified.

⑤ Data fallback mechanism

Important: Some categories (such as physical exercise) may return empty data on certain dates. In this case:

  1. Automatically try the previous date
  2. Fall back a maximum of 3 days
  3. If there is still no data, inform the user that this category has no data for this time period

Process Two: Report Download

  1. Add --html --limit 50 parameter when querying; the script will automatically generate an HTML report
  2. Call deliver_attachments to deliver the HTML file (account names are all clickable and jump to the Xiaohongshu homepage)

Process Three: Scheduled Subscription

  1. Ask for the subscription period (daily / weekly / monthly).
  2. Use automation_update to create an automation task:
    • Daily subscription:FREQ=DAILY;BYHOUR=8;BYMINUTE=0
    • Weekly subscription:FREQ=WEEKLY;BYDAY=MO;BYHOUR=8;BYMINUTE=0
    • Monthly subscription:FREQ=WEEKLY;BYDAY=MO;BYHOUR=8;BYMINUTE=0;INTERVAL=4
  3. automation prompt:查询小红书最新{period}榜(综合全部)并推送给用户

Standard Output Template

Output must follow the order below, and no step may be skipped:

Step One: Content Output

📊 小红书{period_label} · {category_label}

数据日期:{date}
共 {total} 个账号上榜

💡 榜单说明:{period_update_time}更新昨日/上周/上月数据。

📐 排名算法:排名根据达人在小红书的**总粉丝数**、周期内的**粉丝增量**、**点赞增量**、**收藏增量**、**分享增量**以及**评论增量**加权计算所得,满分100分。

| 排名 | 账号名 | 综合评分 | 总粉丝数 | 新增笔记 | 新增粉丝 | 新增点赞 | 新增评论 | 新增收藏 | 新增分享 |
|:---:|--------|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|
| 🥇 1 | 账号A · 赛道 | 96 | 254.06w | 7 | 6919 | 24.64w | 6.68w | 2.53w | 13.39w |
| 🥈 2 | 账号B · 赛道 | 89 | 113.55w | 1 | 1.91w | 7.90w | 4787 | 2.18w | 3.12w |
| 🥉 3 | 账号C · 赛道 | 87 | 439.14w | 2 | 5859 | 16.51w | 993 | 7688 | 687 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |

统计概览:上榜账号 {total} · 最高互动 {max_interaction} · 总新增笔记 {total_notes}

Step Two: Ask about scheduled subscription (append directly, do not wait for a reply)

📬 订阅服务
1️⃣ 是否需要订阅每日/周/月的小红书账号最新排名,订阅后定时推送给您?
2️⃣ 是否需要订阅具体赛道的账号表现?我们支持:综合全部、出行代步、休闲爱好、影视娱乐、数码科技、医疗保健、综合杂项、星座情感、时尚穿搭、婚庆婚礼、拍摄记录、学习教育、化妆美容、居家装修、旅行度假、亲子育儿、个人护理、美味佳肴、职业发展、宠物天地、潮流鞋包、日常生活、科学探索、新闻资讯、体育锻炼

When the user replies "need subscription", use calendar_create tool to create a schedule:

  • Parameters:
    • title: Xiaohongshu {period_label} ranking push
    • description: Subscribe to the Xiaohongshu {period_label} ranking, automatically query and push the latest ranking data
    • start_time: Calculated according to the subscription period (daily 08:00 / every Monday 08:00 / the 1st of every month 08:00)
    • end_time: 1 hour after start_time
    • reminder: 0 (no reminder needed)
  • After successful creation, inform the user that the schedule has been created

Step Three: Deliver HTML report (delivery is mandatory)

⚠️ Mandatory requirement: You must immediately use deliver_attachments to deliver the file; do not merely prompt the user to download without actually delivering it.

  • The script has automatically generated the HTML file (the path is at the end of the output)
  • You must use deliver_attachments to deliver the HTML file(This is a key step; omission will cause the user to be unable to see the report)
  • After delivery, append the following prompt:
⚡ 更多操作
• 点击下方下载HTML报告文件,可在浏览器中打开查看,支持一键导出PDF/高清图片
• 本次榜单完整共50条数据,是否需要查看全部?

⚠️ Field Description:

  • Highest Interaction: Total interactions = likes + comments + favorites + shares; take the account with the highest interaction in the ranking
  • The current API only returns individual detailed fields (total followers, new followers, new likes, new comments, new favorites, new shares)
  • The track is displayed below the account name, using the format "Account Name · Track"

HTML Report Template Specification

Table Column Specification

Column Name Description
Ranking Ranks 1-3 use gold, silver, and bronze medal styles; the rest use gray badges
Account Name Clickable to jump to the Xiaohongshu homepage; the track is displayed below the account name
Total Followers Format: 254.06w
New Notes Integer
New followers Integer or with w unit
New likes With w unit
New comments Integer or with w unit
New favorites Integer or with w unit
New shares Integer or with w unit

Note: The overall score column is not displayed; the table is reduced from 11 columns to 9 columns.

Statistical card specifications

Metric Description
Accounts on the list Total number of list entries, default 50
Highest engagement Total engagement = likes + comments + favorites + shares
Total new notes Sum of new notes across all accounts

List description and ranking algorithm

<div class="notice">
  <div style="margin-bottom: 8px;">💡 <strong>榜单说明</strong>:{period_update_desc}更新,与实时数据存在差异。</div>
  <div>📐 <strong>排名算法</strong>:排名根据达人在小红书的 <strong>总粉丝数</strong>、周期内的 <strong>粉丝增量</strong>、<strong>点赞增量</strong>、<strong>收藏增量</strong>、<strong>分享增量</strong> 以及 <strong>评论增量</strong> 加权计算所得。</div>
</div>

API parameter description

Interface information

  • URL:POST https://onetotenvip.com/story/xhsData/query
  • Success code:code: 2000(not 0!)

Request parameters

Parameter name Type Description Example
dateType int List type: 1=daily list, 2=weekly list, 3=monthly list 1
rankDate string Date (format: YYYY-MM-DD) "2026-04-28"
type string Track name (Chinese) "Physical exercise"
source string Must be 小红书指数榜 "Xiaohongshu Index List"

Date parameters for each list

List type rankDate format Example offset calculation
Daily list YYYY-MM-DD (previous day or two days ago) "2026-04-28" Current time <19:00→offset=2, ≥19:00→offset=1
Weekly list YYYY-MM-DD (Monday) "2026-04-20" Current time Monday <15:00→offset=2, otherwise→offset=1
Monthly list YYYY-MM-02 (the 1st of each month) "2026-04-02" Current time on the 2nd <09:00→offset=2, otherwise→offset=1

Return fields

Field Description
accountName Account name
category Track category
followers Total followers
newNoteCount Number of new notes
newFans New followers
newLikes New likes
newComments New comments
newCollects New favorites
newShares New shares
profileUrl Xiaohongshu homepage link

Usage examples

Example 1: Query the beauty daily list

  • Scenario/input: The user says "Xiaohongshu beauty daily list"
  • Expected output: Return the TOP20 list data for the beauty category for the current day
  • Key points: Automatically parse the track as "Makeup and Beauty", and automatically calculate the date as the latest available date

Example 2: Query the food weekly list

  • Scenario/input: The user says "latest food weekly list"
  • Expected output: Return last week's list for the food category
  • Key points: Automatically parse the period as week, and the track as "Delicious Food"

Example 3: Generate an HTML report

  • Scenario/input: The user needs to export a complete report
  • Expected output: Generate a downloadable HTML file
  • Key points: When calling fetch_rank.py, add the --html parameter to automatically generate an HTML report

Resource Index


Notes

  • The daily ranking displays TOP 20 by default; the full 50 entries can be viewed through the report or by follow-up inquiry.
  • Track keywords support LLM semantic fuzzy matching; when they truly cannot be recognized, fall back to comprehensive all.
  • In the HTML report, account names are all clickable to jump to the Xiaohongshu homepage (based on the profileUrl field).
  • Before generating the report, ensure the workspace has write permission.
  • Highest engagementIt needs to be calculated based on likes + comments + favorites + shares, and the newInteraction field returned by the API cannot be used directly (the value of that field may be 0).
  • The monthly ranking date parameter must use the 1st of each month, for example, to query last month's ranking use "2026-04-02".
  • Physical exercise category: some dates may return empty data, and the date needs to be automatically rolled back.