{
  "openapi": "3.0.1",
  "info": {
    "title": "Zhihu Scraper 知乎 [Only $3] Answers, Comments, Search 回答 评论 搜索",
    "description": "[Only $3 per 1000 rows] Zhihu (知乎) scraper, no login: 搜索 search sorted by newest or most upvoted with date and type filters, search suggestions, questions with 回答 answers and 评论 comments, user profiles, 热榜 hot list, columns and articles.",
    "version": "1.0",
    "x-build-id": "EfuXLeXb9erY0XrLU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~zhihu-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-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/memo23~zhihu-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-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/memo23~zhihu-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-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": {
          "startUrls": {
            "title": "Column and article URLs",
            "type": "array",
            "description": "Zhihu URLs to collect. Column: https://zhuanlan.zhihu.com/xuehy or https://www.zhihu.com/column/xuehy. Article: https://zhuanlan.zhihu.com/p/2084570146228664180. Question, answer and profile links work too and are read like the fields below. If every field is empty the run reads the xuehy column.",
            "items": {
              "type": "string"
            }
          },
          "columnIds": {
            "title": "Column slugs",
            "type": "array",
            "description": "Column slugs without the URL, same result as a column URL. Example: xuehy. Letters, numbers, underscore and hyphen only. Leave empty if you already passed URLs in startUrls.",
            "items": {
              "type": "string"
            }
          },
          "articleIds": {
            "title": "Article IDs",
            "type": "array",
            "description": "Numeric article ids, the number after /p/ in an article URL. Example: 2084570146228664180. Each id becomes one dataset row from the article endpoint. Leave empty if you already passed article URLs.",
            "items": {
              "type": "string"
            }
          },
          "questionUrls": {
            "title": "Question URLs or IDs",
            "type": "array",
            "description": "Zhihu question links (https://www.zhihu.com/question/19550225) or question ids. Each returns the question (title, detail, views, followers, answer count) and its answers. No login needed.",
            "items": {
              "type": "string"
            }
          },
          "maxAnswersPerQuestion": {
            "title": "Max answers per question",
            "minimum": 0,
            "type": "integer",
            "description": "Answers to return for each question. A page holds 20. 0 returns the question only.",
            "default": 20
          },
          "answerOrder": {
            "title": "Answer order",
            "enum": [
              "default",
              "updated"
            ],
            "type": "string",
            "description": "Zhihu's default ranking, or newest first.",
            "default": "default"
          },
          "answerUrls": {
            "title": "Answer URLs or IDs",
            "type": "array",
            "description": "Single answers by link (https://www.zhihu.com/question/19550225/answer/1991579825958303223) or answer id.",
            "items": {
              "type": "string"
            }
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Return the comments of every answer in the run as separate rows: text, likes, reply count, IP location.",
            "default": false
          },
          "maxCommentsPerAnswer": {
            "title": "Max comments per answer",
            "minimum": 1,
            "type": "integer",
            "description": "Top-level comments to return per answer. A page holds 10.",
            "default": 20
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Also return the replies under each comment, linked by parentCommentId.",
            "default": false
          },
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Search Zhihu by keyword. Returns answers, articles and questions matching it, with upvotes, comments and the author.",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Sort search results",
            "enum": [
              "relevance",
              "upvoted",
              "newest"
            ],
            "type": "string",
            "description": "Order of Search keywords results: Zhihu's relevance, most upvoted first, or newest first.",
            "default": "relevance"
          },
          "searchTimeRange": {
            "title": "Published within",
            "enum": [
              "all",
              "day",
              "week",
              "month",
              "three_months",
              "half_year",
              "year"
            ],
            "type": "string",
            "description": "Keep Search keywords results to this publishing window.",
            "default": "all"
          },
          "searchContentType": {
            "title": "Content type",
            "enum": [
              "all",
              "answer",
              "article",
              "video"
            ],
            "type": "string",
            "description": "Only answers, only articles, or only videos in Search keywords results.",
            "default": "all"
          },
          "includeSearchSuggestions": {
            "title": "Search suggestions",
            "type": "boolean",
            "description": "Also return Zhihu's search suggestions for each Search keyword (the dropdown under the search box), one row per suggestion. Useful for keyword research.",
            "default": false
          },
          "peopleKeywords": {
            "title": "People search keywords",
            "type": "array",
            "description": "Find Zhihu users by keyword: name, headline, followers, answer and article counts.",
            "items": {
              "type": "string"
            }
          },
          "topicKeywords": {
            "title": "Topic search keywords",
            "type": "array",
            "description": "Find topics by keyword, with follower and question counts.",
            "items": {
              "type": "string"
            }
          },
          "columnKeywords": {
            "title": "Column search keywords",
            "type": "array",
            "description": "Find columns by keyword. Use the returned column ids in 'Column slugs' to read their articles.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerKeyword": {
            "title": "Max results per keyword",
            "minimum": 1,
            "type": "integer",
            "description": "Rows to return for each keyword.",
            "default": 20
          },
          "users": {
            "title": "Profile URLs or url tokens",
            "type": "array",
            "description": "Zhihu profile links (https://www.zhihu.com/people/zhang-jia-wei) or url tokens. Each returns the profile: followers, answer and article counts, headline, IP location.",
            "items": {
              "type": "string"
            }
          },
          "userContent": {
            "title": "Also return for each person",
            "type": "array",
            "description": "Lists to return for each profile, newest first.",
            "items": {
              "type": "string",
              "enum": [
                "answers",
                "articles",
                "pins",
                "followers",
                "following"
              ],
              "enumTitles": [
                "Answers",
                "Articles",
                "Pins (想法)",
                "Followers",
                "Following"
              ]
            }
          },
          "maxItemsPerUser": {
            "title": "Max rows per list",
            "minimum": 1,
            "type": "integer",
            "description": "Rows to return from each chosen list of a person. A page holds 20.",
            "default": 20
          },
          "includeHotList": {
            "title": "Hot list (热榜)",
            "type": "boolean",
            "description": "Return Zhihu's current hot list: 30 questions with heat, answer count and excerpt.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows in total (articles, questions, answers, comments, people and so on). Default: 20. Free plans are capped at 100. Set this before a large run.",
            "default": 20
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many article-detail requests run at once. Example: 5. Default: 5. Minimum: 1. Maximum: 20. Column pages are fetched one after another.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}