SuperAPI AI Directory

douyin-content-surge

Marketing & growth

View repository

Updated 10-16 08:41

About this skill

Douyin Like Surge Rankings · Daily + Weekly (All Explode Duck)

This duck helps you pull by categoryDouyin Like Surge Rankings— giving you both at oncedaily ranking (dailyRank)andweekly ranking (weeklyRank), specifically catching those works whose likes are surging and that have just taken off, so you can lock onto replicable hit seedlings at the earliest opportunity.

Data goes through doubaoya.com in one line, and authentication uses your own token (environment variable DOUBAOYA_API_KEY, in the form dyh_…)。


Get the key (token)

  1. Open doubaoya.com
  2. Log in
  3. Go to Token Center
  4. Generate Token(in the form dyh_…)
export DOUBAOYA_API_KEY="dyh_你的口令"

Iron rule: the token must never be printed, never written to a file, and never echoed back to the user. The script itself also never outputs the token. All requests are sent only to doubaoya.com。


Run Script

Zero dependencies, standard library is enough (Python 3).

# 默认:美食分类,昨天
python3 "$SKILL_PATH/scripts/fetch_content_surge.py"

# 指定分类 + 日期
python3 "$SKILL_PATH/scripts/fetch_content_surge.py" --type 美食 --start-time 2026-06-23
Parameter Description Default
--type Content category 美食
--start-time Ranking date YYYY-MM-DD Yesterday

The script prints the data from the success envelope to stdout as JSON.Run the script only once each time, and read the full stdout.


Workflow (3 steps)

  1. Set category + date: defaults to Food, Yesterday (the current day's data is usually not yet settled).
  2. Call the script to get data: the rankings are in data.items — it is an array, each item in the form { "rank": "dailyRank", "item": { ... } }, where rank isgroup name string(dailyRank daily ranking / weeklyRank weekly ranking),item contains title、category、share_url. In the same response,both the daily ranking and weekly ranking groups are in items in, just group by the rank field.
  3. Lay out two rankings + give insights: split rank == "dailyRank" / rank == "weeklyRank" into two groups by items , and lay out each table (item fields: title title, category category, link share_url), then after the tables add a sentence in this duck's tone—which topics are surging, what format they used to take off, and whether they can be migrated to your own account.
Rank Title Category Link
1 … … …

Defensive field reading (leave blank if missing).


API Contract

  • POST https://doubaoya.com/api/apis/douyin/douyin-content-surge/call
  • Auth header:Authorization: Bearer $DOUBAOYA_API_KEY
  • Request body:{ "type": "美食", "startTime": "2026-06-23" }
    • startTime please passa real, relatively recent date(the most recent date in the local region); do not fabricate or fill in a future date.
  • Response envelope:
    { "success": true, "requestId": "...", "data": { "items": [ { "rank": "dailyRank", "item": { "title": "...", "category": "...", "share_url": "..." } }, { "rank": "weeklyRank", "item": { "title": "...", "category": "...", "share_url": "..." } } ] }, "error": null }
    
    • data.items is a flat array; each item's rank is a group name string (dailyRank / weeklyRank), the actual content is in item .
  • First look at success: only if true should you read data; otherwise read error.code / error.message。
  • An empty result usually means there is no settlement data for that date window yet—just move --start-time back one day and run it again.

Error codes

When the script fails, it prints to stderr [error] CODE: message and exits with code 1.

HTTP code Meaning Handling
401 MISSING_API_KEY / UNAUTHORIZED No password provided or the password is invalid Check DOUBAOYA_API_KEY, go to the password center to regenerate it
400 VALIDATION_ERROR Invalid parameter Fix --type / --start-time 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

Directory structure

douyin-content-surge/
├── SKILL.md                      # 本文件
└── scripts/
    └── fetch_content_surge.py    # 零依赖脚本(urllib),调用 doubaoya.com

FAQ

Q: It says missing DOUBAOYA_API_KEY? A: First export DOUBAOYA_API_KEY="dyh_…"(go to doubaoya.com → log in → Password Center → generate password).

Q: Error 502 PROVIDER_FAILED? A: Temporary upstream jitter; the system has automatically refunded, just rerun it.