Quack! This duck helps you search TikTok (overseas Douyin) creator accounts by keyword — find benchmarks in the same niche, screen cross-border influencers, and study top creators. With one keyword, a terminal account table is laid out (from highest to lowest follower countsorted), with nickname, follower count, and bio clear at a glance. If nothing is found, this duck will recommend a few similar keywords so you do not come back empty-handed.
Data goes through doubaoya.com in one line, and authentication uses your own token (environment variable
DOUBAOYA_API_KEY, in the formdyh_…)。
Use cases
| Scenario | How to use | What you get |
|---|---|---|
| Find benchmarks in the same niche | Search fitness to find overseas fitness creators |
Study the content direction of benchmark accounts |
| Understand the competitive landscape | Search 美妆 to see which top accounts exist |
Understand the top distribution of a category |
| Screen partner influencers | Search 穿搭 and evaluate accounts by follower count |
Assist cooperation/signing decisions |
| Cross-border influencer collection | Search 美食 to find creators in niche markets |
Build a first-hand pool of candidates for sales/promotion |
Workflow (4 steps)
1. Understand the intent and extract keywords
Extract thecore keywordfrom the user's description (Chinese or English is fine, such as fitness、美妆、穿搭). Search only one keyword at a time. Keywords that are too long or too specific are easy to return no results for.
Identify page-number intent (use the default if the user does not mention it):
- Page
--page: default1. Increment when the user says "next page" or "page 2".
2. Call the search script
python3 "$SKILL_PATH/scripts/search_tiktok_user.py" "fitness"
Pagination (optional):
python3 "$SKILL_PATH/scripts/search_tiktok_user.py" "美妆" --page 2
The script only sends keyword and page,The server internally maps page to cursor, so you do not need to manage the cursor token manually. The script prints 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 preview, and do not call repeatedly for the same keyword.
3. Render the account table
From data.items(account array), take the fields,sort from highest to lowest follower count, and lay them out as a Markdown table. Read fieldsdefensively——uniqueId(account) / nickname(nickname) / fans(follower count) / signature(bio) may be missing or named slightly differently; if missing, leave blank or write "—", and do not let one piece of data crash the whole table.
| Account | Nickname | Follower count | Bio |
|---|---|---|---|
| @example_id | Some creator | 305.2w | Fitness Content Creator |
Number formatting:
< 10000uses the raw number,≥ 10000usesx.xw. If the nickname is too long (over 20 characters), truncate and append...; if the bio is too long (over 40 characters), truncate and append..., if empty show—。
Pagination info:data.hasMore(whether there is more) tells you whether you can go to the next page;data.rid(cursor token) is maintained by the server and does not need to be shown to the user.hasMore is true , prompt "Reply 'next page' to continue reading".
4. When nothing is found, recommend similar keywords
If data.items is empty: apologize and explain that the term is niche or there is no data on the current page, thenproactively give 10 similar keywords(2-6 characters, covering different dimensions) so the user can try again from another angle. Do not fabricate data, and do not ask the user about their real purpose.
Note: This APIhas no date/publish time parameter, account search does not involve time filtering, so no time-based handling is needed.
Get the key (passcode)
- Open doubaoya.com
- Log in
- Go to Passcode Center
- Generate passcode(in the form
dyh_…)
Configure it in the environment variable (the script only recognizes this):
export DOUBAOYA_API_KEY="dyh_你的口令"
Iron rule: The passcode must never be printed, never written to 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, do not take the passcode to any other domain.
Interface and Envelope
POST https://doubaoya.com/api/apis/tiktok/search-user/call- Auth header:
Authorization: Bearer $DOUBAOYA_API_KEY - Request body:
{ "keyword": "fitness", "page": 1 }keyword: string, requiredpage: integer, optional (default 1; the server maps it internally to a cursor, no need to manually pass a cursor)
- Return envelope:
{ "success": true, "requestId": "...", "data": { "items": [ { "uniqueId": "...", "nickname": "...", "fans": 0, "signature": "..." } ], "hasMore": true, "rid": "..." }, "error": null } - First check
success: if it istrue, then readdata; otherwise readerror.code/error.message。 data.hasMore: whether there is more;data.rid: cursor token (maintained by the server).- ⚠️ Field defense: Account fields may be missing or named slightly differently. When reading, always "if it cannot be retrieved, give the default value"; leave missing fields empty, do not raise errors.
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 generate a new one |
| 400 | VALIDATION_ERROR |
Invalid parameter (e.g. keyword is empty) | Correct the keyword and retry |
| 402 | INSUFFICIENT_CREDITS |
Insufficient quota | Go to doubaoya.com to top up/renew quota |
| 404 | ENDPOINT_NOT_FOUND |
Incorrect interface path | Restore the default endpoint path |
| 502 | PROVIDER_FAILED |
Temporary upstream failure (automatically refunded) | safe to retry |
| — | NETWORK_ERROR |
Cannot connect to doubaoya.com | Check the network and retry |
502 PROVIDER_FAILEDwill automatically refund, retrying is safe and will not result in duplicate charges.
Directory structure
tiktok-account-search/
├── SKILL.md # 本文件
└── scripts/
└── search_tiktok_user.py # 零依赖搜索脚本(urllib),调用 doubaoya.com