SuperAPI AI Directory

wechat-channels-crawler

General & other

View repository

Updated 10-16 06:51

About this skill

WeChat Channels Works Search

Enter keywords → Search popular WeChat Channels works → Structured table display → Supports daily push subscription


Introduction

Enter keywords to query popular WeChat Channels works, presented in a structured table with interaction data such as likes, comments, shares, and saves, helping you quickly grasp the real performance of various types of content on WeChat Channels.


Features

Feature Description
🔍 Keyword Search Enter content topic keywords to return a list of related works on the WeChat Channels platform
📊 Multi-dimensional Sorting Supports sorting by four methods: comprehensive, latest, most liked, and most saved
📋 Structured Table Displays the first 20 entries by default, including work title, author, publish time, and interaction data
🔔 Subscription Push After querying, you can subscribe to keywords; every day at 10:00 it automatically queries and pushes the latest works

Usage

CLI Command Line

# 基础用法:按综合排序搜索
python3 ~/.agents/skills/wechat-channels-crawler/scripts/search_wechat_channels.py "美食"

# 按最新排序
python3 ~/.agents/skills/wechat-channels-crawler/scripts/search_wechat_channels.py "美食" --sort 最新

# 按最多点赞排序
python3 ~/.agents/skills/wechat-channels-crawler/scripts/search_wechat_channels.py "美食" --sort 最多点赞

# 翻页查询
python3 ~/.agents/skills/wechat-channels-crawler/scripts/search_wechat_channels.py "美食" --page 2

# 输出到文件(推荐,避免 Windows GBK 乱码)
python3 ~/.agents/skills/wechat-channels-crawler/scripts/search_wechat_channels.py "美食" -o result.json

Parameter Description

Parameter Description
keyword Search keyword (required)
--sort Sort method:综合 / 最新 / 最多点赞 / 最多收藏, default 综合
--page Page number, starting from 1, default 1
--size Number of entries per page, default 20, maximum 50
--output / -o Output to a JSON file (UTF-8) to avoid garbled text from shell redirection

Dependencies

This script uses only the Python standard library and requires no additional dependencies to be installed.


Agent Integration Guide

Trigger Words

  • WeChat Channels search / WeChat Channels works query
  • WeChat Channels viral / WeChat Channels popular
  • WeChat Channels content search / search WeChat Channels
  • WeChat Channels search

Execution Flow

Step 1: 🔍 User Intent Understanding

⚠️ Core rule: Prioritize extracting niche direction words rather than generalized broad category words

User Input Handling Method
No niche keyword ("recent popular works") Pass an empty string as the keyword "", query site-wide popular content
Has niche words ("workplace outfits", "fat-loss meals") Search directly, no expansion needed
Has generalized words ("outfits", "food") Execute expansion strategy (Step 2)

Niche word judgment principle: has scene/audience/style/intent modifiers → niche word; pure broad category without modifiers → generalized word.

Extract precise keywords: Extract niche field words from the user's description, rather than generalized words. Example: the user says "help me find popular topics in the film field" and describes themselves as into "niche films, Hong Kong and Taiwan culture" → search "niche films, Hong Kong and Taiwan films, film reviews", ❌ rather than only searching "films".

Filter trigger hook words: Words such as "hot articles", "hot works", "viral hits", "hot content", "query", and "search" in the user input are trigger hooks for invoking the Skill and are not search keywords; they must be stripped. Example: if the user says "query AI hot articles" → the keyword is "AI", ❌ not "AI hot articles".

Step 2: 🔄 Generalization Term Expansion Strategy

⚠️ You must wait for the user's explicit reply before calling the script!

Step Action
1. Generate sub-terms Generate 10 sub-terms of moderate size (2-3 each of trend terms, audience terms, scenario terms, and intent terms); calling the script is prohibited
2. Wait for user reply Calling the script is prohibited when the user has not replied
3. Execute Reply "expand" → join the 10 terms with English commas and call the script only once; reply "do not expand" → search the original keyword

Output example:

我识别到「中产」是较大的分类,推荐以下细分方向:
老钱,轻奢,品质生活,松弛感,高级感穿搭,体面,法式穿搭,律师,医生,品质家居
回复「拓展」将同时搜索这10个词,回复「不拓展」将继续搜索「中产」

Step 3: 📡 Call the API interface

python3 ~/.agents/skills/wechat-channels-crawler/scripts/search_wechat_channels.py "<关键词>" [--sort 排序]

The script returns JSON:

{
  "total": 10877641,
  "list": [
    {
      "title": "作品描述...",
      "author": "作者名称",
      "like_count": 3052000,
      "comment_count": 71000,
      "share_count": 510000,
      "collect_count": 147000,
      "work_url": "https://findermp.video.qq.com/...",
      "publish_time": "2026-07-22 14:12:18",
      "topics": ["美食", "三明治"],
      "duration": 57
    }
  ]
}

