{
  "openapi": "3.0.1",
  "info": {
    "title": "Baidu Tieba Public Threads Scraper",
    "description": "Scrape public forum threads and posts from Baidu Tieba (tieba.baidu.com). Extracts thread titles, content, author, replies, and metadata from public forum listings and individual threads.",
    "version": "2.0",
    "x-build-id": "ujYMD7wLet3qFnU8r"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/searchapi~baidu-tieba-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-searchapi-baidu-tieba-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-tieba-scraper/runs": {
      "post": {
        "operationId": "runs-sync-searchapi-baidu-tieba-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-tieba-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-searchapi-baidu-tieba-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": "Forum name",
            "type": "string",
            "description": "The forum name to enter in Tieba search, for example 人工智能."
          },
          "queries": {
            "title": "Multiple forum names",
            "type": "array",
            "description": "Optional batch of forum names. Results are selected fairly across forums.",
            "items": {
              "type": "string"
            }
          },
          "threadUrls": {
            "title": "Direct public thread URLs",
            "type": "array",
            "description": "Optional HTTPS tieba.baidu.com/p/<id> URLs. Direct threads can be combined with forum searches.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Maximum threads",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of normalized thread records across all inputs.",
            "default": 20
          },
          "maxItemsPerQuery": {
            "title": "Maximum threads per forum",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum candidates selected from each forum before fair batch merging.",
            "default": 20
          },
          "maxPages": {
            "title": "Maximum listing pages per forum",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of forum listing pages to inspect for each forum.",
            "default": 3
          },
          "maxConcurrency": {
            "title": "Concurrent thread pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of public thread pages processed concurrently.",
            "default": 4
          },
          "maxPostsPerThread": {
            "title": "Maximum loaded posts per thread",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum post objects retained from the rendered thread page.",
            "default": 50
          },
          "minReplies": {
            "title": "Minimum reply count",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Skip listing candidates whose published reply count is below this value.",
            "default": 0
          },
          "includeThreadDetails": {
            "title": "Enrich individual thread pages",
            "type": "boolean",
            "description": "Open each public thread for posts and richer metadata. Leave disabled for the fastest and most block-resistant listing mode.",
            "default": false
          },
          "includePosts": {
            "title": "Include loaded post objects",
            "type": "boolean",
            "description": "Include normalized post objects loaded on each public thread page.",
            "default": true
          },
          "includeImages": {
            "title": "Include image URLs",
            "type": "boolean",
            "description": "Include public image URLs found in loaded posts.",
            "default": true
          },
          "includeVideos": {
            "title": "Include video URLs",
            "type": "boolean",
            "description": "Include public video or poster URLs found in loaded posts.",
            "default": true
          },
          "includeSticky": {
            "title": "Include sticky threads",
            "type": "boolean",
            "description": "Include threads marked sticky in forum listings.",
            "default": true
          },
          "featuredOnly": {
            "title": "Featured threads only",
            "type": "boolean",
            "description": "Keep only threads marked as featured or 精品 in forum listings.",
            "default": false
          },
          "failOnNoResults": {
            "title": "Fail when no results are available",
            "type": "boolean",
            "description": "Throw an error instead of returning an empty dataset when no public threads are available.",
            "default": false
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Bounded retries for temporary network, proxy, rate-limit, or browser failures.",
            "default": 2
          },
          "navigationTimeoutSecs": {
            "title": "Navigation timeout (seconds)",
            "minimum": 15,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time allowed for each browser navigation.",
            "default": 45
          },
          "requestHandlerTimeoutSecs": {
            "title": "Handler timeout (seconds)",
            "minimum": 30,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time allowed for each listing or thread handler.",
            "default": 90
          },
          "waitAfterLoadMillis": {
            "title": "Post-load wait (milliseconds)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Small bounded wait for public DOM content that appears immediately after navigation.",
            "default": 750
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Use Apify Residential or custom HTTP proxies when authorized. GOOGLE_SERP is not compatible with Tieba."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}