SuperAPI AI Directory

gzh-astock-top

Data & analytics

View repository

Updated 10-16 01:28

About this skill

A-share public account influencers

1. Overview

A-share public account influencer tool: enter a date to obtain the account data and latest article data of 30 public account influencers in the A-share field. Helps users quickly grasp the operational performance and latest content trends of leading public accounts in the A-share field.

API requests all carry the A股公众号大V-GitHub identifier. Use the environment variable REDFOX_API_KEY for authentication.


2. Features

  • Fixed account pool: covers 19 individual influencers + 30 official media/institutions, a total of 49 leading A-share public accounts
  • Account data: obtain core metrics such as each account's average reads, Red Fox Index, account description, etc.
  • Articles of the day: obtain the latest article published by each account on the specified date, including interactive data such as title, link, reads, likes, comments, etc.
  • Dual-category mode: official media/institutions + individual influencers displayed separately, up to 30 each
  • AI summary: automatically generate a one-sentence content summary based on the article title
  • Title jump: article titles are rendered as hyperlinks, click to jump to the original text
  • Subscription push: subscribe to accounts by serial number, query only the subscription list daily, reducing API calls

3. Authentication configuration

Get API Key

Please go to Red Fox Hub to get the API Key.

Configuration method

Method Command
Environment variable (recommended) export REDFOX_API_KEY=ak_你的密钥
Command-line parameter --api-key ak_你的密钥
Configuration file echo '{"api_key":"ak_你的密钥"}' > ~/.qoder/apis/redfox.json

4. Usage guide

Basic usage

Step 1 — Confirm the date: extract the query date from the user input. If no date is specified, default to today.

Step 2 — Call the script:

python3 "$SKILL_PATH/scripts/fetch_astock_accounts.py" --date <日期> --dual-category
  • Specified date:--date 2026-06-15
  • Default today:python3 "$SKILL_PATH/scripts/fetch_astock_accounts.py" --dual-category
  • Only query individual influencers (no classification):python3 "$SKILL_PATH/scripts/fetch_astock_accounts.py" --date 2026-06-15

⚠️ Anti-duplicate-call rule (mandatory):

  • ❌ Forbiddento first use head/tail and other methods to "trial run" the script
  • ❌ Forbiddento call the script multiple times with the same parameters in the same query
  • ✅ Execute the script command only once per query, and directly read the complete output

Step 3 — View results: the script returns structured JSON data; output the results according to the display strategy specified in this guide.


Data display strategy

⚠️ Mandatory output rules:

  • ✅ Must output strictly according to the format specified in this step
  • ❌ It is forbidden to add any analysis or interpretation before the output
  • ❌ It is forbidden to give suggestions or plans on your own initiative
  • ✅ Directly read the JSON data returned by the script and output according to the corresponding strategy

Preface (must be told to the user before displaying data)

  • Data description: account data comes from public account information collected by the Red Fox API; article data is the account's data onSpecified datePublished works (filtered directly by the server). Interaction data is as of ingestion time, not real-time data.
  • Sorting description: Accounts are sorted in descending order by average read count

Default query behavior

  • When the user does not specify a date,default to querying the current day(e.g., 2026-06-17)
  • By default, use --dual-category --count 120 mode, outputting both official media and top influencers
  • If the user only says "check A-share top influencers" or "check today's", directly run the dual-category query

Sufficient data (accounts ≥ 10)

Display content:

  1. Time range description: Inform the user of the queried date
  2. Account and article data table (including AI summary column)

Markdown table format:

📅 Query date: 2026-06-17

【Official media/institutions】X accounts

# Official account Average reads Red Fox Index Latest article AI summary Reads Likes Published
1 Financial Times 3.2w 937.1 Major meeting coming tomorrow Focusing on the upcoming important economic meeting to anticipate policy direction 8.3w 109 06-16

【Individual top influencers】X accounts

# Official account Average reads Red Fox Index Latest article AI summary Reads Likes Published
1 Da Hong Hao Yun Ge 7.1w 862.0 Too strong!!! A-shares made a strong breakout; the blogger is extremely optimistic 7.2w 1939 06-15

Format specification:

  • The first column is the serial number, incrementing from 1
  • When average reads ≥ 10000, display as x.xw format
  • Latest article title: Must be rendered as a hyperlink,[标题](workUrl). Titles longer than 15 characters are truncated and appended with .... When there is no workUrl, display plain text only
  • AI summary: Based on the article title, summarize the article's core content/viewpoint in 1 sentence (≤30 characters), inferred and generated by AI at display time, not dependent on an API
  • Publish time shows only month-day

Insufficient data (accounts < 10)

Display content:

  1. Time range description
  2. Prompt message: "💡 Only X A-share sector top influencer accounts were found on the current date; the data may be incomplete"
  3. Normal data table (including AI summary column)

No data (accounts = 0)

🔍 抱歉,当前日期未找到A股领域的公众号大V数据,请尝试更换日期或稍后重试。

Output rules:

  • ✅ Must directly output the above format content
  • ❌ Adding extra analysis or suggestions is prohibited
  • ❌ Explaining why there is no data is prohibited

5. Parameter description

Parameter Description Default value
--date Query date YYYY-MM-DD Today
--api-key Specify API Key —
--dual-category Category mode: official media/institutions + individual top influencers displayed separately —

5.5 Subscription management feature

Feature description

