wechat-article-search-api-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWeChat Article Search API
微信文章搜索API
📖 Introduction
📖 简介
This skill provides users with automated WeChat article extraction through the BrowserAct WeChat Article Search API template. It allows for the direct extraction of full-content, structured WeChat articles based on keyword searches. Simply provide search keywords and optional date filters, and you can obtain comprehensive article data including the full body text.
该Skill通过BrowserAct微信文章搜索API模板为用户提供自动化微信文章提取能力,支持基于关键词搜索直接提取完整内容的结构化微信文章。只需提供搜索关键词和可选的日期筛选条件,即可获取包含正文全文在内的完整文章数据。
✨ Features
✨ 特性
- No hallucinations, ensuring stable and precise data extraction: Pre-configured workflows avoid AI-generated hallucinations.
- No CAPTCHA issues: No need to handle reCAPTCHA or other verification challenges.
- No IP restrictions or geo-blocking: No need to handle regional IP limitations.
- Faster execution: Task execution is faster compared to pure AI-driven browser automation solutions.
- Extremely high cost-effectiveness: Significantly reduces data acquisition costs compared to AI solutions that consume a large number of tokens.
- 无幻觉,确保稳定精准的数据提取:预配置的工作流可避免AI生成的幻觉问题。
- 无验证码问题:无需处理reCAPTCHA或其他验证挑战。
- 无IP限制或地域封禁:无需处理区域IP限制问题。
- 执行速度更快:与纯AI驱动的浏览器自动化解决方案相比,任务执行速度更快。
- 极高的性价比:与消耗大量token的AI解决方案相比,可大幅降低数据获取成本。
🔑 API Key Guidance Flow
🔑 API Key配置指引流程
Before running, check the environment variable. If not set, do not take other actions; request and wait for the user to provide it.
The Agent must inform the user:
BROWSERACT_API_KEY"Since you have not configured the BrowserAct API Key, please go to the BrowserAct Console to get your Key."
运行前请检查环境变量。如果未设置,请勿执行其他操作,请求并等待用户提供该变量。
Agent必须告知用户:
BROWSERACT_API_KEY"由于您尚未配置BrowserAct API Key,请前往BrowserAct控制台获取您的Key。"
🛠️ Input Parameters
🛠️ 输入参数
When invoking the script, the Agent should flexibly configure the following parameters based on user needs:
-
keywords (Search Keywords)
- Type:
string - Description: Search keywords used to find WeChat articles. Can be an industry term, topic, or specific phrase.
- Example: ,
openclaw,AI agentbrowser automation
- Type:
-
Date_limit (Extraction Limit)
- Type:
number - Description: Maximum number of articles to extract. For the first run, a smaller default value is recommended.
- Default Value:
10 - Suggestions: Use to
5for quick testing, larger numbers for batch research.10
- Type:
-
publication_date (Publication Date Filter)
- Type:
string - Description: Filter articles by their publication date.
- Example: ,
3月11日,March 102026-03-11
- Type:
调用脚本时,Agent应根据用户需求灵活配置以下参数:
-
keywords(搜索关键词)
- 类型:
string - 描述:用于查找微信文章的搜索关键词,可以是行业术语、主题或特定短语。
- 示例:,
openclaw,AI agentbrowser automation
- 类型:
-
Date_limit(提取数量上限)
- 类型:
number - 描述:要提取的文章最大数量。首次运行时建议使用较小的默认值。
- 默认值:
10 - 建议:快速测试使用到
5,批量研究可使用更大数值。10
- 类型:
-
publication_date(发布日期筛选)
- 类型:
string - 描述:根据文章发布日期筛选内容。
- 示例:,
3月11日,March 102026-03-11
- 类型:
🚀 Invocation Method
🚀 调用方式
The Agent should execute the following independent script to achieve "one command, direct results":
bash
undefinedAgent应执行以下独立脚本实现"一条命令,直接出结果":
bash
undefinedExample invocation
Example invocation
python -u ./scripts/wechat_article_search_api.py "keywords" limit "publication_date"
undefinedpython -u ./scripts/wechat_article_search_api.py "keywords" limit "publication_date"
undefined⏳ Run Status Monitoring
⏳ 运行状态监控
Because this task involves automated browser operations, it may take a long time (several minutes). While running, the script will continuously output timestamped status logs (e.g., ).
Agent Instructions:
[14:30:05] Task Status: running- Keep monitoring the terminal output while waiting for the script to return results.
- As long as the terminal continues to output new status logs, it means the task is running normally; do not misjudge it as deadlocked or unresponsive.
- Only consider triggering the retry mechanism if the status remains unchanged for a long time, or the script stops outputting without returning results.
由于该任务涉及自动化浏览器操作,可能耗时较长(数分钟)。运行过程中,脚本会持续输出带时间戳的状态日志(例如)。
Agent操作指引:
[14:30:05] Task Status: running- 等待脚本返回结果期间,请持续监控终端输出。
- 只要终端持续输出新的状态日志,就说明任务运行正常,不要误判为死锁或无响应。
- 仅当状态长时间未更新,或脚本停止输出且未返回结果时,才考虑触发重试机制。
📊 Output Data Explanation
📊 输出数据说明
Upon successful execution, the script will parse and print the results directly from the API response. The results include:
- : Original article URL
url_link - : Article publication date
publication_date - : Article author or publishing account name
author - : Main image URL or article cover image URL
image_url - : Full body content of the article
body_content - : Full article title
title
执行成功后,脚本将直接解析并打印API响应的结果,结果包含:
- :文章原始URL
url_link - :文章发布日期
publication_date - :文章作者或发布账号名称
author - :主图URL或文章封面图URL
image_url - :文章完整正文内容
body_content - :文章完整标题
title
⚠️ Error Handling & Retry
⚠️ 错误处理与重试
During script execution, if an error occurs (such as network fluctuation or task failure), the Agent should follow this logic:
-
Check the output content:
- If the output contains , it means the API Key is invalid or expired. In this case, do not retry; guide the user to re-check and provide the correct API Key.
"Invalid authorization" - If the output does not contain but the task fails (e.g., output starts with
"Invalid authorization"or returns an empty result), the Agent should automatically try to execute the script one more time.Error:
- If the output contains
-
Retry limit:
- Automatic retry is limited to once. If the second attempt still fails, stop retrying and report the specific error message to the user.
脚本执行过程中如果出现错误(例如网络波动或任务失败),Agent应遵循以下逻辑处理:
-
检查输出内容:
- 如果输出包含,说明API Key无效或已过期。这种情况下不要重试,引导用户重新检查并提供正确的API Key。
"Invalid authorization" - 如果输出不包含但任务失败(例如输出以
"Invalid authorization"开头或返回空结果),Agent应自动尝试再次执行脚本一次。Error:
- 如果输出包含
-
重试限制:
- 自动重试仅限一次。如果第二次尝试仍然失败,停止重试并向用户上报具体错误信息。
🌟 Typical Use Cases
🌟 典型使用场景
- Content Monitoring: Track mentions of specific brands or topics across WeChat articles.
- Media Research: Analyze full text of articles published by top WeChat accounts.
- Trend Tracking: Collect articles about rising industry trends (e.g., AI agents) for comprehensive reading.
- Knowledge Base Building: Extract deep-dive articles into an internal repository.
- Competitor Analysis: Review full-length posts released by competitor accounts.
- 内容监控:跟踪微信文章中特定品牌或主题的提及情况。
- 媒体调研:分析头部微信公众号发布的文章全文。
- 趋势跟踪:收集关于新兴行业趋势(例如AI agents)的文章用于综合阅读。
- 知识库搭建:提取深度文章存入内部知识库。
- 竞品分析:查看竞争对手账号发布的完整推文。