This duck helps short-drama creators and MCN operators scan Xiaohongshu for viral short-drama notes by keyword—pulling out viral notes in the short-drama recommendation, plot recommendation, and binge-watching guide categories, laying them out in a clickable viral-notes table in the terminal, then clustering them by recommendation angle into several directions, assembling a short-drama daily report you can take straight to writing notes and running recommendation campaigns.
Data goes through doubaoya.com in a single line; authentication uses your own token (environment variable
DOUBAOYA_API_KEY, in the formdyh_…)。
Use cases
| Scenario | How to use | What you get |
|---|---|---|
| Daily viral-notes review | Use 短剧 to scan today's viral short-drama notes on Xiaohongshu |
See at a glance what the Xiaohongshu short-drama scene is recommending today |
| Recommendation topic daily report | Scan once by angle and cluster into several recommendation angles | A short-drama topic daily report you can use directly to write notes |
| Niche angle tracking | Use 短剧安利、甜宠短剧、追剧攻略 and other narrow terms |
Lock onto viral notes for a certain short-drama recommendation style |
| Cover and title breakdown | Look at the titles and cover copy of high-like notes | Distill the recommendation formulas of Xiaohongshu viral short-drama notes |
| Recommendation copy accumulation | Page through several screens to gather first-hand note material | Build a short-drama recommendation/traffic-driving copy library |
Workflow (4 steps)
1. Set keywords
Extract one short-drama direction keyword(required) from the user's description, such as 短剧、短剧安利、甜宠短剧、追剧攻略、短剧推荐. Broad terms hit more, narrow terms are more focused; scan only one keyword at a time.
2. Call the script
python3 "$SKILL_PATH/scripts/fetch_playlet_feed.py" "短剧"
Paging / adjust items per page (optional):
python3 "$SKILL_PATH/scripts/fetch_playlet_feed.py" "甜宠短剧" --page 2 --size 30
The script prints the data from the success envelope as JSON to stdout.Run the script only once per query, read the complete stdout directly, don't use head/tail to preview, and don't call repeatedly with the same parameters.
3. Render the viral-notes table
Take fields from data.items(notes array) and lay them out as a Markdown table. The core fields this API reliably returns are title(title) and likeCount(likes); read defensively—fields may be missing, leave them blank if so, don't error out, and don't invent links or authors the API didn't return. If a given result happens to include a link, render the title as a clickable link; otherwise plain text is fine.
| Title | Likes |
|---|---|
| Example viral short-drama notes | 24,000 |
4. Cluster into a daily report + one insight
Take this batch of notes and, by recommendation angle,cluster(e.g. plot recommendation / actor fan appeal / binge-watching guide / matching outfits), pick a representative viral note for each direction, and form a short daily report. End with a line in this duck's voice astopic insight: Today, in the Xiaohongshu short-drama circle, which angle is most likely to drive种草, and which cover copy approach still has openings. Don't pile on generic talk, don't ask the user about their purpose.
Get key (passcode)
- Open doubaoya.com
- Log in
- Go to Passcode Center
- Generate passcode(in the form
dyh_…)
Configure to environment variable (the script only recognizes this):
export DOUBAOYA_API_KEY="dyh_你的口令"
Iron rule: the passcode is never printed, never written to a file, and never echoed back to the user. The script itself never outputs the passcode either. All requests are sent only to doubaoya.com。
Interface and envelope
POST https://doubaoya.com/api/apis/xiaohongshu/xiaohongshu-playlet-feed/call- Auth header:
Authorization: Bearer $DOUBAOYA_API_KEY - Request body:
{ "keyword": "短剧", "pageNum": 1, "pageSize": 20 }keyword: string, requiredpageNum: integer, optional (default 1, controlled by--page)pageSize: integer, optional (default 20, controlled by--size)
- Return envelope:
{ "success": true, "requestId": "...", "data": { "items": [ { "title": "...", "likeCount": 24000 } ] }, "error": null } - First check
success: iftrue, then readdata; otherwise readerror.code/error.message。
Error handling
When the script fails, it prints to stderr [error] CODE: message and exits with code 1. Common cases:
| HTTP | code | Meaning | Handling |
|---|---|---|---|
| 401 | MISSING_API_KEY / UNAUTHORIZED |
No passcode provided or invalid passcode | Check DOUBAOYA_API_KEY, go to the Passcode Center to regenerate |
| 400 | VALIDATION_ERROR |
Invalid parameter (e.g. keyword is empty) | Fix the keyword and retry |
| 402 | INSUFFICIENT_CREDITS |
Insufficient quota | Go to doubaoya.com to top up/renew |
| 502 | PROVIDER_FAILED |
Temporary upstream failure (automatically refunded) | safe to retry |
502 PROVIDER_FAILEDwill automatically refund, retrying is safe and will not double-charge.
Directory structure
playlet-xiaohongshu-feed/
├── SKILL.md # 本文件
└── scripts/
└── fetch_playlet_feed.py # 零依赖脚本(urllib),调用 doubaoya.com