{
  "openapi": "3.0.1",
  "info": {
    "title": "WeChat Official Account Scraper 公众号 - Articles",
    "description": "WeChat Official Account scraper for 公众号 articles: search Sogou's WeChat (Weixin) index by keyword, find accounts by topic, read any mp.weixin.qq.com link or export an album. Rows: title, account_name, wechat_id, published_at, optional content_markdown. No login. From $3 per 1,000.",
    "version": "0.2",
    "x-build-id": "HqQ7DV3ga0agbhD38"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/herus13~wechat-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-herus13-wechat-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/herus13~wechat-scraper/runs": {
      "post": {
        "operationId": "runs-sync-herus13-wechat-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/herus13~wechat-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-herus13-wechat-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",
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "search",
              "article",
              "album",
              "account_search",
              "account_articles"
            ],
            "type": "string",
            "description": "What to collect: `search` finds Official Account articles by keyword; `article` reads specific article links in full; `album` lists every article in an account's album (合集); `account_search` lists the distinct accounts behind a keyword's search results; `account_articles` lists the articles WeChat search has indexed for the WeChat IDs you give. Each mode reads only its own fields — a field filled in for another mode is rejected, not ignored, so clear it when you switch. Default search.",
            "default": "search"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms, one per entry, for example `人工智能` or `咖啡`. Each term returns up to `max_items` articles; an article found by two terms is returned once. Required when `mode` is search or account_search; used by search and account_search — leave empty for every other mode (the form's example term must be cleared).",
            "items": {
              "type": "string"
            }
          },
          "article_urls": {
            "title": "Article links",
            "type": "array",
            "description": "mp.weixin.qq.com article links, one per entry: a short link (`https://mp.weixin.qq.com/s/` plus an id), a full link carrying __biz, mid, idx, sn and chksm, or a search-result link (`/s?src=11&timestamp=…&signature=…`). A full link without chksm is refused, since WeChat answers it with a verification page instead of the article. Required when `mode` is article; used ONLY by article — leave empty for every other mode.",
            "items": {
              "type": "string"
            }
          },
          "album_urls": {
            "title": "Album links",
            "type": "array",
            "description": "WeChat album (合集) links, one per entry, such as `https://mp.weixin.qq.com/mp/appmsgalbum?__biz=…&album_id=…`. Each album returns up to `max_items` articles, newest first, with the permanent link of each. Required when `mode` is album; used ONLY by album — leave empty for every other mode.",
            "items": {
              "type": "string"
            }
          },
          "wechat_ids": {
            "title": "WeChat IDs",
            "type": "array",
            "description": "WeChat IDs as an account's profile shows them, one per entry, for example `rmrbwx` or `huxiu_com`. Not the `gh_` original ID and not the display name: both are refused, never searched. Only articles whose account ID matches exactly are returned: what WeChat search has indexed for the ID, a partial, unordered, possibly stale sample, not full history. Required when `mode` is account_articles; used ONLY by account_articles — leave empty for every other mode.",
            "items": {
              "type": "string"
            }
          },
          "max_items": {
            "title": "Max results per keyword, album or ID",
            "minimum": -1,
            "type": "integer",
            "description": "How many rows to return per keyword, per album or per WeChat ID (account rows for account_search). N returns at most N; 0 returns none; -1 means no limit. Search stops at WeChat search's own depth, about 94 articles per keyword, whatever the limit; an album is read up to 2,000 articles. Article mode must keep the default. Default 20.",
            "default": 20
          },
          "include_content": {
            "title": "Include full article content",
            "type": "boolean",
            "description": "Also open every search hit or album entry and return the full article instead of the summary row: body text, HTML and Markdown, images, author, account details, originality and tags. One more request per row, billed as an article. Default false. Used by search and album; article mode always returns full content and must leave it off.",
            "default": false
          },
          "since": {
            "title": "Published since",
            "type": "string",
            "description": "Keep only articles published on or after this date, written as YYYY-MM-DD in Beijing time, for example 2026-09-01. Leave empty for no lower bound. WeChat search cannot filter by date and orders by relevance, so the filter runs on the rows fetched: a narrow window can return fewer rows than `max_items`. Used by search, album, account_search and account_articles — leave empty for article mode."
          },
          "proxyUrls": {
            "title": "Your own proxy URLs (optional)",
            "type": "array",
            "description": "Leave empty and the run uses the residential proxy this actor ships with, included in the price of the run. To route the run through your own account instead, add one gateway URL per entry, for example http://user:pass@host:port — works with any provider that issues URLs. When set, the run uses these first and switches to the included proxy if they stop working, so a broken proxy never fails the run. Use US exits.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}