Supports subscribing to official media or influencer accounts by number from the rankings. Each time the subscription push is invoked, it only queries the latest articles of subscribed accounts, reducing unnecessary API calls.

Data update time: Redfox platform daily 07:00 updates yesterday's viral article data. It is recommended to run the push query after 07:30 .

Workflow

Step 1: 运行榜单查询(--dual-category)→ 展示官媒/大V榜单(含序号)
Step 2: 用户输入序号 → 调用 manage_subscriptions.py 写入订阅
Step 3: 每日调用 fetch_subscribed_updates.py → 查询订阅账号最新文章

Step 1: Display rankings (AI-triggered)

When the user says "view rankings and subscribe":

python3 "$SKILL_PATH/scripts/fetch_astock_accounts.py" --date <日期> --dual-category

This command also caches the results to cache/last_dual_result.json, for use when subscribing.

Step 2: Add subscriptions (AI invokes based on user numbers)

Subscribe to numbers 1, 3, 5 from the official media rankings:

python3 "$SKILL_PATH/scripts/manage_subscriptions.py" --action add --category official --indexes 1,3,5 --from-cache

Subscribe to numbers 2, 4 from the influencer rankings:

python3 "$SKILL_PATH/scripts/manage_subscriptions.py" --action add --category kol --indexes 2,4 --from-cache

View all current subscriptions:

python3 "$SKILL_PATH/scripts/manage_subscriptions.py" --action list

Delete subscription (by account name):

python3 "$SKILL_PATH/scripts/manage_subscriptions.py" --action remove --names 央视财经,金融时报

Clear subscriptions of a certain type:

python3 "$SKILL_PATH/scripts/manage_subscriptions.py" --action clear --category official

Step 3: Daily push (AI-triggered)

When the user says "check subscribed account updates" or "push today's updates":

# 全部订阅
python3 "$SKILL_PATH/scripts/fetch_subscribed_updates.py"

# 只查官媒
python3 "$SKILL_PATH/scripts/fetch_subscribed_updates.py" --category official

# 只查大V
python3 "$SKILL_PATH/scripts/fetch_subscribed_updates.py" --category kol

Subscription push output display specification

The script returns JSON, and the AI displays it in the following format:

Data description: Latest article data of subscribed accounts, published within the last 7 days. Engagement data is as of the database entry time, not real-time.

📅 Date: 2026-06-17 · Data update time: daily 07:00

[Official media/institution subscriptions] X accounts

# Official Account Latest article AI summary Reads Likes Published
1 CCTV Finance Good news incoming! 9 departments make major announcement Nine departments jointly issue major favorable policy 8.3w 464 06-16

[Individual influencer subscriptions] X accounts

(same format)

Note: Article titles must be rendered as hyperlinks [标题](workUrl); AI summaries are generated by the AI based on title inference; when there is no article data, display -。

Directory structure (updated)

gzh-astock-top/
├── SKILL.md
├── subscriptions.json          # 订阅配置(官媒/大V账号ID列表)
├── cache/
│   └── last_dual_result.json   # 最近一次双分类榜单缓存
├── scripts/
│   ├── fetch_astock_accounts.py      # 榜单查询(--dual-category 时自动缓存)
│   ├── manage_subscriptions.py       # 订阅管理(添加/删除/查看)
│   └── fetch_subscribed_updates.py   # 订阅推送(查询已订阅账号最新文章)
└── references/
    └── api_guide.md

6. Project architecture

Directory structure

gzh-astock-top/
├── SKILL.md                          # Skill 定义与使用文档(本文件)
├── scripts/
│   └── fetch_astock_accounts.py      # 核心脚本:获取A股大V账号及文章数据
└── references/
    └── api_guide.md                  # API接口说明文档

Tech stack

Component Technology Description
Runtime environment Python 3.13+ Pure standard library, no third-party dependencies
Standard library urllib.request, json, os, sys, argparse, datetime HTTP requests, JSON processing, parameter parsing, date calculation
Data interface Redfox API (Redfox) — dailyPublish interface Authenticated via REDFOX_API_KEY,1 callretrieves all data
Output format JSON (stdout) For AI to parse and display as a Markdown table

Core module description

Module Path Function
Data retrieval script scripts/fetch_astock_accounts.py Calls the dailyPublish interface, retrieving in 1 call the day's article data for 49 fixed accounts
API reference documentation references/api_guide.md Detailed description of interface address, parameters, and return fields

Resource index

  • Core script:scripts/fetch_astock_accounts.py — A single call to the dailyPublish interface retrieves A-share influencer data. Parameters: --date (optional), --dual-category (optional), --api-key (optional)
  • Reference documentation:references/api_guide.md — When to read: when you need to understand the API data format and field descriptions

7. Frequently Asked Questions

Q: Why do some accounts have no articles for the day? A: The dailyPublish API filters by the specified date. If an account did not publish an article that day, nothing is returned, so the number of accounts in the results varies by date.

Q: What should I do if the number of accounts is insufficient? A: Among the fixed 49 accounts, only accounts that published an article that day appear in the results. If the number is small, it may be due to a low publishing frequency that day, which is normal.

Q: How often is the data updated? A: The Red Fox platform updates the previous day's data daily at 07:00 ; it is recommended to query yesterday's daily report after 07:30.

Q: What should I do if the script reports an error? A: Common causes: (1) REDFOX_API_KEY is not configured or has expired; (2) Python version < 3.13; (3) network issues. Please troubleshoot one by one.