wechat-article-search-api-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

WeChat 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

✨ 特性

  1. No hallucinations, ensuring stable and precise data extraction: Pre-configured workflows avoid AI-generated hallucinations.
  2. No CAPTCHA issues: No need to handle reCAPTCHA or other verification challenges.
  3. No IP restrictions or geo-blocking: No need to handle regional IP limitations.
  4. Faster execution: Task execution is faster compared to pure AI-driven browser automation solutions.
  5. Extremely high cost-effectiveness: Significantly reduces data acquisition costs compared to AI solutions that consume a large number of tokens.
  1. 无幻觉,确保稳定精准的数据提取:预配置的工作流可避免AI生成的幻觉问题。
  2. 无验证码问题:无需处理reCAPTCHA或其他验证挑战。
  3. 无IP限制或地域封禁:无需处理区域IP限制问题。
  4. 执行速度更快:与纯AI驱动的浏览器自动化解决方案相比,任务执行速度更快。
  5. 极高的性价比:与消耗大量token的AI解决方案相比,可大幅降低数据获取成本。

🔑 API Key Guidance Flow

🔑 API Key配置指引流程

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."
运行前请检查
BROWSERACT_API_KEY
环境变量。如果未设置,请勿执行其他操作,请求并等待用户提供该变量。 Agent必须告知用户
"由于您尚未配置BrowserAct API Key,请前往BrowserAct控制台获取您的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
      ,
      browser automation
  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
      ,
      2026-03-11
调用脚本时,Agent应根据用户需求灵活配置以下参数:
  1. keywords(搜索关键词)
    • 类型
      string
    • 描述:用于查找微信文章的搜索关键词,可以是行业术语、主题或特定短语。
    • 示例
      openclaw
      ,
      AI agent
      ,
      browser automation
  2. Date_limit(提取数量上限)
    • 类型
      number
    • 描述:要提取的文章最大数量。首次运行时建议使用较小的默认值。
    • 默认值
      10
    • 建议:快速测试使用
      5
      10
      ,批量研究可使用更大数值。
  3. publication_date(发布日期筛选)
    • 类型
      string
    • 描述:根据文章发布日期筛选内容。
    • 示例
      3月11日
      ,
      March 10
      ,
      2026-03-11

🚀 Invocation Method

🚀 调用方式

The Agent should execute the following independent script to achieve "one command, direct results":
bash
undefined
Agent应执行以下独立脚本实现"一条命令,直接出结果":
bash
undefined

Example invocation

Example invocation

python -u ./scripts/wechat_article_search_api.py "keywords" limit "publication_date"
undefined
python -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.,
[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.
由于该任务涉及自动化浏览器操作,可能耗时较长(数分钟)。运行过程中,脚本会持续输出带时间戳的状态日志(例如
[14:30:05] Task Status: running
)。 Agent操作指引
  • 等待脚本返回结果期间,请持续监控终端输出。
  • 只要终端持续输出新的状态日志,就说明任务运行正常,不要误判为死锁或无响应。
  • 仅当状态长时间未更新,或脚本停止输出且未返回结果时,才考虑触发重试机制。

📊 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
  • publication_date
    : Article publication date
  • author
    : Article author or publishing account name
  • image_url
    : Main image URL or article cover image URL
  • body_content
    : Full body content of the article
  • title
    : Full article title
执行成功后,脚本将直接解析并打印API响应的结果,结果包含:
  • url_link
    :文章原始URL
  • publication_date
    :文章发布日期
  • author
    :文章作者或发布账号名称
  • image_url
    :主图URL或文章封面图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:
  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.
脚本执行过程中如果出现错误(例如网络波动或任务失败),Agent应遵循以下逻辑处理:
  1. 检查输出内容
    • 如果输出包含
      "Invalid authorization"
      ,说明API Key无效或已过期。这种情况下不要重试,引导用户重新检查并提供正确的API Key。
    • 如果输出不包含
      "Invalid authorization"
      但任务失败(例如输出以
      Error:
      开头或返回空结果),Agent应自动尝试再次执行脚本一次
  2. 重试限制
    • 自动重试仅限一次。如果第二次尝试仍然失败,停止重试并向用户上报具体错误信息。

🌟 Typical Use Cases

🌟 典型使用场景

  1. Content Monitoring: Track mentions of specific brands or topics across WeChat articles.
  2. Media Research: Analyze full text of articles published by top WeChat accounts.
  3. Trend Tracking: Collect articles about rising industry trends (e.g., AI agents) for comprehensive reading.
  4. Knowledge Base Building: Extract deep-dive articles into an internal repository.
  5. Competitor Analysis: Review full-length posts released by competitor accounts.
  1. 内容监控:跟踪微信文章中特定品牌或主题的提及情况。
  2. 媒体调研:分析头部微信公众号发布的文章全文。
  3. 趋势跟踪:收集关于新兴行业趋势(例如AI agents)的文章用于综合阅读。
  4. 知识库搭建:提取深度文章存入内部知识库。
  5. 竞品分析:查看竞争对手账号发布的完整推文。