{
  "openapi": "3.0.1",
  "info": {
    "title": "WeChat Articles Scraper",
    "description": "WeChat articles scraper (微信公众号) for Official Account articles by keyword or brand, an account's articles, every article in an album, or article links: title, summary, account, WeChat ID, date, cover. Add the full text for the body, author, region, tags, original badge and images.",
    "version": "0.1",
    "x-build-id": "5vMs0cPkUs9mvJqXe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~wechat-articles-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-wechat-articles-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/dami_studio~wechat-articles-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-wechat-articles-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/dami_studio~wechat-articles-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-wechat-articles-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 get",
            "enum": [
              "search",
              "accounts",
              "accountArticles",
              "articles",
              "albums",
              "links"
            ],
            "type": "string",
            "description": "Articles that mention your keywords; the accounts that wrote them; one account's articles; full details for article links; every article in an album; or the short and permanent links for article links.",
            "default": "search"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Brand names, products, people or topics, one per line, in Chinese or English. Used by \"Articles that mention my keywords\" and \"Accounts behind those articles\". A keyword returns up to 100 articles, so add variants (the Chinese name, the English one, a product line) to cover more ground.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "WeChat search links",
            "type": "array",
            "description": "Optional, for \"Articles that mention my keywords\": links to WeChat article search result pages you already have open in your browser. Reading starts at the page in the link, and a date filter in the link is kept.",
            "items": {
              "type": "string"
            }
          },
          "accounts": {
            "title": "Accounts",
            "type": "array",
            "description": "For \"One account's articles\": the account's name exactly as WeChat shows it (36氪), its WeChat ID (rmrbwx), its gh_ ID, or a link to any one of its articles. One per line.",
            "items": {
              "type": "string"
            }
          },
          "articleUrls": {
            "title": "Article links",
            "type": "array",
            "description": "For \"Article details from links\" and \"Convert article links\": mp.weixin.qq.com links, short (/s/xxxx) or long (/s?__biz=...), or a search result link. One per line.",
            "items": {
              "type": "string"
            }
          },
          "albumUrls": {
            "title": "Album links",
            "type": "array",
            "description": "For \"Every article in an album\": links like https://mp.weixin.qq.com/mp/appmsgalbum?__biz=...&album_id=... One per line. Articles come newest first, each with its permanent link.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerInput": {
            "title": "Results per keyword, account or album",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The most rows from each keyword, account or album. A keyword or an account stops at 100 articles; an album goes up to 1,000.",
            "default": 20
          },
          "maxItems": {
            "title": "Most rows in the whole run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "A ceiling across every keyword, account, link and album. The run stops there and you are charged for what arrived.",
            "default": 100
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "relevance",
              "newest"
            ],
            "type": "string",
            "description": "Relevance keeps the search's own order. Newest first puts the latest first: a keyword search starts with the last day's articles, and the more rows you ask for, the deeper it reads, up to all 100 results.",
            "default": "relevance"
          },
          "publishedWithin": {
            "title": "Published within",
            "enum": [
              "any",
              "day",
              "week",
              "month",
              "halfYear",
              "year"
            ],
            "type": "string",
            "description": "Keep only articles published in this window, counted back from the start of the run. Every row's own date is checked, and articles outside it are left out without charge.",
            "default": "any"
          },
          "publishedAfter": {
            "title": "Published after",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}|\\d{1,4})?$",
            "type": "string",
            "description": "Optional. A date like 2026-10-01 (Beijing time), or a number of days back like 7. Older articles are left out without charge."
          },
          "publishedBefore": {
            "title": "Published before",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional. A date like 2026-10-31 (Beijing time); articles published later that day are kept, later days are left out."
          },
          "excludeKeywords": {
            "title": "Leave out articles mentioning",
            "type": "array",
            "description": "Optional. Articles whose title or summary contains any of these words are left out without charge, for example 招聘 or 广告.",
            "items": {
              "type": "string"
            }
          },
          "onlyFromAccounts": {
            "title": "Only from these accounts",
            "type": "array",
            "description": "Optional. Keep only articles by these accounts: the name as WeChat shows it, or the WeChat ID. Everything else is left out without charge.",
            "items": {
              "type": "string"
            }
          },
          "includeContent": {
            "title": "Add the full text (paid add-on)",
            "type": "boolean",
            "description": "Opens each article: the body as plain text, author, the account's description and gh_ ID, publishing region, tags, the original badge, the album it belongs to, images, links and video ids. Charged per article whose page was read, on top of the article row. \"Article details from links\" always includes it. In \"Accounts behind those articles\" it adds each account's description and gh_ ID at no extra charge.",
            "default": false
          },
          "includeMarkdown": {
            "title": "Also the text as Markdown",
            "type": "boolean",
            "description": "With the full text: contentMarkdown, with headings, bold, links and images kept. Handy for AI pipelines.",
            "default": false
          },
          "includeHtml": {
            "title": "Also the text as HTML",
            "type": "boolean",
            "description": "With the full text: contentHtml, the body as WeChat publishes it, with working image links. Large.",
            "default": false
          },
          "includeImages": {
            "title": "List the images",
            "type": "boolean",
            "description": "With the full text: images, the link, width and height of each picture in the body. Links only, no files.",
            "default": true
          },
          "resolveArticleUrls": {
            "title": "Add the article's own link to search rows",
            "type": "boolean",
            "description": "Adds articleUrl, the mp.weixin.qq.com link WeChat signs for this search; it opens the article for a few hours. Charged as a link per row that gets one. Not needed with the full text, which brings it anyway.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new since my last run",
            "type": "boolean",
            "description": "For scheduled runs: articles and accounts returned by an earlier run with the same monitor name are left out, uncharged. The list is kept in a store of that name in your own account.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Letters, digits and hyphens. Use a different name for each schedule, for example brand-watch-cn.",
            "default": "wechat-articles-seen"
          },
          "resetMonitor": {
            "title": "Forget earlier runs",
            "type": "boolean",
            "description": "Start the monitor's list again: this run returns everything and remembers it from now on.",
            "default": false
          },
          "requestDelaySecs": {
            "title": "Seconds between search pages",
            "minimum": 0.5,
            "maximum": 10,
            "type": "number",
            "description": "How long to wait between two search pages. One second suits most runs; raise it for very long runs.",
            "default": 1
          },
          "proxyUrls": {
            "title": "Your own proxy servers",
            "type": "array",
            "description": "Optional. HTTP or SOCKS5 proxy URLs you already pay for, used in turn. Leave empty to run without one.",
            "default": [],
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}