{
  "openapi": "3.0.1",
  "info": {
    "title": "Zhihu Scraper (知乎) — Hot List, Columns, Answers",
    "description": "Scrape Zhihu (知乎) with no login: the hot list (知乎热榜) with heat and answer counts, hot searches, search suggestions, and column (专栏) articles with full text. Add your own Zhihu cookie to also pull questions, answers, articles, search results and member profiles. Pay per result.",
    "version": "0.1",
    "x-build-id": "AaJ1gEVQF6SmIEKw6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bossless~zhihu-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bossless-zhihu-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/bossless~zhihu-scraper/runs": {
      "post": {
        "operationId": "runs-sync-bossless-zhihu-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/bossless~zhihu-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-bossless-zhihu-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": {
          "includeHotList": {
            "title": "Scrape the hot list (知乎热榜)",
            "type": "boolean",
            "description": "Fetch the current Zhihu hot list: about 30 trending questions with title, excerpt, heat (热度), answer count and link. Works without a cookie.",
            "default": true
          },
          "includeHotSearches": {
            "title": "Scrape hot searches (热搜)",
            "type": "boolean",
            "description": "Fetch the trending search terms shown in the Zhihu search box. Works without a cookie.",
            "default": false
          },
          "suggestionQueries": {
            "title": "Search suggestions for keywords",
            "type": "array",
            "description": "For each keyword, save Zhihu's search autocomplete suggestions (what Chinese users type after it). Useful for Chinese keyword research. Works without a cookie.",
            "items": {
              "type": "string"
            }
          },
          "columnUrls": {
            "title": "Column (专栏) URLs or IDs",
            "type": "array",
            "description": "Zhihu columns to scrape, as URLs (https://zhuanlan.zhihu.com/c_1034016963944755200) or IDs. Saves the column info plus its articles with full text, votes and comment counts. Works without a cookie.",
            "items": {
              "type": "string"
            }
          },
          "maxArticlesPerColumn": {
            "title": "Max articles per column",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many articles to save from each column (newest first).",
            "default": 20
          },
          "questionUrls": {
            "title": "Question URLs or IDs (needs cookie, beta)",
            "type": "array",
            "description": "Zhihu questions (https://www.zhihu.com/question/19550225). Saves the question and its top answers with full text. Requires zhihuCookie; skipped with a warning if none is supplied.",
            "items": {
              "type": "string"
            }
          },
          "maxAnswersPerQuestion": {
            "title": "Max answers per question",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many answers to save per question (Zhihu's default ranking).",
            "default": 20
          },
          "articleUrls": {
            "title": "Article URLs or IDs (needs cookie, beta)",
            "type": "array",
            "description": "Single Zhihu articles (https://zhuanlan.zhihu.com/p/625692987). Requires zhihuCookie. Tip: articles inside a column can be scraped without a cookie via Column URLs.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search keywords (needs cookie, beta)",
            "type": "array",
            "description": "Keywords to search Zhihu for; saves matching answers, articles and questions. Requires zhihuCookie.",
            "items": {
              "type": "string"
            }
          },
          "maxSearchResults": {
            "title": "Max results per search keyword",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many search results to save per keyword.",
            "default": 40
          },
          "memberUrls": {
            "title": "Member profile URLs or IDs (needs cookie, beta)",
            "type": "array",
            "description": "Zhihu users (https://www.zhihu.com/people/zhang-jia-wei). Saves followers, answer and article counts, votes and headline. Requires zhihuCookie.",
            "items": {
              "type": "string"
            }
          },
          "zhihuCookie": {
            "title": "Your Zhihu cookie (optional)",
            "type": "string",
            "description": "Paste the Cookie header from your own logged-in zhihu.com browser session (it must contain z_c0) to unlock questions, answers, articles, search and member profiles. Leave empty to use only the guest features. You supply and own this cookie; it is stored as secret input."
          },
          "aiEnrichment": {
            "title": "AI tags: sentiment, topics, entities, English summary (paid add-on)",
            "type": "boolean",
            "description": "Adds an `ai` field to each hot-list question, article, answer and question: sentiment and score, topic labels, named entities and a one-sentence English summary. Charged once per tagged item. Free-plan runs include a 3-item AI trial.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}