{
  "openapi": "3.0.1",
  "info": {
    "title": "Baidu Zhidao Scraper",
    "description": "Scrape Q&A content from Baidu Zhidao (zhidao.baidu.com), China's largest online Q&A platform. Extracts question titles, descriptions, best answers, related answers, categories, and metadata.",
    "version": "2.1",
    "x-build-id": "AAAdruXEiucRFjSq7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/searchapi~baidu-zhidao-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-searchapi-baidu-zhidao-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/searchapi~baidu-zhidao-scraper/runs": {
      "post": {
        "operationId": "runs-sync-searchapi-baidu-zhidao-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/searchapi~baidu-zhidao-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-searchapi-baidu-zhidao-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": {
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "One phrase to enter into the Baidu Zhidao search form."
          },
          "queries": {
            "title": "Multiple search queries",
            "type": "array",
            "description": "Optional batch of up to 20 phrases. Results are deduplicated and fairly interleaved across queries.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "questionUrls": {
            "title": "Direct question URLs",
            "type": "array",
            "description": "Optional public Baidu Zhidao question URLs. When supplied, direct question mode is used and search fields are populated from the URL.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "market": {
            "title": "Browser locale",
            "type": "string",
            "description": "Locale used for browser headers and provenance metadata.",
            "default": "zh-CN"
          },
          "maxItems": {
            "title": "Maximum total records",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard output limit across all queries or direct question URLs.",
            "default": 20
          },
          "maxItemsPerQuery": {
            "title": "Maximum records per query",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Per-query cap before fair multi-query selection.",
            "default": 20
          },
          "maxPages": {
            "title": "Maximum result pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum Baidu Zhidao search pages inspected for each query.",
            "default": 3
          },
          "includeKeywords": {
            "title": "Include keywords",
            "type": "array",
            "description": "Keep questions when every keyword appears in the title, question, answer, category, or tags.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Skip questions when any keyword appears in searchable text.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "includeCategories": {
            "title": "Include categories",
            "type": "array",
            "description": "Keep questions whose category, subcategory, or breadcrumb contains one of these values.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "excludeCategories": {
            "title": "Exclude categories",
            "type": "array",
            "description": "Skip questions whose category, subcategory, or breadcrumb contains one of these values.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "minAnswerCount": {
            "title": "Minimum answer count",
            "minimum": 0,
            "maximum": 2000000000,
            "type": "integer",
            "description": "Keep questions with at least this many answers when the count is available."
          },
          "maxAnswerCount": {
            "title": "Maximum answer count",
            "minimum": 0,
            "maximum": 2000000000,
            "type": "integer",
            "description": "Keep questions with no more than this many answers."
          },
          "minViewCount": {
            "title": "Minimum view count",
            "minimum": 0,
            "maximum": 2000000000,
            "type": "integer",
            "description": "Keep questions with at least this many views when the count is available."
          },
          "resolvedOnly": {
            "title": "Resolved questions only",
            "type": "boolean",
            "description": "Keep only questions that expose a resolved or accepted status.",
            "default": false
          },
          "requireBestAnswer": {
            "title": "Require an answer",
            "type": "boolean",
            "description": "Keep only questions with at least one extracted answer or best answer.",
            "default": false
          },
          "sortBy": {
            "title": "Sort results",
            "enum": [
              "searchOrder",
              "answerCountDesc",
              "viewCountDesc",
              "newestDesc",
              "titleAsc"
            ],
            "type": "string",
            "description": "Order accepted records after pagination and fair multi-query selection.",
            "default": "searchOrder"
          },
          "maxConcurrency": {
            "title": "Maximum query concurrency",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Number of independent search queries processed in parallel.",
            "default": 2
          },
          "maxDetailConcurrency": {
            "title": "Maximum detail concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Number of question detail pages opened in parallel for one search page.",
            "default": 3
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Retries temporary DNS, rate-limit, timeout, proxy, and transport failures. Verification pages are not retried.",
            "default": 1
          },
          "navigationTimeoutSecs": {
            "title": "Navigation timeout",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time for one homepage, search, or question navigation.",
            "default": 45
          },
          "requestHandlerTimeoutSecs": {
            "title": "Run item timeout",
            "minimum": 30,
            "maximum": 360,
            "type": "integer",
            "description": "Configured timeout budget for one query or direct question work item.",
            "default": 180
          },
          "requestDelayMs": {
            "title": "Request delay",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Delay before each search or question navigation in milliseconds.",
            "default": 300
          },
          "blockMedia": {
            "title": "Block images and media",
            "type": "boolean",
            "description": "Abort image, video, and font downloads while preserving question text and links.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional authorized Apify Proxy or custom proxy configuration. Proxy credentials are never written to the dataset or logs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}