SuperAPI AI Directory

douyin-account-works

Marketing & growth

View repository

Updated 10-16 08:42

About this skill

Douyin account profile lookup

One line from this duck: throw me the secUid of a Douyin account, and I'll first get you a clear picture of this account's "family assets"—nickname, followers, following, all in one pot. As for which specific work performs well, we'll break that down separately.


What this duck can do

This is the "Douyin Account Profile" skill in the Doubaoya community library. What it does is theaccount profilelayer:

  • Get the account's secUidand call the official Doubaoya API;
  • Returnaccount profile: nickname, follower count, following count.

Suitable for brands, MCNs, and content operators in contracting / competitor monitoring as thefirst step—first look at the account's foundation, then decide whether to dig deeper.

What itdoes notdo (important)

This API is profile-only (account profile level): it returns the account's profile fields,does not return a list of individual works, andwill notspit out individual works' likes / comments / links one by one.

So pleasedo notpromise to "scrape a list of 50 works". If the user wants to break downa specific work(completion rate, engagement, copy structure, etc.), have them give you the link to that work and switch tothe content parsing skill tool/parse-content-detail to parse it item by item. Division of labor between the two:

What you want Which skill to use
How many followers the account has, who it follows (account foundation) This skill douyin-account-works
Detailed data for a specific work (give a link and break it down item by item) Content parsing skill tool/parse-content-detail

Three steps to get started

Step one: get the key (token)

Calling the API requires a Doubaoya token:

  1. Open doubaoya.com
  2. Log in
  3. Go to Token Center
  4. Click Generate Token, and get a string in the form dyh_xxxxxxxx token

Set it as an environment variable (This duck only reads and does not tell; it will never print the token):

# macOS / Linux
export DOUBAOYA_API_KEY=你的口令      # 形如 dyh_xxxxxxxx

# Windows PowerShell
$env:DOUBAOYA_API_KEY="你的口令"

Step two: get the secUid

This APIonly recognizes secUid(the account's stable unique identifier, in the form MS4wLjABAAAA...)。

How to get secUid: open the target account's Douyin homepage (web version / shared link), and in the URL /user/ the long string after it is the secUid. For example https://www.douyin.com/user/MS4wLjABAAAA... → take MS4wLjABAAAA...。

This skill does not do "fuzzy nickname search", anddoes not acceptfabricated secUid. Please provide areal secUid (in the form MS4wLjABAAAA…); if you only have the nickname or Douyin ID, first get the real secUid, otherwise the API will return a validation/no-data error.Never make up an id out of thin air to "give it a try".

Step 3: Run the script

python3 scripts/query_account.py "MS4wLjABAAAA..."

The script has zero dependencies (only the Python 3 standard library urllib), reads the token from an environment variable, and on success prints the JSON of data .


API contract

  • Host:https://doubaoya.com

  • Endpoint:POST https://doubaoya.com/api/apis/douyin/query-account/call

  • Authentication: request header Authorization: Bearer $DOUBAOYA_API_KEY

  • Request body(exact parameters, only secUid):

    { "secUid": "MS4wLjABAAAA..." }
    
  • Response envelope:

    {
      "success": true,
      "requestId": "req_xxx",
      "data": {
        "profile": {
          "nickname": "本鸭厨房",
          "followerCount": 1234567,
          "followingCount": 42
        }
      },
      "error": null
    }
    

    First check success: if it is true , then take data; otherwise read error.code / error.message. When parsing data.profile , pleasedefensivelyretrieve values—the core fields are nickname / followerCount / followingCount; if missing, display "—", and don't let the flow crash.


Explain the results to the user (account overview template)

After successfully obtaining data.profile , organize the reply as follows:

📋 抖音账号概况 · {nickname}

• 粉丝数:{followerCount}
• 关注数:{followingCount}

🦆 这就是这只账号的底子。
(本技能给的是账号档案;想逐条拆解某条作品,把作品链接发我,
  我用内容解析技能 tool/parse-content-detail 单独给你拆。)

Number presentation suggestions: for ≥100 million use "亿", for ≥10 thousand use "w" (e.g. 123.5w), for <10 thousand use thousands separators (e.g. 9,860).

⚠️ Never fabricate:data.profile fields not present in it (such as individual works, interaction details, total work count, some kind of "index")—do not generate any of them out of thin air. If the API doesn't provide it, truthfully say "this API does not provide it" and guide the user to use the content parsing skill.


How to read errors

The script prints errors to stderr, in the form [error] CODE: message, and exits with non-zero. Common codes:

HTTP code Meaning / Handling
401 MISSING_API_KEY / UNAUTHORIZED No token set or invalid token. Go to doubaoya.com → Token Center to regenerate it, and reset DOUBAOYA_API_KEY。
400 VALIDATION_ERROR There is a problem with the input parameters, most likely secUid is missing / incorrectly formatted. Check whether a nickname or Douyin ID was passed instead.
402 INSUFFICIENT_CREDITS Insufficient quota. Go to doubaoya.com to top up and retry.
502 PROVIDER_FAILED Temporary upstream jitter.Automatically refunded, safe to retry。

When no token is set locally in the script, it will directly report "environment variable DOUBAOYA_API_KEY not set" and provide guidance for obtaining a token,will notmake a request.


Project structure

douyin-account-works/
├── scripts/
│   └── query_account.py   # 零依赖脚本:POST {secUid},按信封解析后打印 data
└── SKILL.md               # 本说明(工作流 / 契约 / 模板 / 报错)

Security and boundaries (this duck's rules)

  • Never print the token: the script only puts the token in the request header; no output / log contains it.
  • Never fabricate data: only present fields actually returned by the API; if a field is missing, truthfully say it is missing.
  • Don't overstep: this skill only does account profiles. For individual work parsing → content parsing skill tool/parse-content-detail。
  • Only connect to doubaoya.com: this skill only communicates with doubaoya.com , and does not connect to any other data source.