{
  "openapi": "3.0.1",
  "info": {
    "title": "Zhihu Search Scraper: Q&A",
    "description": "Search public Zhihu by keyword, or open questions, articles, columns, videos, comments, and creator pages. Get structured records with source links, available text, authors, engagement, dates, and related public context.",
    "version": "0.0",
    "x-build-id": "Rh0vhKE9zqQiojsfz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~zhihu/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-zhihu",
        "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/maximedupre~zhihu/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-zhihu",
        "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/maximedupre~zhihu/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-zhihu",
        "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": [
          "target"
        ],
        "properties": {
          "target": {
            "title": "Target",
            "enum": [
              "keywordSearch",
              "hotQuestions",
              "questionAnswers",
              "article",
              "columnArticles",
              "video",
              "comments",
              "commentReplies",
              "creatorProfile",
              "creatorArticles"
            ],
            "type": "string",
            "description": "Choose the Zhihu data you want to collect."
          },
          "keyword": {
            "title": "Keyword",
            "minLength": 1,
            "type": "string",
            "description": "Search public Zhihu with one keyword or phrase. Run another job for a different search."
          },
          "contentTypes": {
            "title": "Content types",
            "type": "array",
            "description": "Limit the search to these Zhihu types. Leave this empty to search all supported types.",
            "items": {
              "type": "string",
              "enum": [
                "answers",
                "questions",
                "articles",
                "videos",
                "columns",
                "people"
              ],
              "enumTitles": [
                "Answers",
                "Questions",
                "Articles",
                "Videos",
                "Columns",
                "People and profiles"
              ]
            }
          },
          "topicCategories": {
            "title": "Topic categories",
            "type": "array",
            "description": "Filter keyword results to these topic categories. Leave this empty to use all categories.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "hotOnly": {
            "title": "Hot items only",
            "type": "boolean",
            "description": "Return only keyword results that belong to the current Zhihu hot list."
          },
          "minimumTopAnswerVotes": {
            "title": "Minimum top-answer votes",
            "minimum": 0,
            "type": "integer",
            "description": "For keyword search, return only results whose top answer has at least this many votes. Leave this empty to skip the filter."
          },
          "publishedFrom": {
            "title": "Published from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "For keyword search, return items published on or after this UTC date. Use YYYY-MM-DD. Leave this empty for no start date."
          },
          "publishedTo": {
            "title": "Published to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "For keyword search, return items published on or before this UTC date. Use YYYY-MM-DD. Leave this empty for no end date."
          },
          "sortBy": {
            "title": "Search order",
            "enum": [
              "relevance",
              "newest",
              "votes"
            ],
            "type": "string",
            "description": "Choose how keyword results are ordered. If you leave this empty, Zhihu uses its normal search order."
          },
          "questionUrls": {
            "title": "Question URLs",
            "type": "array",
            "description": "Add one or more public Zhihu question URLs. The Actor returns answer records for these questions.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "A public Zhihu question URL.",
                  "pattern": "^https?://"
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "articleUrls": {
            "title": "Article URLs",
            "type": "array",
            "description": "Add one or more public Zhihu article URLs. The Actor returns the available article body and details.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "A public Zhihu article URL.",
                  "pattern": "^https?://"
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "columnUrls": {
            "title": "Column URLs",
            "type": "array",
            "description": "Add one or more public Zhihu column URLs. The Actor returns available article listings for these columns.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "A public Zhihu column URL.",
                  "pattern": "^https?://"
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "Add one or more public Zhihu video URLs. The Actor returns available video records and metadata.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "A public Zhihu video URL.",
                  "pattern": "^https?://"
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "contentUrls": {
            "title": "Content URLs",
            "type": "array",
            "description": "Add one or more public Zhihu content URLs. The Actor returns their top-level comments.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "A public Zhihu question, answer, article, or video URL.",
                  "pattern": "^https?://"
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "commentSort": {
            "title": "Comment order",
            "enum": [
              "popular",
              "newest"
            ],
            "type": "string",
            "description": "Choose how top-level comments are ordered. If you leave this empty, Zhihu uses its normal comment order."
          },
          "commentUrls": {
            "title": "Comment URLs",
            "type": "array",
            "description": "Add one or more public Zhihu comment URLs. The Actor returns their replies and keeps the parent comment link.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "A public Zhihu comment URL.",
                  "pattern": "^https?://"
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "creatorUrls": {
            "title": "Creator URLs",
            "type": "array",
            "description": "Add one or more public Zhihu creator profile URLs. This field is used by Creator profile and Creator articles targets.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "A public Zhihu creator profile URL.",
                  "pattern": "^https?://"
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many records for the selected target. Leave this empty to return all available results until the source is exhausted."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}