Field descriptions:

Field Description Field Description
title Work description share_count Shares
author Author name collect_count Favorites
like_count Likes work_url Video link
comment_count Comments publish_time Publish time
topics Hashtag array duration Video duration (seconds)

Step 4: Format and output the table

Render the returned data as a Markdown table, showing the first 20 items:

| # | 作品标题 | 作者 | 点赞数 | 评论数 | 转发数 | 收藏数 | 发布时间 |
|---|---------|------|-------|-------|-------|-------|---------|
| 1 | 标题文字 | 作者名 | 305.2w | 7.1w | 51.0w | 14.7w | 07-22 |

Number formatting rules:

  • Less than 10000: display the original number directly (e.g. 320)
  • Greater than or equal to 10000: use the x.xw format (e.g. 1.2w = 12000)

Publish time formatting rules:

  • Take the month-day part of publish_time , formatted as MM-DD(e.g. 2026-07-22 14:12:18 → 07-22)

Title display rules:

  • Titles are displayed as plain text without links
  • When a title exceeds 30 characters, truncate it and add ...

Step 5: View more data (when more pages are available)

Prompt below the table:

Currently on page x, do you want to view the next page of data?

Use AskUserQuestion to ask:

question: "是否查看下一页数据?"
header: "下一页/翻页"
options:
  - label: "下一页/翻页"  description: "展示下一页数据(续接 #21 开始编号)"
  - label: "不用了"    description: "仅查看前 20 条"
  • View all: continue displaying from #21, with numbering increasing consecutively; after completion, proceed to Step 6
  • No thanks: proceed directly to Step 6

Step 6: Subscription prompt

After the table display is complete, use AskUserQuestion to ask:

question: "是否订阅该搜索?订阅后将每天自动推送相关视频号爆款作品数据。"
header: "订阅"
options:
  - label: "确认订阅"  description: "创建定时任务,每天 10:00 自动查询并推送"
  - label: "暂不订阅"  description: "仅查看本次数据,不创建定时任务"

Step 7: Create a scheduled task (only executed when the user confirms subscription)

Use the qoder_cron tool to create:

{
  "action": "add",
  "job": {
    "name": "视频号爆款作品订阅 - <关键词>",
    "description": "每天查询视频号关键词 <关键词> 的爆款作品数据并推送",
    "schedule": {
      "kind": "cron",
      "expr": "0 10 * * *",
      "tz": "Asia/Shanghai"
    },
    "payload": {
      "kind": "agentTurn",
      "message": "请执行视频号作品查询:运行 python3 ~/.agents/skills/wechat-channels-crawler/scripts/search_wechat_channels.py \"<关键词>\",将结果整理为表格展示(表头:作品标题 | 作者 | 点赞数 | 评论数 | 转发数 | 收藏数 | 发布时间,展示前 20 条,数字 >= 10000 用 x.xw 格式,发布时间取 MM-DD 格式,标题纯文本不加链接,不展示总条数)。完成后将结果推送到当前对话。"
    },
    "missedRunPolicy": "skip"
  }
}

After successful creation, inform the user: "You have successfully subscribed to push notifications for viral works from the video account with the keyword '<keyword>'. The latest data will be automatically queried and notified to you every day at 10:00."

Output specifications

⛔ Mandatory rules

The Agent must fully display all returned data and must not omit any entries. Numbers must be formatted according to the rules, publish time must use the MM-DD format, titles must be plain text without links, and the total number of items must not be displayed.


API description

Authentication method

This skill requires REDFOX_API_KEY Environment variables.

How to obtain: Go to Red Fox Hub to register and obtain an API Key.

Configuration method:

Option 1 — Configuration file (recommended):

{ "env": { "REDFOX_API_KEY": "ak_xxxx..." } }

Option 2 — Terminal environment variables:

export REDFOX_API_KEY="ak_xxxx..."

API information

Item Description
Endpoint POST https://redfox.hk/story/api/sphAllData/searchWork
Authentication Header X-API-Key
source parameter 视频号作品爬虫-GitHub

FAQ

Q: What should I do if the search results are empty? A: It may be that the keyword is too niche or relevant data is temporarily unavailable. Try changing the keyword and searching again, for example, change "母婴好物" to "母婴".

Q: What is the difference between the sorting methods? A: "Comprehensive" sorts by the platform's recommendation weight, "Latest" sorts by publish time in reverse order, and "Most Liked" and "Most Saved" sort by the corresponding interaction data respectively.

Q: How do I cancel a subscription push? A: Use the qoder_cron tool with action: "list" to view the created scheduled tasks, find the corresponding subscription, and use action: "remove" to delete it.

Q: How often is the data updated? A: Yesterday's data is updated every day. Subscription push automatically runs a query once a day at 10:00 (Beijing time) by default.