{
  "openapi": "3.0.1",
  "info": {
    "title": "WeChat Articles Scraper - Search & Full Text (公众号)",
    "description": "Search WeChat Official Account articles (公众号文章) by keyword or by account, without login, and get the full article text in the same run: title, account, WeChat ID, author, date, digest, cover, images and the complete body. Also reads article links you already have. Failed items are free.",
    "version": "0.1",
    "x-build-id": "vwlzI5S05qDhAR0ps"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapewise~wechat-articles/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapewise-wechat-articles",
        "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/scrapewise~wechat-articles/runs": {
      "post": {
        "operationId": "runs-sync-scrapewise-wechat-articles",
        "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/scrapewise~wechat-articles/run-sync": {
      "post": {
        "operationId": "run-sync-scrapewise-wechat-articles",
        "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": {
          "queries": {
            "title": "Keywords",
            "type": "array",
            "description": "Keywords, one per line, in Chinese or English, as you would type them in WeChat search: 新能源汽车, 跨境电商, 小米 汽车. Each keyword returns up to 'Max articles per keyword' (at most about 100, the 10 result pages WeChat search shows without login). An article found by two keywords is delivered and charged once. Chinese keywords return far more than English ones. Clear this list if you only want 'Official Accounts' or 'Article links'.",
            "items": {
              "type": "string"
            }
          },
          "accounts": {
            "title": "Official Accounts (optional)",
            "type": "array",
            "description": "Articles from specific Official Accounts (公众号), one per line: the account name exactly as WeChat shows it (36氪) or any mp.weixin.qq.com article link from the account. Only articles published by that account are kept and charged, up to 'Max articles per keyword' each, newest first unless 'Sort by' says otherwise. It reaches the account's most visible articles, not its whole archive. A gh_ id alone cannot be searched without login and returns a free INVALID_INPUT row.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max articles per keyword",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many articles to deliver per keyword or account, from 1 to 100 (WeChat search shows at most 100 without login). Default 20. Each article with full text costs US$ 0.014 on the Free plan, so 20 per keyword is US$ 0.28; with 'Include full text' off it is US$ 0.004 each.",
            "default": 20
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "latest"
            ],
            "type": "string",
            "description": "Relevance: the order of WeChat search. Latest first: the same up to 100 articles per keyword or account, newest first; all result pages are read before delivering, so the run starts a little slower. It orders, it does not reach older pages. Empty: keywords use relevance, accounts use latest."
          },
          "publishTime": {
            "title": "Published in the last",
            "enum": [
              "any",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Keep only articles published in the last 24 hours, 7 days, 30 days or 365 days. Applied to the up to 100 articles WeChat search ranks for the keyword; it does not reach older pages. Skipped articles are not charged. Default: any time. Combine with 'Published after' for an exact date; the later date wins.",
            "default": "any"
          },
          "onlyNew": {
            "title": "Only new articles",
            "type": "boolean",
            "description": "For scheduled runs. Remembers which articles were delivered for each keyword (Key-Value Store 'wechat-articles-only-new' in your account) and delivers only those not seen before; skipped articles are skipped before any charge. The first run delivers everything up to the limit; a run with nothing new ends with a free NOTHING_NEW row. Delete the store to start over. Default off.",
            "default": false
          },
          "includeContent": {
            "title": "Include full text",
            "type": "boolean",
            "description": "On (default): opens each article and adds the complete body, author, account gh_ id and WeChat ID, account description, images, region, original badge and hashtags, at US$ 14.00 per 1,000 articles in total on the Free plan. Off: only the search data (title, account, date, digest, cover, link) at US$ 4.00 per 1,000. Search links expire, so keep it on if you need the text later.",
            "default": true
          },
          "includeHtml": {
            "title": "Include article HTML",
            "type": "boolean",
            "description": "With 'Include full text' on, also returns the article body as HTML in 'contentHtml', with formatting, links and images with working src, for republishing or archiving the layout. Rows get larger; same price. Default off.",
            "default": false
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Keep only articles published on or after this date, as YYYY-MM-DD (2026-10-01), or in the last N days as a number (7). Older articles are skipped and not charged. Empty = no date limit. Anything else returns a free INVALID_INPUT row."
          },
          "articleUrls": {
            "title": "Article links",
            "type": "array",
            "description": "mp.weixin.qq.com article links you already have, one per line, in either form: https://mp.weixin.qq.com/s/<code> or https://mp.weixin.qq.com/s?__biz=...&mid=...&idx=...&sn=.... Each returns the full article at US$ 14.00 per 1,000. Deleted, private or verification gated articles come back as free rows.",
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy for the WeChat search pages only. The default Apify Proxy works and is included in the price. Articles are read directly, with a residential fallback at no extra price. Change only to route through your own proxy.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}