SuperAPI AI Directory

xiaohongshu-title

Writing & research

View repository

Updated 10-16 00:01

About this skill

Xiaohongshu Title Generation

1. Introduction

A professional tool that generates viral Xiaohongshu titles based on any information input by the user -- by querying real viral data from the Xiaohongshu platform, analyzing the common characteristics of viral titles, and combining them with the core theme input by the user, it automatically generates 10 highly matching viral Xiaohongshu titles, each with a match index, reference viral post, and detailed recommendation reason.

Target Users: Xiaohongshu creators, content operators, copywriters, and writers who need title inspiration.


2. Features

Core Features:

  • Intelligently understands user input -- no matter what content is input, it can extract core keywords
  • Viral data query -- queries popular Xiaohongshu note titles based on user keywords
  • Viral pattern analysis -- analyzes viral characteristics from dimensions such as title structure, keywords, and emotional expression
  • Batch title generation -- generates 10 new titles that fit viral patterns at once
  • Match index scoring -- each title comes with a match index of 8-10 points

Highlighted Features:

  • Generalized term expansion strategy: for broad category terms (such as "beauty" and "outfit"), automatically recommends 10 sub-directions for the user to choose from
  • Precise keyword understanding: strictly distinguishes product forms (for example, "sunscreen" only queries cream products, and does not expand to sprays, hats, etc.)
  • Automatically expands the time range when data is insufficient (changing words is prohibited)
  • Unified output format:Title X + Match index + Reference viral post + Recommendation reason + Separator line

3. One-Click Installation

Authentication

Get API Key

Please go to RedFox Hub to get the API KEY

Configure API Key

Option 1: Taking 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..."

Dependency Installation

Depends on the requests library (standard Python library); if not installed, run pip install requests。


4. Usage Guide

Basic Usage

Core Principle: No matter what the user inputs, the ultimate goal is to generate viral Xiaohongshu titles.

Example Understanding:

  • "I want to write content about skincare" -> generate viral titles based on "skincare"
  • "Office worker breakfast" -> generate viral titles based on "office worker breakfast"
  • "Sunscreen" -> only query sunscreen (cream/lotion form), excluding sunscreen spray, sun-protective clothing, etc.

Complete Operation Process (execute strictly in order)

Step 1: Understand user input and extract keywords

  1. Analyze the user input and extract the core theme and keywords from the input.
  2. Determine the keyword type:
    • Subcategory term / vertical niche(contains specific scenario/attribute modifiers) -> query data directly
    • Specific product term(such as "sunscreen" and "mascara") -> directly query data for that product, without expanding to other products
    • Generalized term / broad category(pure broad category term, such as "outfit" and "food") -> execute the generalized term expansion strategy

Precise keyword understanding rules:

  • Only query the exact product the user inputs; do not arbitrarily expand to related but different products
  • Cream != spray != clothing: when the user inputs "sunscreen cream," they want a cream with sun protection, not sunscreen spray or sun-protective clothing
  • Mascara != liquid != powder: when the user inputs "mascara," they want a cream-based eyelash product, not false eyelashes or eyelash growth serum
  • Liquid != cream != spray: when the user inputs "liquid foundation," they want a liquid foundation, not cushion compacts or BB cream

Step 2: Generalized term expansion strategy (execute only when the keyword is a generalized term)

  1. Search the past 7 days of web news for Xiaohongshu hot topics related to the generalized term and generate subcategory terms (calling scripts to search data is prohibited)
  2. Output 10 subcategory direction terms (2-3 each of trend terms, audience terms, scenario terms, and intent terms)
  3. Must wait for the user to reply "expand" or "do not expand" before executing, and must not continue executing any script calls in the same conversation

Example of expanded term output:

我识别到「美妆」是较大的分类,已查询近期热门趋势,推荐以下细分方向:
柔焦底妆、养肤妆、亚裔妆、油皮定妆、通勤妆、夏日妆容、新手妆容、平价彩妆、妆容教程、彩妆测评
回复「拓展」将同时搜索这10个词,回复「不拓展」将继续搜索「美妆」

Step 3: Time range and data query

  • The database only contains data from yesterday to 30 days ago
  • "Recent" is defined by default as the last 7 days (startDate = today - 6 days)
  • Date format must be yyyy-MM-dd

Automatic adjustment when data is insufficient (prioritize extending time; switching keywords is prohibited):

  • Processing principle: when there are fewer than 5 records, only the time range may be extended; keywords may not be replaced or expanded
  • Adjustment order: last 1 day -> last 3 days -> last 7 days -> last 30 days
  • After each extension, prompt the user: "This keyword has fewer than 5 records in the last X days; the time range has been automatically extended to the last Y days"
  • Final fallback: even if extended to the last 30 days and still fewer than 5 records, display the existing data as is, but the user must be prompted that the data is insufficient

Execute command:

# 有赛道关键词
python scripts/fetch_xhs_trends.py --keyword <关键词> --start-date <日期>

# 无赛道关键词(查询全站热门)
python scripts/fetch_xhs_trends.py --keyword "" --start-date <日期>

Step 4: Viral data (executed internally only; not displayed on the page)

Read the generated Markdown file:关键词_爆款数据.md

Step 5: Analyze viral titles and generate new titles (strictly follow this order)

