{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper - Videos, Rankings, Uploaders & Comments",
    "description": "Bilibili videos with plays, likes, coins, favourites, shares, danmaku and comment counts, tags and sub-zone, from the popular list, a leaderboard, a sub-zone's top videos by date, uploaders or links. Comments on any video too. No account or login.",
    "version": "0.1",
    "x-build-id": "nKCIcjZKwVRYhY3BB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-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/dami_studio~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-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/dami_studio~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-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": {
          "source": {
            "title": "What to get",
            "enum": [
              "popular",
              "ranking",
              "categoryTop",
              "uploader",
              "videos",
              "comments"
            ],
            "type": "string",
            "description": "Each run does one of these. A run with nothing picked returns one sample row and charges nothing."
          },
          "maxVideos": {
            "title": "Maximum videos",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The most video rows one run returns, for every choice except Comments. The popular list holds about 650 videos and a leaderboard 100. Each video returned is one charge.",
            "default": 100
          },
          "rankingZone": {
            "title": "Leaderboard zone",
            "enum": [
              "0",
              "1",
              "3",
              "4",
              "5",
              "11",
              "13",
              "23",
              "36",
              "119",
              "129",
              "155",
              "160",
              "167",
              "181",
              "188",
              "211",
              "217",
              "223",
              "234"
            ],
            "type": "string",
            "description": "For Leaderboard. Bilibili ranks the last few days' videos and shows the top 100, for the whole site or one zone. Anime series (番剧) lists only a handful.",
            "default": "0"
          },
          "subZone": {
            "title": "Sub-zone",
            "enum": [
              "24",
              "25",
              "27",
              "47",
              "86",
              "210",
              "253",
              "257",
              "32",
              "33",
              "51",
              "152",
              "153",
              "168",
              "169",
              "170",
              "195",
              "28",
              "29",
              "30",
              "31",
              "59",
              "130",
              "193",
              "243",
              "244",
              "265",
              "266",
              "267",
              "20",
              "154",
              "156",
              "198",
              "199",
              "200",
              "255",
              "17",
              "19",
              "65",
              "121",
              "136",
              "171",
              "172",
              "173",
              "122",
              "124",
              "201",
              "207",
              "208",
              "209",
              "228",
              "229",
              "95",
              "230",
              "231",
              "232",
              "233",
              "164",
              "235",
              "236",
              "237",
              "238",
              "249",
              "176",
              "227",
              "240",
              "245",
              "246",
              "247",
              "248",
              "258",
              "21",
              "138",
              "161",
              "162",
              "239",
              "250",
              "251",
              "254",
              "76",
              "212",
              "213",
              "214",
              "215",
              "75",
              "218",
              "219",
              "220",
              "221",
              "222",
              "22",
              "26",
              "126",
              "127",
              "216",
              "157",
              "158",
              "159",
              "252",
              "203",
              "204",
              "205",
              "206",
              "71",
              "137",
              "241",
              "242",
              "262",
              "263",
              "264",
              "85",
              "182",
              "183",
              "184",
              "256",
              "259",
              "260",
              "261",
              "37",
              "178",
              "179",
              "180",
              "83",
              "145",
              "147",
              "185",
              "187"
            ],
            "type": "string",
            "description": "For Top videos in a sub-zone. Every Bilibili video is filed under one sub-zone, such as 单机游戏 (single-player games) under Gaming."
          },
          "topBy": {
            "title": "Order by",
            "enum": [
              "click",
              "coin",
              "stow",
              "dm",
              "scores"
            ],
            "type": "string",
            "description": "For Top videos in a sub-zone.",
            "default": "click"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Optional, for Top videos in a sub-zone: only videos Bilibili matches to this word. With a keyword Bilibili returns one list of up to 100."
          },
          "publishedFrom": {
            "title": "Published from",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "For Top videos in a sub-zone, where the range can be up to 90 days and defaults to the last 7, and for uploaders sorted newest first. Beijing dates, written like 2026-09-01."
          },
          "publishedTo": {
            "title": "Published to",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "The last publish day, Beijing time. Leave it empty to go up to today."
          },
          "uploaders": {
            "title": "Uploaders",
            "maxItems": 100,
            "type": "array",
            "description": "For Uploaders' videos. A space link such as https://space.bilibili.com/2929048, or the numeric UID.",
            "items": {
              "type": "string"
            }
          },
          "uploaderSort": {
            "title": "Uploader order",
            "enum": [
              "newest",
              "mostPlayed",
              "mostFavourited"
            ],
            "type": "string",
            "description": "For Uploaders' videos.",
            "default": "newest"
          },
          "maxPerUploader": {
            "title": "Maximum videos per uploader",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "For Uploaders' videos. Maximum videos still caps the whole run.",
            "default": 30
          },
          "videos": {
            "title": "Videos",
            "maxItems": 1000,
            "type": "array",
            "description": "For Videos from links or IDs, and for Comments (up to 200 videos there). Links like https://www.bilibili.com/video/BV1WQYd6DEgs, BV IDs, av numbers, or b23.tv short links.",
            "items": {
              "type": "string"
            }
          },
          "maxCommentsPerVideo": {
            "title": "Maximum comments per video",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "For Comments. Each comment returned is one charge.",
            "default": 100
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "For Comments: also return the replies under each comment, as rows of their own. They count toward Maximum comments per video.",
            "default": false
          },
          "addTags": {
            "title": "Add tags",
            "type": "boolean",
            "description": "Tags take one extra lookup per video, and on a big run Bilibili can leave some of those unanswered; the status says how many. Turn this off for faster runs, and each video's tags come back empty.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}