SuperAPI AI Directory

bilibili-keyword-accounts

General & other

View repository

Updated 10-16 08:43

About this skill

Bilibili keyword account search (Dubaoya)

Quack! This duck helps you search Bilibili accounts by keyword—quickly discover UP hosts in the same niche, do account benchmarking, and filter potential collaborators. With one keyword, a terminal account table is laid out (follower count, level, and bio at a glance), sortable by comprehensive or follower count, with pagination support.

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


Use cases

Scenario How to use What you get
Discover UP hosts in the same niche Search 数码 to see which accounts are in this field Quickly lock onto UP hosts in the target field
Account benchmarking Search 美食 and sort by follower count to see top accounts Understand the fundamentals of top accounts
Filter collaboration KOLs Search 美妆 and look at follower counts to assess collaboration value Expand collaboration resources
Understand the field ecosystem Search 编程 to see the distribution of accounts in the niche Grasp the competitive landscape

Workflow (4 steps)

1. Understand the intent, extract keywords and sorting

Extract from the user's description thecore keyword. 2–6 characters is best (e.g. 数码、美食、编程). Search only one keyword at a time.

Identify sorting intent (use the default if the user does not mention it):

  • Sorting method --order: default "totalrank"(comprehensive sort);"fans" = sort by follower count (use when the user mentions "most followers" or "top accounts").
  • Page number --page: default 1。

2. Call the search script

python3 "$SKILL_PATH/scripts/search_bilibili_user.py" "数码"

Sort by follower count / paginate (both optional):

python3 "$SKILL_PATH/scripts/search_bilibili_user.py" "美食" --order fans --page 2

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, do not use head/tail to preview, and do not call repeatedly for the same keyword.

3. Render the account table

From data.items(account array), take the fields and lay them out as a Markdown table in the format below. Read fieldsdefensively——uname(UP host) / uid / fansNum(follower count) / level(level) / sign(bio) may be missing or named slightly differently; if missing, leave blank or write "—", and do not let one piece of data break the whole table.

UP host UID Follower count Level Bio
Some UP host 12345678 105.2w Lv6 Digital reviews / good product sharing

Number formatting:< 10000 use the raw number,≥ 10000 use x.xw. If the bio is too long (e.g. over 40 characters), it may be truncated with ...; if empty, show —。

4. Add a benchmarking insight

After the table, add one sentence in this duck's voiceInsight: among these accounts, who is at the top, which mid-tier ones are worth benchmarking against, and which types of accounts still have gaps. Keep it short and useful, don't pile on filler.


Get your key (token)

  1. Open doubaoya.com
  2. Log in
  3. Go to Token Center
  4. Generate token(in the form dyh_…)

Configure it as an environment variable (the script only recognizes this one):

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, do not take the token to any other domain.


API and envelope

  • POST https://doubaoya.com/api/apis/bilibili/search-user/call
  • Auth header:Authorization: Bearer $DOUBAOYA_API_KEY
  • Request body:{ "keyword": "数码", "order": "totalrank", "page": 1 }
    • keyword: string, required
    • order: string, optional (default "totalrank" = comprehensive sort;"fans" = follower count sort)
    • page: integer, optional (default 1)
  • Return envelope:
    {
      "success": true,
      "requestId": "...",
      "data": { "items": [ { "uid": 0, "uname": "...", "fansNum": 0, "level": 0, "sign": "..." } ] },
      "error": null
    }
    
  • Check success: if it is true , only then read data; otherwise read error.code / error.message。
  • ⚠️ Field defense: account fields may be missing or named slightly differently; when reading, always "if you can't get it, use the default value," leave missing fields empty, don't error out.

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 Missing token or invalid token Check DOUBAOYA_API_KEY, go to the Token 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
404 ENDPOINT_NOT_FOUND Incorrect API path Restore the default endpoint path
502 PROVIDER_FAILED Temporary upstream failure (Refunded automatically) Safe to retry
— NETWORK_ERROR Cannot connect to doubaoya.com Check your network and retry

502 PROVIDER_FAILED will be refunded automatically; retrying is safe and will not double-charge.


Directory structure

bilibili-keyword-accounts/
├── SKILL.md                       # 本文件
└── scripts/
    └── search_bilibili_user.py    # 零依赖搜索脚本(urllib),调用 doubaoya.com