{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper - Videos, Rankings, Uploaders & Comments",
    "description": "Bilibili scraper (哔哩哔哩, B站) for videos by keyword, the popular list, leaderboards, sub-zone top lists, uploaders or links: plays, likes, coins, favourites, shares, danmaku and comment counts, tags and engagement rate. Creators, comments and danmaku stats too. $0.95 per 1,000 rows on the free plan.",
    "version": "0.1",
    "x-build-id": "BEvbVbgMQp0C2lHeN"
  },
  "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",
              "search",
              "creators",
              "creatorSearch",
              "hotSearch",
              "suggestions",
              "links"
            ],
            "type": "string",
            "description": "Each run does one of these. A run with nothing picked returns one sample row and charges nothing. Creator rows, hot-search terms and suggestions are each charged like one video."
          },
          "searchKeywords": {
            "title": "Search keywords",
            "maxItems": 50,
            "type": "array",
            "description": "For Keyword search, Find creators by keyword and Search suggestions. One page of results per keyword: about 20 videos, or 20 creators. Keyword search can read more pages with Pages per keyword. Repeats across keywords are left out free.",
            "items": {
              "type": "string"
            }
          },
          "maxSearchPages": {
            "title": "Pages per keyword",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Keyword search only. How many pages of results to read for each keyword, about 20 videos a page, up to 50. 1 reads the first page only. A keyword stops early when a page brings nothing new or can't be read, and Maximum videos still caps the run. Each video returned is one charge; repeats are left out free.",
            "default": 1
          },
          "maxVideos": {
            "title": "Maximum videos",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The most rows one run returns, for every choice except Comments: videos, or creator rows, hot-search terms and suggestions for those choices. The popular list holds about 650 videos and a leaderboard 100. Each row 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."
          },
          "subZones": {
            "title": "More sub-zones for the keyword",
            "type": "array",
            "description": "Optional, for Top videos in a sub-zone with a Keyword: also look for the keyword in these sub-zones, one list of up to 100 each.",
            "items": {
              "type": "string",
              "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"
              ],
              "enumTitles": [
                "Animation: MAD·AMV",
                "Animation: MMD·3D",
                "Animation: 综合",
                "Animation: 同人·手书",
                "Animation: 特摄",
                "Animation: 模玩·周边",
                "Animation: 动漫杂谈",
                "Animation: 配音",
                "Anime series: 完结动画",
                "Anime series: 连载动画",
                "Anime series: 资讯",
                "Anime series: 官方延伸",
                "Chinese animation: 国产动画",
                "Chinese animation: 国产原创相关",
                "Chinese animation: 布袋戏",
                "Chinese animation: 资讯",
                "Chinese animation: 动态漫·广播剧",
                "Music: 原创音乐",
                "Music: 音乐现场",
                "Music: VOCALOID·UTAU",
                "Music: 翻唱",
                "Music: 演奏",
                "Music: 音乐综合",
                "Music: MV",
                "Music: 乐评盘点",
                "Music: 音乐教学",
                "Music: AI音乐",
                "Music: 音乐粉丝饭拍",
                "Music: 电台",
                "Dance: 宅舞",
                "Dance: 舞蹈综合",
                "Dance: 舞蹈教程",
                "Dance: 街舞",
                "Dance: 明星舞蹈",
                "Dance: 国风舞蹈",
                "Dance: 颜值·网红舞",
                "Gaming: 单机游戏",
                "Gaming: Mugen",
                "Gaming: 网络游戏",
                "Gaming: GMV",
                "Gaming: 音游",
                "Gaming: 电子竞技",
                "Gaming: 手机游戏",
                "Gaming: 桌游棋牌",
                "Knowledge: 野生技能协会",
                "Knowledge: 社科·法律·心理",
                "Knowledge: 科学科普",
                "Knowledge: 财经商业",
                "Knowledge: 校园学习",
                "Knowledge: 职业职场",
                "Knowledge: 人文历史",
                "Knowledge: 设计·创意",
                "Tech: 数码",
                "Tech: 软件应用",
                "Tech: 计算机技术",
                "Tech: 科工机械",
                "Tech: 极客DIY",
                "Sports: 健身",
                "Sports: 篮球",
                "Sports: 竞技体育",
                "Sports: 运动文化",
                "Sports: 运动综合",
                "Sports: 足球",
                "Cars: 汽车生活",
                "Cars: 购车攻略",
                "Cars: 摩托车",
                "Cars: 赛车",
                "Cars: 改装玩车",
                "Cars: 新能源车",
                "Cars: 房车",
                "Cars: 汽车知识科普",
                "Life: 日常",
                "Life: 搞笑",
                "Life: 手工",
                "Life: 绘画",
                "Life: 家居房产",
                "Life: 出行",
                "Life: 三农",
                "Life: 亲子",
                "Food: 美食制作",
                "Food: 美食侦探",
                "Food: 美食测评",
                "Food: 田园美食",
                "Food: 美食记录",
                "Animals: 动物综合",
                "Animals: 喵星人",
                "Animals: 汪星人",
                "Animals: 动物二创",
                "Animals: 野生动物",
                "Animals: 小宠异宠",
                "Kichiku (remix): 鬼畜调教",
                "Kichiku (remix): 音MAD",
                "Kichiku (remix): 人力VOCALOID",
                "Kichiku (remix): 教程演示",
                "Kichiku (remix): 鬼畜剧场",
                "Fashion: 美妆护肤",
                "Fashion: 穿搭",
                "Fashion: 时尚潮流",
                "Fashion: 仿妆cos",
                "News: 热点",
                "News: 环球",
                "News: 社会",
                "News: 综合",
                "Entertainment: 综艺",
                "Entertainment: 明星综合",
                "Entertainment: 娱乐杂谈",
                "Entertainment: 娱乐粉丝创作",
                "Entertainment: CP安利",
                "Entertainment: 颜值安利",
                "Entertainment: 娱乐资讯",
                "Film and TV talk: 小剧场",
                "Film and TV talk: 影视杂谈",
                "Film and TV talk: 影视剪辑",
                "Film and TV talk: 预告·资讯",
                "Film and TV talk: 短片",
                "Film and TV talk: AI影像",
                "Film and TV talk: 影视整活",
                "Film and TV talk: 影视综合",
                "Documentary: 人文·历史",
                "Documentary: 科学·探索·自然",
                "Documentary: 军事",
                "Documentary: 社会·美食·旅行",
                "Movies: 其他国家",
                "Movies: 欧美电影",
                "Movies: 华语电影",
                "TV series: 国产剧",
                "TV series: 海外剧"
              ]
            }
          },
          "allSubZones": {
            "title": "Keyword in every sub-zone",
            "type": "boolean",
            "description": "For Top videos in a sub-zone with a Keyword: look in all 127 sub-zones, one list each. Maximum videos still caps the run.",
            "default": false
          },
          "publishedFrom": {
            "title": "Published from",
            "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. A Beijing date like 2026-09-01, a time like 2026-09-01 14:00 (Beijing), or how long ago, like 3 months or 2 weeks."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "The last publish day or time, Beijing time, written the same ways. Leave it empty to go up to now."
          },
          "uploaders": {
            "title": "Uploaders",
            "maxItems": 100,
            "type": "array",
            "description": "For Uploaders' videos and Creator profiles. 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"
            }
          },
          "links": {
            "title": "Links",
            "maxItems": 1100,
            "type": "array",
            "description": "For Any Bilibili links. Paste video links (or BV ids, av numbers, b23.tv links), uploaders' space links, or zone and leaderboard pages; each is read the way its type needs.",
            "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, and for Include comments on the videos found: also return the replies under each comment, as rows of their own. They count toward the per-video maximum.",
            "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
          },
          "minDurationSec": {
            "title": "Shortest length (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Optional, for every video choice: leave out videos shorter than this. Left-out videos are not charged. If it keeps fewer than 2 of the first 100 videos, the run stops with a free row saying so."
          },
          "maxDurationSec": {
            "title": "Longest length (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Optional, for every video choice: leave out videos longer than this, free."
          },
          "includeComments": {
            "title": "Include comments on the videos found",
            "type": "boolean",
            "description": "For every video choice: also return the top comments under each video the run returns, as comment rows. Each comment is one comment charge.",
            "default": false
          },
          "maxCommentsPerFoundVideo": {
            "title": "Comments per video found",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "With Include comments: the most comments for each video. Include replies counts toward it.",
            "default": 20
          },
          "addCreatorRows": {
            "title": "Add a creator row for each uploader",
            "type": "boolean",
            "description": "For every video choice: also return one creator row (followers, following, videos, total likes, level, verification, bio) for each uploader of the videos returned. Each creator row is charged like one video.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Only new videos since the last run",
            "type": "boolean",
            "description": "For every video choice: leave out videos an earlier run with the same State name already returned. Left-out videos are not charged. The list is kept in your account's storage and holds the last 25,000 or so videos.",
            "default": false
          },
          "stateName": {
            "title": "State name",
            "type": "string",
            "description": "With Only new videos: one name per thing you follow, so two schedules don't share a memory. Letters, numbers, - and _.",
            "default": "default"
          },
          "includeDanmaku": {
            "title": "Add danmaku stats",
            "type": "boolean",
            "description": "For every video choice: add danmakuStats to each video, from the danmaku Bilibili serves for it: how many, per minute, the busiest minute, how many people sent them, and the most repeated texts. One extra lookup per video, no extra charge.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}