Step 1 - Analyze viral titles(executed internally only):

  • Extract all titles from the acquired viral data
  • Analyze common features: title structure, keyword usage, emotional expression, target audience, pain point callouts, benefit promises

Step 2 - Generate new viral titles:

  • Create 10 new viral titles based on the analysis results
  • Titles must be kept within 20 characters or fewer
  • Match index range: between 8-10 (must not be lower than 8), keep one decimal place
  • The same match index may appear at most 2 times
  • Referenced viral titles must support click-through to view the work link:[标题文字](https://www.xiaohongshu.com/explore/{photoId})

Step 6: Verify whether the output format is correct

Format verification must be completed before output to ensure all format requirements are 100% compliant.

Final output order: First output "Data notes," then output all 10 recommended titles.

Output format (must be strictly followed)

基于本次分析,为您生成以下10个爆款标题:

**数据说明**:!!!受小红书风控规则限制,部分作品链接可能无法正常跳转,您可复制对应作品标题前往小红书搜索查看,感谢理解🙇‍♀️🙇‍♀️

**标题1:[标题内容]**
📈匹配指数:[数值]
🔥参考的爆款:[参考标题1](链接)(互动数:XXX)、[参考标题2](链接)(互动数:YYY)
👍推荐理由:[详细推荐理由,包含:标题结构、关键词、目标人群、痛点、价值承诺、受欢迎原因]

---

**标题2:[标题内容]**
📈匹配指数:[数值]
🔥参考的爆款:[参考标题C](链接)(互动数:XXX)
👍推荐理由:[详细推荐理由]

---
...(共10个标题)
---

Advanced usage

Terminology standards (must be 100% followed):

  • In all output content, the words "crawl" and "scrape" are absolutely prohibited
  • "Acquire" must be used instead

Match Index Rules:

  • Value range: between 8 and 10
  • Keep one decimal place
  • The same match index can appear at most 2 times

Usage Recommendations:

  1. First test the 2-3 titles with the highest match index, and observe the actual data performance
  2. Based on the test results, adjust the keywords and expressions of the titles
  3. Combine with your own content characteristics to personalize and modify the recommended titles

Common Command Quick Reference

Scenario Example Input Processing Method
Direct query for niche terms "Office worker breakfast" Directly search to generate titles
General terms need expansion "Outfit", "Beauty" First recommend 10 niche directions
Specific product terms "Sunscreen" Strictly limit the query to that product form
No keywords "What's trending recently" Query site-wide trending to generate titles

5. Use Cases

  1. New creators looking for title inspiration: Enter your own content topic (e.g., "fat-loss meals") to get 10 high-match titles that follow viral patterns, which you can directly use or modify for reference.
  2. Content operations producing titles in batches: Query different niche keywords in sequence to quickly generate multiple sets of title plans in batches, improving content production efficiency.
  3. Copywriting planners verifying title quality: Use your drafted titles as input, and let the system generate comparison titles based on viral data in the same track, verifying whether the titles hit viral patterns.
  4. Topic exploration for broad category directions: Enter a general term (e.g., "Outfit"), obtain 10 niche directions through an expansion strategy, then generate titles for each direction, and discover potential viral directions.

6. Project Architecture

Directory Structure

xiaohongshu-title/
├── SKILL.md                      # 本文件
└── scripts/
    └── fetch_xhs_trends.py       # 数据查询脚本,调用红狐API获取爆款标题数据

Tech Stack

Technology Purpose
Python + requests HTTP requests and data retrieval
RedFox API Data source for Xiaohongshu viral titles
AI intelligent analysis Viral pattern extraction and new title generation

Core Module Description

  • fetch_xhs_trends.py: Receives keyword and time range parameters, calls the RedFox API to query popular note title data on Xiaohongshu, and outputs a Markdown-format viral data file (关键词_爆款数据.md), for subsequent analysis.

Resource Index

File Purpose
scripts/fetch_xhs_trends.py Data query script

7. FAQ

Installation

Q: What dependencies need to be installed? A: Requires the requests library. If not installed, you can run pip install requests。

Q: How do I configure the API Key? A: Please go to RedFox Hub to obtain an API KEY, and configure it through the environment variable REDFOX_API_KEY .

Usage

Q: How long a period does the data cover? A: The database only contains data from yesterday to 30 days ago.

Q: How do I distinguish general terms from niche terms? A: General terms are broad, high-level summary words with wide coverage (such as "outfit" and "beauty"). Specific terms are words with specific scenario/attribute modifiers (such as "workplace outfit" and "fat-loss meal").

Q: What should I do if there is insufficient data? A: Automatically expand the time range in the order of the last 1 day -> last 3 days -> last 7 days -> last 30 days. Changing words is prohibited.

Q: Why is the title limited to 20 characters? A: Based on analysis of popular Xiaohongshu content, titles within 20 characters have the highest click-through rate.

Troubleshooting

Q: Why can't I search for "today's" data? A: When the user says "today", reply "Very sorry, today's data has not been updated yet; the most recently available data is shown for you."

Q: Why can't I query data older than 30 days? A: When the time requested by the user exceeds 30 days, reply "Very sorry, currently only the most recent 30 days of data are supported; the closest data is shown for you."