{
  "openapi": "3.0.1",
  "info": {
    "title": "WeChat Official Account Scraper",
    "description": "Scrape WeChat Official Account (公众号) articles by keyword, account name, album (合集) or article link: title, account, publish date, digest, cover, and the full text with images, author, region, original badge and hashtags. No login.",
    "version": "0.1",
    "x-build-id": "uK4Aifiq56SzRxXjz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automly~wechat-official-account-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automly-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/automly~wechat-official-account-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automly-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/automly~wechat-official-account-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automly-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": {
          "searchQueries": {
            "title": "Keywords",
            "type": "array",
            "description": "Find WeChat Official Account articles by keyword, one per line, e.g. 人工智能, 新能源汽车, 跨境电商 or a brand name. Chinese keywords find the most. Each keyword gives up to about 100 articles, the most WeChat search shows without signing in.",
            "items": {
              "type": "string"
            }
          },
          "accounts": {
            "title": "Official Account names",
            "type": "array",
            "description": "Articles from specific Official Accounts (公众号), one per line, e.g. 36氪 or 人民日报. Use the account's name exactly as WeChat shows it. Gives the account's articles that WeChat search shows (up to about 100), newest first; this is not always the account's full history.",
            "items": {
              "type": "string"
            }
          },
          "albumUrls": {
            "title": "Album (合集) links",
            "type": "array",
            "description": "Album links, e.g. https://mp.weixin.qq.com/mp/appmsgalbum?__biz=...&album_id=... Each gives every article in the album, newest first, with its permanent link, up to 'Max results per input'.",
            "items": {
              "type": "string"
            }
          },
          "articleUrls": {
            "title": "Article links",
            "type": "array",
            "description": "WeChat article links you already have, e.g. https://mp.weixin.qq.com/s/TSNQKkRpN1qbKsT7BvzqIw or a full link with __biz, mid, idx, sn and chksm (copy the whole link). Each returns the full article.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerInput": {
            "title": "Max results per input",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Most articles to save per keyword, account or album, e.g. 20. Keywords and accounts stop at about 100 (all WeChat search shows); albums go to their first article.",
            "default": 20
          },
          "includeContent": {
            "title": "Include full text",
            "type": "boolean",
            "description": "On: open every article and add its full text, images, author, the account's WeChat ID, description and avatar, publishing region, original (原创) badge, hashtags and article type. Off: only what the list shows (title, account, date, digest, cover, link), faster and cheaper. Article links always come with the full text.",
            "default": true
          },
          "includeHtml": {
            "title": "Include the article's HTML",
            "type": "boolean",
            "description": "With full text on, also return the article body as HTML in contentHtml (layout, links and images), e.g. for archiving. Rows get much larger.",
            "default": false
          },
          "sortBy": {
            "title": "Order of keyword results",
            "enum": [
              "relevance",
              "latest"
            ],
            "type": "string",
            "description": "Relevance keeps WeChat search's own order. Latest first puts the newest of the up to 100 articles first (it reorders them; it does not reach older results). Accounts are always newest first.",
            "default": "relevance"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Keep only articles published on or after this date, e.g. 2026-10-01, or within a period like 7 days or 2 weeks. Applied to the articles each input lists; leave empty for any date."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave the default.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}