This duck specializes inshort-video data gatheringThis one: drop in one keyword and scoop up a batch of Douyin viral works in that niche, laid out directly in the terminal as a clickable table — for you to dotopic insightwith, not for scrolling a single post. For chasing hotspots, scraping benchmarks, and stockpiling script material, first use this duck to sweep the "surface," then go pick the "points" worth breaking down.
Data goes through doubaoya.com one line, authentication uses your own key (environment variable
DOUBAOYA_API_KEY, in the formdyh_…)。Want to search in real time by popularity + latest publishedcomprehensive real-time search, use
douyin-realtime-search; want to scrape a certain work'scomment-section sentiment, usedouyin-comment. This duck is a "keyword → batch of viral works" surface-sweeping tool, and also supports narrowing by publish date range.
Applicable scenarios
| Scenario | How to use | What you get |
|---|---|---|
| Short-video topic data gathering | Search 减脂餐 to scoop up a batch of viral works in this niche |
See at a glance what angles everyone is shooting right now |
| Benchmark account inventory | Search 职场干货 to scrape benchmark creators' viral works in bulk |
Find out who in the same niche is producing viral hits and which angles they're grabbing |
| Industry hotspot scan | Search AI 工具 to see the viral trends in this niche |
Quickly judge where traffic is concentrated right now |
| Script material collection | Search 开箱测评 to gather a batch of reference-worthy viral angles |
Stockpile first-hand material for your next script |
| Data gathering for a specified period | Search 618 and narrow to --start-date/--end-date |
Only see viral works within a certain campaign period |
Workflow (4 steps)
1. Extract keywords
Pull out thecore keywordfrom the user's description — keep it concise, 2–6 characters is best (e.g. 减脂餐、职场干货、开箱测评). The shorter the word, the broader and more hits; too long and too narrow easily sweeps up nothing. Search only one keyword at a time. If the user specifies a time window, then add --start-date / --end-date(YYYY-MM-DD)。
2. Call the search script
python3 "$SKILL_PATH/scripts/search_douyin.py" "减脂餐"
To see only viral works from a certain period, add a date range:
python3 "$SKILL_PATH/scripts/search_douyin.py" "618" --start-date 2026-06-01 --end-date 2026-06-18
The script prints the data from the success envelope as JSON to stdout.Run the script only once per keyword, read the full stdout directly, don't use head/tail preview, and don't call repeatedly for the same keyword.
3. Lay out the works table
From data.items(works array), take the fields and lay them out as Markdown per the table below. Dodefensive reading——title(title) / authorName(creator) / likeCount(likes) / workUrl(work link) / publishTime(publish time) may be missing; if missing, leave it blank and don't throw an error. Render the title asclickable link(pointing to the original work URL).
| Title | Creator | Likes | Publish time |
|---|---|---|---|
| Example work title | Some Creator | 12.3w | 2026-06-20 |
If you want to rank this batch of works, you can add a column "Popularity Index / Composite Index" (keyword relevance + like popularity + freshness) sorted descending, with ties broken by higher likes first — this is presentation-layer processing and does not change the API call.
4. Give a one-sentence topic insight
After the table, add one sentence in this duck's voiceTopic insight: what angle this batch of works is competing for, which niche no one has fully covered yet, and whether it's worth following. Keep it short and useful, don't pile on clichés, and don't ask the user back "what is your real purpose".
Get the key (secret key)
- Open doubaoya.com
- Log in
- Go to Key Center
- Generate key(in the form
dyh_…)
Put it into the environment variable (the script only recognizes this):
export DOUBAOYA_API_KEY="dyh_你的密钥"
Iron rule: never print the key, never write it to a file, never echo it back to the user. The script itself also never outputs the key. All requests are sent only to doubaoya.com, don't take the key to any other domain.
API and envelope
POST https://doubaoya.com/api/apis/douyin/search-work/call- Auth header:
Authorization: Bearer $DOUBAOYA_API_KEY - Request body:
{ "keyword": "减脂餐", "startDate": "2026-06-01", "endDate": "2026-06-18" }keyword: string, requiredstartDate: stringYYYY-MM-DD, optional (if not passed, no limit)endDate: stringYYYY-MM-DD, optional (if not passed, no limit)
- Return envelope:
{ "success": true, "requestId": "...", "data": { "items": [ { "title": "...", "authorName": "...", "likeCount": 0, "workUrl": "...", "publishTime": "..." } ] }, "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 key provided or invalid key | Check DOUBAOYA_API_KEY, go to Key Center to regenerate |
| 400 | VALIDATION_ERROR |
Invalid parameters (e.g. empty keyword, wrong date format) | Fix 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
douyin-search/
├── SKILL.md # 本文件
└── scripts/
└── search_douyin.py # 零依赖搜索脚本(urllib),调用 doubaoya.com
About the notice field in the response
After calling the doubaoya API corresponding to this skill, if the returned JSON has a top-level notice field, please relay this sentence to the user verbatim — this is a notice that this skill has an update, does not affect the result of this call, and does not require retrying or changing behavior.