This duck helps you search WeChat Official Account articles by keyword—track industry hot topics, dig into competitors' viral posts, and gather topic materials. With one keyword, the terminal directly lays out a clickable article table, plus a topic insight.
Data goes through doubaoya.com one line, authentication uses your own key (environment variable
DOUBAOYA_API_KEY, in the formdyh_…)。
Applicable scenarios
| Scenario | How to use | What you get |
|---|---|---|
| Industry hot topic tracking | Search AI 工具 to see what WeChat Official Accounts in this field have been writing about recently |
Grasp current hot topic angles at a glance |
| Competitor content analysis | Search 大模型 to see how accounts in the same track choose topics and craft titles |
Understand opponents' content strategies |
| Topic inspiration collection | Search 职场沟通 to find viral angles and writing entry points |
Find direction for your next article |
| Material collection | Search 小红书运营 to collect reference articles in bulk |
Gather first-hand writing materials |
| Trend research | Search 2026 经济 to see public opinion trends |
Lay the groundwork for research/reports |
Workflow (4 steps)
1. Understand the intent and extract keywords
Extract from the user's description thecore keyword. The keyword should beconcise—2~6 characters is best (e.g., AI 工具、大模型、职场). The shorter the word, the broader it is and the more hits; too long and too specific makes it easy to return nothing. Search only one keyword at a time.
2. Call the search script
python3 "$SKILL_PATH/scripts/search_gzh.py" "AI 工具"
Pagination (optional):
python3 "$SKILL_PATH/scripts/search_gzh.py" "AI 工具" --page 2
The script prints the 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 to preview or repeatedly call for the same keyword.
3. Render the article table
From data.items(article array), take the fields and lay them out as a Markdown table in the format below. Read fields defensively—title / accountName(author/WeChat Official Account) / publishTime(publish time) may be missing; if missing, leave blank, do not error. Render the title as aclickable link(pointing to the article's original URL).
| Title | Author | Publish time |
|---|---|---|
| Example article title | Some WeChat Official Account | 2026-06-20 |
When you want a more detailed "three-dimensional scoring" sort (keyword relevance + reading popularity + freshness), you can add a total score column on top of the table and sort descending, with higher read counts prioritized for ties—this is processing at the display layer and does not affect API calls.
4. Give one topic insight
After the table, add one sentence in this duck's tone:topic insight: What angle are these articles competing for, which entry point hasn't been written thoroughly yet, and is it worth following. Be brief and useful, don't pile on clichés, and don't ask the user "what is your real purpose".
Get the key (secret key)
- Open doubaoya.com
- Log in
- Go to Key Center
- Generate key(in the form
dyh_…)
Configure it into an environment variable (the script only recognizes this one):
export DOUBAOYA_API_KEY="dyh_你的密钥"
Iron rule: never print the key, never write it into 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, do not take the key to any other domain.
Interface and envelope
POST https://doubaoya.com/api/apis/gongzhonghao/search-article/call- Auth header:
Authorization: Bearer $DOUBAOYA_API_KEY - Request body:
{ "keyword": "AI 工具", "page": 1 }keyword: string, requiredpage: integer, optional (default 1)- No other fields such as date / source / count
- Return envelope:
{ "success": true, "requestId": "...", "data": { "items": [ { "title": "...", "accountName": "...", "publishTime": "..." } ] }, "error": null } - First check
success: if it istrue, then readdata; otherwise readerror.code/error.message。
Error handling
When the script fails, it prints to stderr [error] CODE: message and exits with exit code 1. Common cases:
| HTTP | code | Meaning | Handling |
|---|---|---|---|
| 401 | MISSING_API_KEY / UNAUTHORIZED |
No key provided or invalid key | Check DOUBAOYA_API_KEY, go to Key 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 |
| 502 | PROVIDER_FAILED |
Temporary upstream failure (automatically refunded) | Safe to retry |
502 PROVIDER_FAILEDwill automatically refund, retrying is safe and will not double-charge.
Directory structure
gongzhonghao-search/
├── SKILL.md # 本文件
└── scripts/
└── search_gzh.py # 零依赖搜索脚本(urllib),调用 doubaoya.com
About the notice field in the response
After calling the doubaoya API corresponding to this skill, if the notice field appears at the top level of the returned JSON, 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 there is no need to retry or change behavior.