WeChat Article Search 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.
✨ Features
- 1. 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.
🔑 API Key Guidance Flow
Before running, check the
BROWSERACT_API_KEY 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:
"Since you have not configured the BrowserAct API Key, please go to the BrowserAct Console to get your Key."
🛠️ Input Parameters
When invoking the script, the Agent should flexibly configure the following parameters based on user needs:
- 1. 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 agent, INLINECODE4
- 2. 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
5 to
10 for quick testing, larger numbers for batch research.
- 3. publication_date (Publication Date Filter)
-
Type:
string
-
Description: Filter articles by their publication date.
-
Example:
3月11日,
March 10, INLINECODE12
🚀 Invocation Method
The Agent should execute the following independent script to achieve "one command, direct results":
CODEBLOCK0
⏳ 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.,
[14:30:05] Task Status: running).
Agent Instructions:
- - 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.
📊 Output Data Explanation
Upon successful execution, the script will parse and print the results directly from the API response. The results include:
- -
url_link: Original article URL - INLINECODE15 : Article publication date
- INLINECODE16 : Article author or publishing account name
- INLINECODE17 : Main image URL or article cover image URL
- INLINECODE18 : Full body content of the article
- INLINECODE19 : Full article title
⚠️ Error Handling & Retry
During script execution, if an error occurs (such as network fluctuation or task failure), the Agent should follow this logic:
- 1. Check the output content:
- If the output
contains "Invalid authorization", 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.
- If the output
does not contain "Invalid authorization" but the task fails (e.g., output starts with
Error: or returns an empty result), the Agent should
automatically try to execute the script one more time.
- 2. 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.
🌟 Typical Use Cases
- 1. 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.
微信公众号文章搜索API
📖 简介
本技能通过BrowserAct微信公众号文章搜索API模板,为用户提供自动化的微信公众号文章提取功能。它支持基于关键词搜索直接提取完整内容的结构化微信公众号文章。只需提供搜索关键词和可选的日期筛选条件,即可获取包含全文在内的完整文章数据。
✨ 功能特点
- 1. 无幻觉,确保稳定精准的数据提取:预配置的工作流程避免了AI生成的幻觉内容。
- 无验证码问题:无需处理reCAPTCHA或其他验证挑战。
- 无IP限制或地域封锁:无需处理区域IP限制问题。
- 执行速度更快:相比纯AI驱动的浏览器自动化解决方案,任务执行速度更快。
- 极高的性价比:相比消耗大量token的AI解决方案,显著降低数据获取成本。
🔑 API密钥引导流程
运行前,检查BROWSERACT
APIKEY环境变量。如果未设置,不要执行其他操作;请求并等待用户提供。
Agent必须告知用户:
由于您尚未配置BrowserAct API密钥,请前往BrowserAct控制台获取您的密钥。
🛠️ 输入参数
调用脚本时,Agent应根据用户需求灵活配置以下参数:
- 1. keywords(搜索关键词)
-
类型:string
-
描述:用于查找微信公众号文章的搜索关键词。可以是行业术语、话题或特定短语。
-
示例:openclaw、AI agent、浏览器自动化
- 2. Date_limit(提取数量限制)
-
类型:number
-
描述:最大提取文章数量。首次运行时建议使用较小的默认值。
-
默认值:10
-
建议:快速测试时使用5到10,批量研究时使用更大的数值。
- 3. publication_date(发布日期筛选)
-
类型:string
-
描述:按文章发布日期进行筛选。
-
示例:3月11日、March 10、2026-03-11
🚀 调用方法
Agent应执行以下独立脚本,实现一键命令,直接获取结果:
bash
示例调用
python -u ./scripts/wechat
articlesearch_api.py 关键词 限制数量 发布日期
⏳ 运行状态监控
由于此任务涉及自动化浏览器操作,可能需要较长时间(数分钟)。运行过程中,脚本将
持续输出带时间戳的状态日志(例如[14:30:05] 任务状态:运行中)。
Agent指令:
- - 在等待脚本返回结果时,持续监控终端输出。
- 只要终端持续输出新的状态日志,即表示任务正常运行;不要误判为死锁或无响应。
- 仅当状态长时间保持不变,或脚本停止输出但未返回结果时,才考虑触发重试机制。
📊 输出数据说明
执行成功后,脚本将直接从API响应中解析并打印结果。结果包括:
- - urllink:文章原始链接
- publicationdate:文章发布日期
- author:文章作者或发布账号名称
- imageurl:主图链接或文章封面图链接
- bodycontent:文章完整正文内容
- title:文章完整标题
⚠️ 错误处理与重试
脚本执行过程中,如果发生错误(如网络波动或任务失败),Agent应遵循以下逻辑:
- 1. 检查输出内容:
- 如果输出内容
包含Invalid authorization,表示API密钥无效或已过期。此时
不要重试;引导用户重新检查并提供正确的API密钥。
- 如果输出内容
不包含Invalid authorization但任务失败(例如输出以Error:开头或返回空结果),Agent应
自动尝试再执行一次脚本。
- 2. 重试限制:
- 自动重试限制为
一次。如果第二次尝试仍然失败,停止重试并向用户报告具体的错误信息。
🌟 典型使用场景
- 1. 内容监控:追踪微信公众号文章中特定品牌或话题的提及情况。
- 媒体研究:分析头部微信公众号发布的文章全文。
- 趋势追踪:收集关于新兴行业趋势(如AI智能体)的文章进行综合阅读。
- 知识库构建:将深度文章提取到内部知识库中。
- 竞品分析:查看竞品账号发布的完整长文内容。