{
  "openapi": "3.0.1",
  "info": {
    "title": "WeChat Official Account Scraper 公众号 | Articles & Read Counts",
    "description": "Extract WeChat Official Account (公众号) data: search articles and accounts by keyword, pull read counts, likes, shares and comments, resolve the verified company behind an account, and track WeChat Index (微信指数) keyword trends. 16 operations, up to 52 fields per result, 50 entries per run.",
    "version": "0.0",
    "x-build-id": "DbQolBCi2vw2UnLW4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zen-studio~wechat-official-account-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zen-studio-wechat-official-account-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/zen-studio~wechat-official-account-scraper/runs": {
      "post": {
        "operationId": "runs-sync-zen-studio-wechat-official-account-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/zen-studio~wechat-official-account-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zen-studio-wechat-official-account-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "抓取内容 What to scrape",
            "enum": [
              "articleSearch",
              "accountSearch",
              "hotArticleSearch",
              "miniProgramSearch",
              "searchSuggestions",
              "wechatIndexSearch",
              "articleDetail",
              "articleMetrics",
              "articleComments",
              "articleCommentReplies",
              "convertArticleLink",
              "accountBasicInfo",
              "accountPrincipalInfo",
              "accountOriginalCount",
              "accountTodayArticles",
              "accountHistoryArticles"
            ],
            "type": "string",
            "description": "选择本次运行要抓取的能力，每次运行只跑一个。不同能力读取公众号的不同部分，并使用下方对应的输入框（说明里已标注）。<br>Pick one capability per run. Each reads a different part of WeChat Official Accounts and uses the input field named in its description.",
            "default": "articleSearch"
          },
          "keywords": {
            "title": "搜索关键词 Search keywords",
            "maxItems": 50,
            "type": "array",
            "description": "用于<b>文章搜索</b>、<b>公众号搜索</b>、<b>热门文章</b>、<b>小程序搜索</b>、<b>搜索建议</b>和<b>微信指数</b>。可一次填入多个关键词，并行抓取。中文关键词效果最好（如 人工智能、财经、健康），英文和品牌名同样可用。热门文章的关键词可留空，留空即浏览整个分类。<br>Used by the search operations. Add several to cover them in one run; Chinese keywords return the richest results. Optional for Hot articles.",
            "items": {
              "type": "string"
            }
          },
          "articleUrls": {
            "title": "文章链接 Article URLs",
            "maxItems": 50,
            "type": "array",
            "description": "用于<b>文章详情</b>、<b>文章数据</b>、<b>文章评论</b>和<b>评论回复</b>。填写完整的公众号文章链接，例如 https://mp.weixin.qq.com/s/XXXXXXXXXXXX<br>Used by the article operations. Full article links.",
            "items": {
              "type": "string"
            }
          },
          "accounts": {
            "title": "公众号账号 Accounts",
            "maxItems": 50,
            "type": "array",
            "description": "用于<b>公众号资料</b>、<b>认证主体</b>、<b>原创篇数</b>、<b>今日文章</b>和<b>历史文章</b>。支持四种写法，均可自动识别：微信号（rmrbwx）、gh_ 开头的原始 ID（gh_363b924965e9）、公众号名称（人民日报），或该号任意一篇文章的链接。<br>Used by the account operations. Accepts a short id, a gh_ id, the display name, or any article link from that account.",
            "items": {
              "type": "string"
            }
          },
          "links": {
            "title": "待还原链接 Links to convert",
            "maxItems": 50,
            "type": "array",
            "description": "用于<b>链接还原</b>。填写公众号短链或中间跳转链接，将还原为完整文章地址。<br>Used by Convert link. Short or intermediate article links to expand.",
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "每项抓取页数 Pages per entry",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "对分页类能力（各类搜索、文章评论、历史文章）每个关键词或账号最多翻多少页。<b>评论回复</b>下表示每篇文章展开多少条留言的回复。结果会自动去重，没有更多内容时提前结束。<br>How deep to go per entry for the paginated operations. Results are de-duplicated and the run stops early when nothing is left.",
            "default": 3
          },
          "sortBy": {
            "title": "排序方式 Sort",
            "enum": [
              "relevance",
              "latest",
              "hot"
            ],
            "type": "string",
            "description": "用于<b>文章搜索</b>和<b>公众号搜索</b>。<br>Used by the search operations.",
            "default": "relevance"
          },
          "publishTime": {
            "title": "发布时间 Published within",
            "enum": [
              "all",
              "day",
              "week",
              "halfYear"
            ],
            "type": "string",
            "description": "用于<b>文章搜索</b>和<b>公众号搜索</b>。<br>Used by the search operations.",
            "default": "all"
          },
          "businessType": {
            "title": "联想词范围 Suggestion scope",
            "enum": [
              "ALL",
              "ACCOUNT",
              "ARTICLE",
              "CHANNEL",
              "MOMENTS",
              "LIVE",
              "EMOJI",
              "AUDIO",
              "BOOK",
              "WECHAT_INDEX",
              "NEWS",
              "MINI_PROGRAM",
              "ENCYCLOPEDIA"
            ],
            "type": "string",
            "description": "仅用于<b>搜索建议</b>，限定联想词来自微信的哪个板块。<br>Used by Search suggestions only.",
            "default": "ALL"
          },
          "startDay": {
            "title": "热门文章 起始日期 From",
            "type": "string",
            "description": "用于<b>热门文章</b>，格式 yyyy-MM-dd。留空默认取最近 7 天。<br>Used by Hot articles. Defaults to 7 days ago."
          },
          "endDay": {
            "title": "热门文章 结束日期 To",
            "type": "string",
            "description": "用于<b>热门文章</b>，格式 yyyy-MM-dd。留空默认取今天。<br>Used by Hot articles. Defaults to today."
          },
          "publishType": {
            "title": "热门文章 内容类型 Content type",
            "enum": [
              "ALL",
              "IMAGE_TEXT",
              "VIDEO",
              "AUDIO",
              "IMAGE",
              "TEXT",
              "REPRINT"
            ],
            "type": "string",
            "description": "用于<b>热门文章</b>，按内容形式筛选。<br>Used by Hot articles.",
            "default": "ALL"
          },
          "category": {
            "title": "热门文章 内容分类 Category",
            "enum": [
              "ALL",
              "INTERNATIONAL",
              "SPORTS",
              "ENTERTAINMENT",
              "SOCIETY",
              "FINANCE",
              "CURRENT_AFFAIRS",
              "TECHNOLOGY",
              "EMOTION",
              "AUTOMOTIVE",
              "EDUCATION",
              "FASHION",
              "GAMES",
              "MILITARY",
              "TRAVEL",
              "FOOD",
              "CULTURE",
              "HEALTH",
              "HUMOR",
              "HOME",
              "ANIMATION",
              "PETS",
              "PARENTING",
              "ASTROLOGY",
              "HISTORY",
              "MUSIC",
              "WORKPLACE",
              "AGRICULTURE",
              "ELDERLY_CARE",
              "COMPREHENSIVE",
              "UNCATEGORIZED"
            ],
            "type": "string",
            "description": "用于<b>热门文章</b>，把爆文限定在某一个话题分类。<br>Used by Hot articles.",
            "default": "ALL"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}