{
  "openapi": "3.0.1",
  "info": {
    "title": "WeChat Official Account Scraper — Articles, Accounts & Search",
    "description": "Extract WeChat Official Account data into clean datasets: article content & detail, account profiles & registration info, today's & historical articles, comments, engagement metrics, plus article, hot, mini-program, index & account search. wxid-native, no login.",
    "version": "1.0",
    "x-build-id": "FwlkBNTnPh9F47MLr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~wechat-official-account-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-wechat-official-account-data-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/sian.agency~wechat-official-account-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-wechat-official-account-data-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/sian.agency~wechat-official-account-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-wechat-official-account-data-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": "Operation",
            "enum": [
              "articleSearch",
              "hotArticleSearch",
              "accountSearch",
              "miniProgramSearch",
              "searchSuggestions",
              "wechatIndexSearch",
              "articleDetail",
              "articleMetrics",
              "articleComments",
              "articleCommentReplies",
              "convertArticleLink",
              "accountBasicInfo",
              "accountPrincipalInfo",
              "accountOriginalCount",
              "accountTodayArticles",
              "accountHistoryArticles"
            ],
            "type": "string",
            "description": "What to scrape. Each operation maps to one WeChat Official Account capability. Fill in only the field(s) that operation requires (shown below).",
            "default": "articleSearch"
          },
          "keyword": {
            "title": "Search Keyword",
            "type": "string",
            "description": "Used by the search operations (Article / Account / Mini Program / Suggestions / WeChat Index). Chinese keywords give the richest results (try 人工智能, 财经, 健康). English & brand names also work."
          },
          "account": {
            "title": "Account (wxid, ghid, or URL)",
            "type": "string",
            "description": "Used by the Account operations (Basic Info / Principal Info / Original Count / Today's Articles / Historical Articles). Accepts a short wxid (e.g. `rmrbwx`), a ghid (`gh_363b924965e9`), or an account/article URL. A bare wxid is resolved to its ghid automatically."
          },
          "articleUrl": {
            "title": "Article URL",
            "type": "string",
            "description": "Used by Article Detail / Metrics / Comments / Comment Replies. A full mp.weixin.qq.com article link."
          },
          "contentId": {
            "title": "Comment Content ID",
            "type": "string",
            "description": "Used by Article Comment Replies only — the commentId of a top-level comment (returned by the Article Comments operation)."
          },
          "link": {
            "title": "Article Short Link",
            "type": "string",
            "description": "Used by Convert Article Link — a WeChat Official Account short or intermediate article link to normalize into a full destination URL."
          },
          "subSearchType": {
            "title": "Article Search Category",
            "enum": [
              "ALL",
              "LATEST",
              "HOT",
              "FOLLOWED",
              "RECENT_READ"
            ],
            "type": "string",
            "description": "Used by Article Search only — narrow the result category.",
            "default": "ALL"
          },
          "startDay": {
            "title": "Hot Search — Start Day",
            "type": "string",
            "description": "Used by Hot Article Search — start date in yyyy-MM-dd format."
          },
          "endDay": {
            "title": "Hot Search — End Day",
            "type": "string",
            "description": "Used by Hot Article Search — end date in yyyy-MM-dd format."
          },
          "publishType": {
            "title": "Hot Search — Publish Type",
            "enum": [
              "ALL",
              "IMAGE_TEXT",
              "VIDEO",
              "AUDIO",
              "IMAGE",
              "TEXT",
              "REPRINT"
            ],
            "type": "string",
            "description": "Used by Hot Article Search (optional) — filter hot articles by content type.",
            "default": "ALL"
          },
          "businessType": {
            "title": "Suggestions — Scope",
            "enum": [
              "ALL",
              "ACCOUNT",
              "ARTICLE",
              "CHANNEL",
              "MOMENTS",
              "LIVE"
            ],
            "type": "string",
            "description": "Used by Search Suggestions (optional) — scope of the autocomplete suggestions.",
            "default": "ALL"
          },
          "maxPages": {
            "title": "Max pages (paginated ops)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many pages to fetch for paginated operations (Article / Account / Mini Program / Hot search, Comments, Historical Articles). The actor de-duplicates across pages and stops early when results are exhausted. Default 3. Range 1–50.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}