{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper 哔哩哔哩 — Videos, Search, All Comments, No Login",
    "description": "Scrape Bilibili (哔哩哔哩, B站) without login: keyword search, video stats (views, likes, coins, favorites, shares, danmaku, tags), the popular list and full comment threads — hundreds of comments per video, hot or newest first, with replies. $0.49 per 1,000 rows, no start fee.",
    "version": "0.1",
    "x-build-id": "0AAdc2Ey77HwO4Xk6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zinin~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zinin-bilibili-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/zinin~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-zinin-bilibili-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/zinin~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zinin-bilibili-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": {
          "searchQueries": {
            "title": "Search keywords (搜索关键词)",
            "type": "array",
            "description": "One keyword per line, Chinese or English: <code>原神</code>, <code>人工智能</code>, <code>iphone 17</code>. Each keyword is its own Bilibili search, up to 1,000 videos per keyword (Bilibili's own ceiling). A video found by two keywords is delivered and charged once.",
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Videos (视频链接或 BV 号)",
            "type": "array",
            "description": "One video per line: a link (<code>https://www.bilibili.com/video/BV1rpWjevEip</code>), a bare BV id, an av number (<code>av2</code>) or a <code>b23.tv</code> share link — the whole share text can be pasted. Each video comes back as a full row with likes, coins, favorites, shares and tags. A line that is not a video becomes a free status row and the rest of the run goes on.",
            "items": {
              "type": "string"
            }
          },
          "includePopular": {
            "title": "Popular list (综合热门)",
            "type": "boolean",
            "description": "Add the videos of Bilibili's Popular page, in its order, up to the limit below.",
            "default": false
          },
          "maxVideosPerQuery": {
            "title": "Max videos per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop each keyword (and the popular list) after this many videos. Only delivered rows are charged.",
            "default": 20
          },
          "searchSort": {
            "title": "Search order",
            "enum": [
              "relevance",
              "views",
              "newest",
              "danmaku",
              "favorites",
              "comments"
            ],
            "type": "string",
            "description": "Bilibili's own search orders.",
            "default": "relevance"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Search only: videos published on or after this date (YYYY-MM-DD, China time)."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Search only: videos published on or before this date (YYYY-MM-DD, China time)."
          },
          "videoDetails": {
            "title": "Full details for found videos",
            "type": "boolean",
            "description": "Search rows already carry views, likes, favorites, danmaku and comment counts. Turn this on to open every found video and add coins, shares, the tag list, parts and resolution. Same price per row; the run is slower (one or two more requests per video). Videos given by link are always full.",
            "default": false
          },
          "maxCommentsPerVideo": {
            "title": "Comments per video",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "0 = no comments. Any other number reads that many top-level comments of <b>every</b> video of the run (by link, found by search, from the popular list) — each comment is its own charged row, so this is the main cost lever: 20 videos × 100 comments = 2,020 rows. The feed is paged in full, not cut at a short preview.",
            "default": 0
          },
          "commentsSort": {
            "title": "Comment order",
            "enum": [
              "hot",
              "newest"
            ],
            "type": "string",
            "description": "Bilibili's own comment orders. The comment pinned by the uploader comes first in the hot order.",
            "default": "hot"
          },
          "includeReplies": {
            "title": "Include replies (楼中楼)",
            "type": "boolean",
            "description": "Add the replies under each delivered comment as their own rows linked by <code>parentCommentId</code>, up to the limit below. A reply is charged like a comment.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Used when replies are on. Every comment row carries the true <code>replyCount</code> either way.",
            "default": 0
          },
          "maxItems": {
            "title": "Max rows in the whole run",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "A hard ceiling on charged rows of the run. 0 = no ceiling (the limits above and your maximum cost per run still apply).",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}