{
  "openapi": "3.0.1",
  "info": {
    "title": "Chinese to Markdown｜微信公众号/头条/新浪/知乎 → RAG-ready MD",
    "description": "Paste WeChat 公众号 / Toutiao / Sina / Zhihu URLs → clean LLM-ready Markdown. Optional RAG chunks. $0.002/article; failed URLs free. Built for AI agents.",
    "version": "0.1",
    "x-build-id": "Kaz0yteDbl01vKQ8p"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ahuang~chinese-article-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ahuang-chinese-article-to-markdown",
        "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/ahuang~chinese-article-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-ahuang-chinese-article-to-markdown",
        "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/ahuang~chinese-article-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-ahuang-chinese-article-to-markdown",
        "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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Article URLs｜文章链接",
            "type": "array",
            "description": "Article URLs. Supported: WeChat 公众号 (mp.weixin.qq.com/s/...) — full support; Sina 新浪 (news.sina.com.cn) — full support; Toutiao 头条 (toutiao.com/article/...) — LIMITED (text articles only; videos / 微头条 / deleted may fail; image URLs expire); Zhihu 知乎 (zhuanlan.zhihu.com/p/...) — LIMITED (many articles blocked). Douban 豆瓣 is NOT supported (unsupported-site error, not charged). Failed URLs are not charged.\n文章 URL。支持：微信公众号（完整支持）、新浪（完整支持）、今日头条（有限：仅图文；视频/微头条/已删可能失败；图片链接会过期）、知乎（有限：大量文章会被拦截）。豆瓣不支持（返回不支持错误，不计费）。失败不计费。",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "outputFormat": {
            "title": "Output format｜输出格式",
            "enum": [
              "markdown",
              "json",
              "jsonl"
            ],
            "type": "string",
            "description": "markdown (default): core fields — url, title, author, date, word_count, images, markdown. json: also site, fetchedUrl, image_count; WeChat adds account, original_author.\nmarkdown（默认）：核心字段。json：额外含 site、fetchedUrl、image_count；公众号另含 account、original_author。\njsonl: same core fields as markdown, and the whole result is also saved as one JSONL file (key-value store record RESULTS.jsonl).\njsonl：字段同 markdown，并把全部结果另存为 JSONL 文件（KV 存储记录 RESULTS.jsonl）。",
            "default": "markdown"
          },
          "maxConcurrency": {
            "title": "Max concurrency｜最大并发",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel HTTP fetches (1–20, default 5). Lower this if a site rate-limits you.\n并行 HTTP 请求数（1–20，默认 5）。若站点限流请调低。",
            "default": 5
          },
          "chunking": {
            "title": "RAG chunking｜按 token 切块",
            "type": "boolean",
            "description": "Split each article into token-sized chunks for embedding. Each chunk becomes one dataset item with heading_path, chunk_index, token_count, overlap_tokens, text and source metadata (url, title, author, date, site); all chunks are also saved as RESULTS.jsonl in the key-value store. Tokens counted with tiktoken cl100k_base. Billing is still per successfully extracted article.\n把每篇文章按 token 切块，便于向量化。每块一条 dataset 记录，含 heading_path、chunk_index、token_count、来源元数据；全部块另存为 KV 记录 RESULTS.jsonl。token 用 tiktoken cl100k_base 计数。仍按成功文章计费。",
            "default": false
          },
          "chunkSize": {
            "title": "Chunk size (tokens)｜块大小",
            "minimum": 64,
            "maximum": 8192,
            "type": "integer",
            "description": "Max tokens per chunk (64–8192, default 512). Chunks split on Markdown headings first, then paragraphs, then sentences.\n每块最大 token 数，优先按标题、段落、句子切。",
            "default": 512
          },
          "chunkOverlap": {
            "title": "Chunk overlap (tokens)｜重叠",
            "minimum": 0,
            "maximum": 4096,
            "type": "integer",
            "description": "Tokens repeated from the end of the previous chunk within the same section (0 to chunkSize/2, default 64). No overlap across headings.\n同一小节内与上一块重叠的 token 数（0 到 chunkSize/2）。跨标题不重叠。",
            "default": 64
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}