{
  "openapi": "3.0.1",
  "info": {
    "title": "知乎热榜 & 知乎 API | Zhihu Scraper & MCP Server",
    "description": "Zhihu (知乎) scraper & API, no login: 知乎热榜 hot list with rank tracking and Slack/Telegram/Discord alerts, plus search, answers, comments, creators, topics and columns. MCP server for AI agents.",
    "version": "0.3",
    "x-build-id": "zPMsf3SbxbvlznRyU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/molded_mountainpass~zhihu-hot-list-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-molded_mountainpass-zhihu-hot-list-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/molded_mountainpass~zhihu-hot-list-scraper/runs": {
      "post": {
        "operationId": "runs-sync-molded_mountainpass-zhihu-hot-list-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/molded_mountainpass~zhihu-hot-list-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-molded_mountainpass-zhihu-hot-list-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": [
              "hot_list",
              "search",
              "search_suggestions",
              "topic_search",
              "column_search",
              "web_search",
              "question_answers",
              "content_detail",
              "comments",
              "comment_replies",
              "user_profile",
              "user_articles",
              "user_answers",
              "column_articles"
            ],
            "type": "string",
            "description": "What to scrape. The hot list is public. The other operations work with no login on our hosted backend, which has a shared daily limit. For the best results, add your own Zhihu session cookie in the section below: no daily limit, and it unlocks everything.",
            "default": "hot_list"
          },
          "categories": {
            "title": "Boards / 榜单",
            "type": "array",
            "description": "Hot list boards to scrape. total = main 热榜.",
            "items": {
              "type": "string",
              "enum": [
                "total",
                "science",
                "digital",
                "sport",
                "fashion",
                "film",
                "school",
                "car",
                "depth"
              ],
              "enumTitles": [
                "Total 全站",
                "Science 科学",
                "Digital 数码",
                "Sport 体育",
                "Fashion 时尚",
                "Film 影视",
                "School 校园",
                "Car 汽车",
                "Depth 深度"
              ]
            },
            "default": [
              "total"
            ]
          },
          "maxItemsPerCategory": {
            "title": "Max items per board",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Each board returns up to 50 items.",
            "default": 50
          },
          "titleKeywords": {
            "title": "Keyword alerts / 关键词提醒",
            "type": "array",
            "description": "Only return hot-list questions whose title or excerpt contains one of these words (case-insensitive). Combine with Slack/Telegram/Discord to get alerted when your topic trends.",
            "items": {
              "type": "string"
            }
          },
          "trackChanges": {
            "title": "Track rank changes",
            "type": "boolean",
            "description": "Compare with the previous run (same state key) and add prev_rank, rank_change, heat_change and list_status (new / up / down / same).",
            "default": true
          },
          "includeDropped": {
            "title": "Include dropped questions",
            "type": "boolean",
            "description": "Also output questions that left the board since the previous run (list_status = dropped).",
            "default": false
          },
          "onlyNew": {
            "title": "Only new questions",
            "type": "boolean",
            "description": "Incremental mode: skip questions already returned in earlier runs.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name for the memory used by 'Only new' and 'Track rank changes'. Use different keys for separate monitors.",
            "default": "default"
          },
          "zhihuApiKey": {
            "title": "Zhihu API key / 知乎开放平台 Access Secret",
            "type": "string",
            "description": "Free from developer.zhihu.com → 个人中心 (personal center) → Access Secret. Used in preference to the cookie for search, web_search and question_answers, and as a fallback for the main hot list."
          },
          "zhihuCookie": {
            "title": "Zhihu session cookie / 知乎 Cookie (recommended)",
            "type": "string",
            "description": "How to get it (1 minute): 1) Log in to zhihu.com in Chrome or Edge. 2) Press F12 and open the Network tab, then reload the page. 3) Click any request to zhihu.com and, under Request Headers, copy the whole value of 'cookie'. 4) Paste it here. It must contain z_c0 (your session ID). Runs then use your own session, so keep volumes reasonable. If a run says ERR_TICKET_NOT_EXIST, your session expired: log in again and copy a fresh cookie."
          },
          "keywords": {
            "title": "Search keywords / 关键词",
            "type": "array",
            "description": "For search, topic_search, column_search, web_search and search_suggestions. One run can search several keywords.",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Zhihu URLs / 链接",
            "type": "array",
            "description": "For the other operations. Questions: zhihu.com/question/…, answers: …/answer/…, articles: zhuanlan.zhihu.com/p/…, columns: zhuanlan.zhihu.com/<column>, videos: zhihu.com/zvideo/…, creators: zhihu.com/people/….",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items per keyword / URL",
            "minimum": 1,
            "type": "integer",
            "description": "Pages are fetched automatically until this limit or the end.",
            "default": 100
          },
          "searchContentType": {
            "title": "Search: content type",
            "enum": [
              "all",
              "answer",
              "article",
              "video"
            ],
            "type": "string",
            "description": "For search: restrict results to one content type.",
            "default": "all"
          },
          "searchSort": {
            "title": "Search: sort",
            "enum": [
              "relevance",
              "upvotes",
              "newest"
            ],
            "type": "string",
            "description": "For search: result order.",
            "default": "relevance"
          },
          "searchTimeRange": {
            "title": "Search: published within",
            "enum": [
              "all",
              "day",
              "week",
              "month",
              "three_months",
              "half_year",
              "year"
            ],
            "type": "string",
            "description": "For search: only content published within this period.",
            "default": "all"
          },
          "answerSort": {
            "title": "Answers: sort",
            "enum": [
              "default",
              "newest"
            ],
            "type": "string",
            "description": "For question_answers: answer order.",
            "default": "default"
          },
          "commentSort": {
            "title": "Comments: sort",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "For comments: comment order.",
            "default": "top"
          },
          "includeReplies": {
            "title": "Comments: include replies",
            "type": "boolean",
            "description": "Also fetch replies under each comment (linked via parent_comment_id).",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Comments: max replies per comment",
            "minimum": 1,
            "type": "integer",
            "description": "With \"include replies\": max replies fetched under each comment.",
            "default": 20
          },
          "commentIds": {
            "title": "Comment IDs (comment_replies)",
            "type": "array",
            "description": "comment_id values from a comments run, used with the same content URL.",
            "items": {
              "type": "string"
            }
          },
          "includeMarkdown": {
            "title": "Include Markdown",
            "type": "boolean",
            "description": "Add content_markdown (full body as Markdown) next to the plain-text content.",
            "default": false
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "Slack incoming webhook URL. Each run posts a summary message."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL",
            "type": "string",
            "description": "Discord channel webhook URL. Each run posts a summary message."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "From @BotFather. Add the bot to your chat first."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Chat or channel ID to post to (e.g. -1001234567890 or @yourchannel)."
          },
          "notificationLimit": {
            "title": "Max items per notification",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many items each Slack/Telegram/Discord message lists.",
            "default": 10
          },
          "webhookUrl": {
            "title": "Generic webhook URL",
            "type": "string",
            "description": "All results of the run are POSTed here as JSON (Make, Zapier, n8n, your API)."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional proxy.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}