{
  "openapi": "3.0.1",
  "info": {
    "title": "WeChat Article Scraper API – 公众号 Search, Full Text & Markdown",
    "description": "WeChat article scraper API, no login: search 公众号 (Official Account) articles by keyword via Sogou or pass links; get title, account, publish time, summary, link and full text as Markdown + images. Batch keywords, date filter, only-new monitoring, lean output. $0.0025/article, $0.012/full text.",
    "version": "2.1",
    "x-build-id": "05m9JCK5VoGVF72MQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deadc0dex~wechat-article-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deadc0dex-wechat-article-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/deadc0dex~wechat-article-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deadc0dex-wechat-article-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/deadc0dex~wechat-article-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deadc0dex-wechat-article-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": {
          "operation": {
            "title": "Operation",
            "enum": [
              "auto",
              "search_articles",
              "search_and_read",
              "keyword_digest",
              "article_details",
              "capabilities"
            ],
            "type": "string",
            "description": "auto (default) = keywords -> search_articles, urls -> article_details, both -> both. search_articles = WeChat article search via Sogou, $0.0025/row. search_and_read = search + full text of every hit, $0.012/row. keyword_digest = search_and_read + a free insights row per keyword. article_details = full text of given links, $0.012/row. capabilities = free manifest. Not available (needs WeChat login): account search/history, read counts, comments.",
            "default": "auto"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms, one per item, e.g. [\"人工智能\",\"新能源汽车\"]. Each keyword returns up to maxItemsPerInput articles (Sogou: 10 per page, max 10 pages). Chinese works best; common English terms are translated (expandQuery). URLs put here are moved to urls.",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Article URLs",
            "type": "array",
            "description": "Articles to read in full: Sogou links (https://weixin.sogou.com/link?url=..., the sogouUrl of a search row), signed mp links (https://mp.weixin.qq.com/s?src=11&timestamp=...&signature=..., they expire) or short links https://mp.weixin.qq.com/s/<code>. Long ?__biz=...&sn= links usually hit WeChat verification -> BLOCKED row.",
            "items": {
              "type": "string"
            }
          },
          "accounts": {
            "title": "Only these accounts (filter)",
            "type": "array",
            "description": "Keep only search rows whose Official Account name contains one of these, e.g. [\"人民日报\"]. Filters Sogou results for your keywords; it is not account history (that needs a WeChat login). Filtered rows are free.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max rows (whole run)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Total billed rows for the whole run, 1-2000 (default 50). Rows beyond it are never fetched or billed; the summary then says stopReason maxItems, moreAvailable true (not an error)."
          },
          "maxItemsPerInput": {
            "title": "Max articles per keyword",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Articles per keyword, 1-100 (default 20). Sogou shows 10 results per page and at most 10 pages, so 100 is the ceiling per keyword; use more or narrower keywords for more."
          },
          "fields": {
            "title": "Fields (projection)",
            "type": "array",
            "description": "Return only these fields (envelope type is always kept), e.g. [\"title\",\"accountName\",\"publishedAt\",\"articleUrl\"]. Any field of the row kind may be named, incl. contentText, images, biz, sn. Empty = the outputMode default set. Unknown names are reported in the summary.",
            "items": {
              "type": "string"
            }
          },
          "include": {
            "title": "Include",
            "type": "array",
            "description": "Extras: \"fullText\" = add the full article to each search hit (= search_and_read, billed as article-full); \"html\" = also contentHtml (large); \"images\" = keep images[] in lean rows; \"resolveLinks\" = resolve Sogou links to articleUrl (default on in compact/full, off in lean/table); \"insights\" = one free stats row per keyword (top terms, accounts, timeline, heuristic sentiment); \"trust\" / \"metrics\" = add isPartial + warnings / computed metrics to lean rows.",
            "items": {
              "type": "string"
            }
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "compact",
              "full",
              "lean",
              "table"
            ],
            "type": "string",
            "description": "compact (default) = flat core fields, null when unknown. full = every field incl. contentText, biz/mid/idx/sn, account avatar and bio. lean = fewest tokens for LLMs (~140/search row): title, accountName, publishedAt, summary (60 chars); full-text rows add url + content cut to maxTextChars; no null keys; search-row url only with include resolveLinks. table = lean rows + one TSV table in key-value record LEAN_TABLE (copied into the summary when < 20 KB).",
            "default": "compact"
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "relevance",
              "latest"
            ],
            "type": "string",
            "description": "relevance (default) = Sogou order. latest = newest first, sorted by us over the pages fetched (Sogou has no server-side date sort), so it reads one extra page per keyword.",
            "default": "relevance"
          },
          "dateFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Keep articles published on/after this: 2026-10-01 (China time), ISO date-time, unix seconds, or relative 24h / 7d / 2w / 1m. Applied by us on publish time (Sogou's own time filter does not work); skipped rows are free and more pages are read to fill maxItemsPerInput."
          },
          "dateTo": {
            "title": "Published until",
            "type": "string",
            "description": "Keep articles published on/before this (inclusive end of day for plain dates). Same formats as dateFrom."
          },
          "textContains": {
            "title": "Title/summary contains",
            "type": "array",
            "description": "Keep only rows whose title or summary contains one of these strings (case-insensitive), e.g. [\"融资\"]. Applied before links are resolved or bodies fetched; skipped rows are free.",
            "items": {
              "type": "string"
            }
          },
          "excludeAccounts": {
            "title": "Exclude accounts",
            "type": "array",
            "description": "Drop rows whose account name contains one of these strings.",
            "items": {
              "type": "string"
            }
          },
          "maxCostUsd": {
            "title": "Max cost (USD)",
            "type": "number",
            "description": "Stop before this run's charges would exceed this amount, e.g. 0.05. Checked before each row is fetched, so you never pay above it. The run ends SUCCEEDED with the rows so far and a BUDGET_REACHED row. Works with Apify's max cost per run."
          },
          "dryRun": {
            "title": "Dry run (free)",
            "type": "boolean",
            "description": "true = fetch nothing and bill nothing; returns one plan row (tasks, translated queries, max rows, max cost) and the summary. Use it to check an input before paying.",
            "default": false
          },
          "expandQuery": {
            "title": "Translate English keywords",
            "type": "boolean",
            "description": "true (default) = translate common English terms to Chinese with an offline dictionary before searching (e.g. \"AI chips\" -> \"AI芯片\", \"electric vehicles\" -> \"电动汽车\"); queryUsed shows the searched text. false = search exactly as given.",
            "default": true
          },
          "deltaKey": {
            "title": "Only new (monitoring key)",
            "type": "string",
            "description": "Monitoring: any name, e.g. \"ev-watch\". Of the top maxItemsPerInput results per keyword, returns (and bills) only articles not returned before under the same key; seen ids are kept 30 days in named key-value store wechat-article-delta-<key> in your account. Schedule the same input hourly/daily for only-new results."
          },
          "matchTerms": {
            "title": "Body contains (full text)",
            "type": "array",
            "description": "Full-text rows only (search_and_read, keyword_digest, article_details): keep articles whose title or body contains one of these, case-insensitive. Checked after the body is fetched: dropped rows are free but the run is not faster. Use textContains (title/summary, checked before fetching) to save time.",
            "items": {
              "type": "string"
            }
          },
          "minWordCount": {
            "title": "Min words (full text)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Full-text rows only: drop articles with fewer words, e.g. 300 to skip short notices. Checked after fetching; dropped rows are free."
          },
          "onlyOriginal": {
            "title": "Only original (原创)",
            "type": "boolean",
            "description": "Full-text rows only: true = keep only articles marked 原创 (original). Checked after fetching; dropped rows are free."
          },
          "trackMetrics": {
            "title": "Snapshot / change tracking",
            "type": "boolean",
            "description": "true = return every row (not only new ones) with isNew, firstSeenAt, previousPosition, positionDelta vs the previous run under the same deltaKey (default \"snapshot\"); full-text rows also contentChanged and wordCountDelta, and deleted articles come back as NOT_FOUND with wasSeenBefore. Read/like counts are not public, so no view deltas."
          },
          "dedupe": {
            "title": "Dedupe across keywords",
            "type": "boolean",
            "description": "true (default) = an article found by several keywords is returned (and billed) once. id = stable hash of account name + title.",
            "default": true
          },
          "maxTextChars": {
            "title": "Lean text length",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "lean/table only: cut full-text content to this many characters (default 600 ≈ 700 tokens of Chinese, 0 = no cut); contentTruncated=true marks cut rows. compact/full always return the whole text.",
            "default": 600
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Not needed normally (direct requests work). If Sogou rate-limits a run, the Actor slows down, switches between Sogou's mobile and desktop endpoints with fresh cookies, and only then tries an Apify datacenter proxy session. Set {\"useApifyProxy\":true} to use the proxy from the start."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}