{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper: Videos, Comments, Danmaku, Trends · $0.07/1K",
    "description": "Bilibili without login: search videos and users (date range, Chinese brand names), whole channels, video stats with comments and replies, every danmaku with its second, danmaku reaction profiles, category rankings and Chinese sentiment. From $0.07 per 1,000 videos.",
    "version": "1.0",
    "x-build-id": "jpCTRCewAwGeV21gt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pomlabs~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pomlabs-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/pomlabs~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pomlabs-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/pomlabs~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pomlabs-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": {
          "queries": {
            "title": "Queries",
            "type": "array",
            "description": "One per line: a keyword (searched in videos, or users with Search type), a channel link (https://space.bilibili.com/546195) or uid:546195, a video link or BV id (BV1izyiztEqo), or the word popular (trending now; pick a Category for its ranking). Up to 20. The input names of other Bilibili scrapers work too (searchQueries, searchTerms, videoUrls, userIds).",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "video_comments",
              "user_profile",
              "danmaku",
              "popular",
              "transcript"
            ],
            "type": "string",
            "description": "Optional shortcut. Search reads Queries as usual; Comments returns only the comments of the videos; Channel profile returns only the profile of channel queries; Danmaku returns every bullet comment; Popular returns the trending list or the Category ranking.",
            "default": "search"
          },
          "maxResults": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "1 to 5,000 videos per query. Past Bilibili's 1,000-result search cap the search is re-asked in date windows (newest first) to go further; a channel gives all its videos.",
            "default": 40
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "videos",
              "users"
            ],
            "type": "string",
            "description": "What keyword queries search: videos or users (channels).",
            "default": "videos"
          },
          "order": {
            "title": "Sort videos by",
            "enum": [
              "relevance",
              "views",
              "newest",
              "danmaku",
              "favorites",
              "comments"
            ],
            "type": "string",
            "description": "Order of the video search results.",
            "default": "relevance"
          },
          "duration": {
            "title": "Video length",
            "enum": [
              "any",
              "under10",
              "10to30",
              "30to60",
              "over60"
            ],
            "type": "string",
            "description": "Only videos of this length (video search).",
            "default": "any"
          },
          "onlyPostsAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Only videos published after this date (2026-11-01) or within a period (7 days, 3 months, 1 year). Works on search and channel queries."
          },
          "onlyPostsBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Only videos published before this date (2026-11-20)."
          },
          "autoLocalize": {
            "title": "Also search the Chinese name of brands",
            "type": "boolean",
            "description": "Bilibili users write brands in Chinese: with this on, a Latin brand keyword (nike, starbucks, tesla, pop mart...) is also searched by its Chinese name (耐克, 星巴克, 特斯拉, 泡泡玛特) and the results are merged.",
            "default": true
          },
          "searchAliases": {
            "title": "Extra names to search",
            "type": "array",
            "description": "Other names searched together with each keyword and merged (no duplicates), e.g. a product's Chinese nickname.",
            "items": {
              "type": "string"
            }
          },
          "channelKeyword": {
            "title": "Keyword inside channels",
            "type": "string",
            "description": "For channel queries: only the channel's videos that match this keyword."
          },
          "category": {
            "title": "Category (for popular)",
            "enum": [
              "",
              "all",
              "animation",
              "anime",
              "music",
              "dance",
              "game",
              "knowledge",
              "tech",
              "sports",
              "car",
              "life",
              "food",
              "animal",
              "fashion",
              "entertainment",
              "movies",
              "kichiku",
              "guochuang"
            ],
            "type": "string",
            "description": "With the query popular (or Mode Popular): Bilibili's top 100 ranking of this category instead of the general popular list.",
            "default": ""
          },
          "includeComments": {
            "title": "Top comments for video links",
            "type": "boolean",
            "description": "For video queries: also return the top comments (Bilibili shows visitors the pinned and hottest ones).",
            "default": false
          },
          "sortComments": {
            "title": "Comment order",
            "enum": [
              "hot",
              "time",
              "likes",
              "all"
            ],
            "type": "string",
            "description": "Popular (Bilibili's own hot ranking, default), newest first, by likes, or both lists merged.",
            "default": "hot"
          },
          "maxComments": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "1 to 1,000 comment rows per video (top comments plus their replies). Paged through Bilibili's popular or newest list, 36 top comments a page.",
            "default": 20
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Each top comment's replies as their own rows (rootId, isThreadReply), up to 20 per thread.",
            "default": false
          },
          "includeSubtitles": {
            "title": "Transcript (subtitles)",
            "type": "boolean",
            "description": "The video's subtitles as a transcript row: the uploader's and Bilibili's AI subtitles (Chinese speech and its AI English translation on most videos), full text plus each line with its start and end second.",
            "default": false
          },
          "subtitleLanguages": {
            "title": "Subtitle languages",
            "type": "array",
            "description": "Only these languages (zh, en, ja...). Empty: all the video has.",
            "items": {
              "type": "string"
            }
          },
          "includeDanmaku": {
            "title": "Danmaku profile",
            "type": "boolean",
            "description": "One row per video describing the bullet comments (弹幕): count, unique senders, per-minute timeline, peak minute, first and last, phrases repeated most and a sample.",
            "default": false
          },
          "danmakuSampleSize": {
            "title": "Danmaku sample size",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "How many danmaku, spread along the video, go in the profile's sample (0 to 500).",
            "default": 25
          },
          "includeDanmakuRows": {
            "title": "Every danmaku as a row",
            "type": "boolean",
            "description": "Each bullet comment as its own row: text, the second of the video it appears at, color, mode, font size, pool, send time, sender hash, weight.",
            "default": false
          },
          "maxDanmakuPerVideo": {
            "title": "Max danmaku rows per video",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Cap of danmaku rows per video.",
            "default": 5000
          },
          "danmakuMaxParts": {
            "title": "Danmaku: parts per video",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Multi-part videos (P1, P2...) keep danmaku per part: how many parts, from the first, are read for the profile and the rows.",
            "default": 3
          },
          "startSec": {
            "title": "Danmaku from second",
            "minimum": 0,
            "type": "integer",
            "description": "Danmaku rows: only from this second of the video."
          },
          "endSec": {
            "title": "Danmaku up to second",
            "minimum": 0,
            "type": "integer",
            "description": "Danmaku rows: only up to this second of the video."
          },
          "danmakuKeywords": {
            "title": "Danmaku words",
            "type": "array",
            "description": "Danmaku rows: only those containing one of these words.",
            "items": {
              "type": "string"
            }
          },
          "sentimentAnalysis": {
            "title": "Chinese sentiment",
            "type": "boolean",
            "description": "A sentiment score (-1 to 1) and polarity on each video's title and description, each comment and the danmaku profile, by SnowNLP, a Chinese model, at no extra cost.",
            "default": false
          },
          "deltaMode": {
            "title": "Only new videos (delta mode)",
            "type": "boolean",
            "description": "Return only videos this account has not received in earlier runs with the same State key (kept 30 days). For schedules.",
            "default": false
          },
          "deltaStateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name of the delta-mode memory, so different schedules do not mix (default: default)."
          },
          "followUpComments": {
            "title": "Follow-up comments",
            "type": "boolean",
            "description": "With delta mode and comments: once, between 1 and 7 days after a video was delivered, re-read it and return only the comments posted since (isFollowUp true).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}