SuperAPI AI Directory

gzh-astock-top

General & other

View repository

Updated 10-16 09:52

About this skill

A-share Official Account Big V List (Doubao Ya)

This duck helps you figure out the leading Big Vs in the A-share official account space with one command—first by keyword, take A-share official accountsdiscoverthem, then pull each account'sdata profile(average reads, health score, etc.), and finally check what these Big Vsposted that day. The three steps are chained together in one script, outputting a merged JSON that you can directly use to build the list.

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


Use cases

Scenario How to use What you get
A-share Big V list Run once by default to see the list of leading A-share official accounts An A-share Big V list with data
Account profile benchmarking See each account's average reads / health score Find out who leads A-share content
Same-day activity tracking Specify --date to see what these Big Vs posted today See at a glance what A-share Big Vs posted that day
Niche keywords Switch --keyword 港股/基金 etc. Reuse the same orchestration to cover other finance tracks
Hot article add-on (optional) Add --with-hot to pull each account's recent hot articles See Big Vs' recent representative hit articles

Workflow (orchestration logic)

This skill is acombined orchestrationscript; a single script chains multiple APIs in order:

  1. Account discovery(search accounts): use --keyword(default A股) to search A-share official accounts and take the top N (default 30) account names.If this step fails = no accounts → exit 1 directly.
  2. Account profile(account diagnosis): feed this batch of account names to the account analysis API to get average reads (avgReadCount), health score (healthScore), and other data.
  3. Same-day posts: by --date(default yesterday) check what this batch of accounts posted that day.

    Tested (2026-08-13): that day's posts are only archived onthe next day, so querying with today's date always returns 0 accounts—therefore the default is yesterday; don't change it back to today.

  4. (Optional) Account hot articles: when adding --with-hot , pull recent hot articles for each account one by one.

If any subsequent single step (2/3/4) fails,do not interrupt the whole run, collect that step's error into the result's errors field, and return the rest of the data as usual.

Call the script

# 默认:关键词 A股,日期昨天(当天发文次日才归档),前 30 个账号
python3 "$SKILL_PATH/scripts/fetch_astock_top.py"

# 指定日期 / 关键词 / 账号数量
python3 "$SKILL_PATH/scripts/fetch_astock_top.py" --keyword A股 --top 30 \
  --date "$(date -d '-1 day' +%F 2>/dev/null || date -v-1d +%F)"

# 额外拉各账号近期爆文(多花若干次调用)
python3 "$SKILL_PATH/scripts/fetch_astock_top.py" --with-hot

The script prints the merged JSON to stdout.Run the script only once per query, read the full stdout directly, don't use head/tail preview, and don't call repeatedly with the same parameters.

Render the leaderboard + one insight

Pull data from the merged JSON to lay out a Markdown leaderboard: account name (accountName), average reads (analysis in avgReadCount), health score (healthScore), that day's post titles (dailyPublish in title, rendered asclickable links). Read fields defensively; leave blank if missing, don't make things up. End with an A-share content insight in this duck's voice: which big V is pushing volume, and whether there's a resonant topic that day. Don't pile on boilerplate.

Merged JSON shape

{
  "keyword": "A股",
  "date": "YYYY-MM-DD",
  "accounts": ["大V账号1", "大V账号2"],
  "analysis": { /* 账号诊断 data */ },
  "dailyPublish": { /* 当日发文 data */ },
  "hotArticles": { /* 仅 --with-hot 时存在,按账号名归集 */ },
  "errors": { /* 仅有子步失败时存在,按步骤名归集 */ }
}

Get the key (secret key)

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

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

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。


Interfaces and envelope

This skill orchestrates the following interfaces (all POST, auth header Authorization: Bearer $DOUBAOYA_API_KEY):

Step Interface Request body
1 Account discovery https://doubaoya.com/api/apis/gongzhonghao/gongzhonghao-search-user/call { "keyword": "A股", "page": 1 }
2 Account profile https://doubaoya.com/api/apis/gongzhonghao/gongzhonghao-account-analyzer/call { "accountNames": ["账号1", "账号2"] }
3 That day's posts https://doubaoya.com/api/apis/gongzhonghao/gongzhonghao-daily-publish/call { "date": "YYYY-MM-DD", "accountNames": ["账号1"] }(posts from the current day are only archived the next day, use yesterday)
4 Account viral posts (optional --with-hot) https://doubaoya.com/api/apis/gongzhonghao/hot-article/call { "keyword": "账号名", "startDate": "...", "endDate": "..." }
  • Every sub-call goes through the sameenvelope: first check success===true before reading data, otherwise read error.code / error.message。
  • Step 1 is the foundation of the whole round: if the account can't be obtained, end with exit code 1; failures in steps 2/3/4 are collected into errors, without affecting the other results.
  • Return envelope:
    { "success": true, "requestId": "...", "data": { ... }, "error": null }
    

Error handling

When the script fails (step 1 fails or the key is missing), it prints to stderr [error] CODE: message and ends with exit code 1. If a sub-step fails, it goes into the errors field and does not exit. Common cases:

HTTP code Meaning Handling
401 MISSING_API_KEY / UNAUTHORIZED No key provided or invalid key Check DOUBAOYA_API_KEY, go to the Key Center to regenerate
400 VALIDATION_ERROR Invalid parameters (e.g. wrong date format) Fix the keyword/date and retry
402 INSUFFICIENT_CREDITS Insufficient quota Go to doubaoya.com to top up/renew quota
502 PROVIDER_FAILED Temporary upstream failure (already automatically refunded) Safe to retry

502 PROVIDER_FAILED is automatically refunded, retrying is safe and won't double-charge.


Directory structure

gzh-astock-top/
├── SKILL.md                      # 本文件
└── scripts/
    └── fetch_astock_top.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, it does not affect the result of this call, and no retry or behavior change is needed.