{
  "openapi": "3.0.1",
  "info": {
    "title": "WeChat Official Account Scraper 公众号 — Articles & Search",
    "description": "WeChat Official Account (公众号) scraper: Sogou keyword search returns article cards, and any pasted mp.weixin.qq.com link returns the full text plus the account's ID, WeChat ID, description and type. Only-new monitoring skips repeats, unbilled. No WeChat login. $0.003 per article.",
    "version": "1.0",
    "x-build-id": "fzlQFZSEEH0tpC5Ug"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~wechat-official-account-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-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/memo23~wechat-official-account-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-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/memo23~wechat-official-account-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-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",
        "properties": {
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "One keyword for the Sogou public WeChat article index. Chinese terms return more. Example: `人工智能`."
          },
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Several keywords in one run. Each is searched on `weixin.sogou.com`. Example: `人工智能`.",
            "items": {
              "type": "string"
            }
          },
          "articleUrls": {
            "title": "WeChat article URLs",
            "type": "array",
            "description": "Public article links, e.g. `https://mp.weixin.qq.com/s/urnBmheAWXNCDM5A8tAFYg`. These return the full text plus the account's ID, WeChat ID and description.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Sogou WeChat search URLs",
            "type": "array",
            "description": "Paste a Sogou listing such as `https://weixin.sogou.com/weixin?type=2&query=tesla`.",
            "items": {
              "type": "string"
            }
          },
          "accounts": {
            "title": "Official Accounts (article history)",
            "type": "array",
            "description": "List an account's published articles, newest first. Give its `gh_` ID (e.g. `gh_363b924965e9`), its WeChat ID, or any article URL from that account. Pair with Monitoring mode to get only new posts.",
            "items": {
              "type": "string"
            }
          },
          "accountKeywords": {
            "title": "Find Official Accounts by keyword",
            "type": "array",
            "description": "Search WeChat for Official Accounts. Each row has the account name, `gh_` ID, WeChat ID, description, verified company and avatar. Example: `人工智能`.",
            "items": {
              "type": "string"
            }
          },
          "searchSource": {
            "title": "Keyword search engine",
            "enum": [
              "sogou",
              "wechat"
            ],
            "type": "string",
            "description": "`sogou`: Sogou's public WeChat index (default). `wechat`: WeChat's own search, which returns real mp.weixin.qq.com links (so stats and comments work), newer posts, and sort and date filters.",
            "default": "sogou"
          },
          "searchSort": {
            "title": "Sort (WeChat search only)",
            "enum": [
              "default",
              "latest",
              "hot"
            ],
            "type": "string",
            "description": "Relevance, newest first, or most liked. Default: relevance.",
            "default": "default"
          },
          "searchPublishTime": {
            "title": "Published within (WeChat search only)",
            "enum": [
              "all",
              "day",
              "week",
              "half_year"
            ],
            "type": "string",
            "description": "Limit results to a time window. Default: any time.",
            "default": "all"
          },
          "includeStats": {
            "title": "Add read, like and share counts",
            "type": "boolean",
            "description": "Adds `stats` to each article: reads (阅读), likes (点赞), wows (在看), shares, favorites and comment count. Billed as a separate `article-stats` event per article that returns numbers. Works on pasted article URLs, account history and WeChat-search results (not Sogou cards). Default: off.",
            "default": false
          },
          "includeAccountProfile": {
            "title": "Add account profiles",
            "type": "boolean",
            "description": "For each entry in Official Accounts, add one `account` row with its IP location, number of original articles, account type and the linked 视频号 (WeChat Channels) account. Billed as a separate `account-profile` event per profile. Default: off.",
            "default": false
          },
          "includeComments": {
            "title": "Add comments",
            "type": "boolean",
            "description": "Also return each article's public comments as rows with `type: comment`: author, text, likes, location, time and replies. Each comment is one row. Same article sources as stats. Default: off.",
            "default": false
          },
          "maxCommentsPerArticle": {
            "title": "Max comments per article",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on comment rows per article. Comments do not count toward Maximum results. Default 20.",
            "default": 20
          },
          "includeReplies": {
            "title": "Add replies to comments",
            "type": "boolean",
            "description": "Also return replies under each comment as rows with `type: reply`: author, text, location, time, featured flag. Needs \"Add comments\". With this on, comment rows leave out their inline `replies` list so each reply is billed once. Default: off.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on reply rows per comment. Replies do not count toward Maximum results. Default 20.",
            "default": 20
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on article and account rows (comments are capped separately). Default 50. Free-tier runs are capped at 100.",
            "default": 50
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Pages per keyword or account. Default 3. Sogou stops at 10; a WeChat-search page holds about 38 articles and an account-history page about 20.",
            "default": 3
          },
          "monitorMode": {
            "title": "Monitoring mode (only-new articles)",
            "type": "boolean",
            "description": "Skip articles already delivered to this account — they are not billed. First run builds the baseline. Default: false.",
            "default": false
          },
          "monitorStateName": {
            "title": "Monitor state name",
            "type": "string",
            "description": "Name this watch so several schedules keep separate seen-ID lists. Example: `ai-daily`. Only used when monitoring is on. Default: empty (one shared list)."
          },
          "resetMonitoringState": {
            "title": "Reset monitoring state",
            "type": "boolean",
            "description": "Clear the seen-ID list at the start of this run. Default: false.",
            "default": false
          },
          "emitBaseline": {
            "title": "Emit baseline on first monitoring run",
            "type": "boolean",
            "description": "ON (default): first monitoring run returns current matches. OFF: first run seeds silently. Default: true.",
            "default": true
          },
          "includeUnchanged": {
            "title": "Include unchanged (monitoring)",
            "type": "boolean",
            "description": "Also re-emit already-seen rows tagged `changeType`. Billed. Default: false.",
            "default": false
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Sogou article search and public mp.weixin.qq.com pages answer direct in recon. Enable a proxy only if your IP is blocked."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}