This duck helps you scan Xiaohongshu for viral cultural tourism notes by keyword—fishing out the notes with the highest likes and saves among city guides, scenic area check-ins, and photo spots, laying them out in the terminal as a clickable viral hit table, then clustering them into several cultural tourism topic directions, building a seeding benchmark list you can directly apply.
Xiaohongshu is the first entry point for cultural tourism seeding: one guide, one set of photo spots can decide where tourists go. Suitable fortourism bureaus, scenic area operations, city cultural tourism accounts, travel bloggersto find seeding topics, look at viral notes, and carve out title and cover angles.
Data goes through doubaoya.com one line, authentication uses your own token (environment variable
DOUBAOYA_API_KEY, in the formdyh_…)。
Note: the underlying layer is the Xiaohongshu content feed, fetching notes by the keyword you give. "Cultural tourism" uses keywords to treat it as a cultural tourism topic lens—results depend on how well the feed matches your word; the closer the word is to cultural tourism, the more accurate.
Applicable scenarios
| Scenario | How to use | What you get |
|---|---|---|
| Seeding topics | Use 文旅、旅游攻略 to scan high-like notes |
See clearly what is currently trending in cultural tourism notes |
| Scenic area check-in benchmarking | Use 景区打卡、出片机位 etc. |
Lock onto the shooting methods and angles of viral check-in content |
| City guide mining | Use 城市旅游、小众目的地 to find angles |
Find the seeding writing approach for city guides |
| Viral benchmarking | See which angles high-like notes are concentrated in | Find content angles worth benchmarking in the same track |
| Title angle breakdown | Look at the titles and hooks of high-like notes | Distill the viral title formulas of cultural tourism notes |
Workflow (4 steps)
1. Set the keyword
Extract one cultural tourism direction keyword(required) from the user description, such as 文旅、旅游攻略、景区打卡、出片机位、小众目的地. Broad words hit more, narrow words are more focused; scan only one keyword at a time.
2. Call the script
python3 "$SKILL_PATH/scripts/fetch_culture_feed.py" "旅游攻略"
Paging / adjust items per page (optional):
python3 "$SKILL_PATH/scripts/fetch_culture_feed.py" "景区打卡" --page 2 --size 30
The script prints the data from the success envelope to stdout as JSON.Run the script only once per query, read the full stdout directly, do not use head/tail to preview, and do not call repeatedly with the same parameters.
3. Render the viral hit table
From data.items(note array), take the fields 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, do not error, and do not imagine links or authors the API did not return. If a given response happens to include a link, then render the title as a clickable link; otherwise plain text is fine.
| Title | Likes |
|---|---|
| Example cultural tourism note | 8,800 |
4. Cluster into topic directions + one-sentence insight
Take this batch of notes from a cultural tourism anglecluster(such as city guides / scenic spot check-ins / photo spots / food exploration / weekend short trips), pick out representative viral hits for each direction, and form a short benchmarking list. At the end, add one sentence in this duck's tonetopic insight: which cultural tourism note angle is most种草 right now, and what kind of cover/title still has room. Don't pile on clichés, don't ask the user their purpose.
Get key (passcode)
- Open doubaoya.com
- log in
- go to passcode center
- generate passcode(in the form
dyh_…)
Configure into environment variables (the script only recognizes this):
export DOUBAOYA_API_KEY="dyh_你的口令"
Iron rule: the passcode must never be printed, never written into a file, and never echoed back to the user. The script itself also never outputs the passcode. 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--pagecontrol)pageSize: integer, optional (default 20, controlled by--sizecontrol)
- Return envelope:
{ "success": true, "requestId": "...", "data": { "items": [ { "title": "...", "likeCount": 8800 } ] }, "error": null } - First check
success: istrueonly then readdata; otherwise readerror.code/error.message。
Error handling
When the script fails, print to stderr [error] CODE: message and exit with code 1. Common cases:
| HTTP | code | Meaning | Handling |
|---|---|---|---|
| 401 | MISSING_API_KEY / UNAUTHORIZED |
No passcode provided or passcode invalid | 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 quota |
| 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
cultural-tourism-xiaohongshu-feed/
├── SKILL.md # 本文件
└── scripts/
└── fetch_culture_feed.py # 零依赖脚本(urllib),调用 doubaoya.com