{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper — Videos, Comments, Danmaku & Creator Uploads",
    "description": "Scrape Bilibili videos, comments with replies, danmaku (bullet comments), creator uploads, profiles, rankings and trending searches. Search in Chinese or English, get danmaku analytics and creator engagement stats as clean JSON. No account or cookie needed.",
    "version": "1.0",
    "x-build-id": "bZ1raSZnDGpujWUPK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/insights_data~bilibili-scraper-videos-comments-danmaku-creator-uploads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-insights_data-bilibili-scraper-videos-comments-danmaku-creator-uploads",
        "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/insights_data~bilibili-scraper-videos-comments-danmaku-creator-uploads/runs": {
      "post": {
        "operationId": "runs-sync-insights_data-bilibili-scraper-videos-comments-danmaku-creator-uploads",
        "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/insights_data~bilibili-scraper-videos-comments-danmaku-creator-uploads/run-sync": {
      "post": {
        "operationId": "run-sync-insights_data-bilibili-scraper-videos-comments-danmaku-creator-uploads",
        "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": {
          "urls": {
            "title": "🔗 Bilibili links & IDs (bulk)",
            "type": "array",
            "description": "One entry per line. Accepted: video links (www.bilibili.com/video/BV…, ?p=2 for a part, m.bilibili.com, b23.tv short links), BV or av IDs (a bare number is read as an av video ID), creator space links (space.bilibili.com/123456, m.bilibili.com/space/123456) or UID:123456, search pages (search.bilibili.com/all?keyword=…), chart pages (www.bilibili.com/v/popular/all, /v/popular/weekly, /v/popular/history, /v/popular/rank/game) and chart names (popular, weekly, weekly:300, precious, ranking, ranking:game, trending). Plain text that is not a link is searched as a keyword. Free plan users are limited to 10 items per run; paid plans have no limit. Every row counts toward the 10 (videos, comments, replies, danmaku, creators, posts, trending).",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "🔍 Search keywords",
            "type": "array",
            "description": "Keywords to search on Bilibili, in Chinese (原神) or English. Each keyword returns up to Max results per source.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "🧭 Search for",
            "enum": [
              "video",
              "creator"
            ],
            "type": "string",
            "description": "Videos: each keyword returns matching videos. Creators: each keyword finds matching creators (KOL discovery); their uploads and profile rows are then collected like creator links.",
            "default": "video"
          },
          "charts": {
            "title": "🏆 Charts & trending boards",
            "type": "array",
            "description": "Popular now, Weekly picks (latest issue, or weekly:<issue number>), Must-watch (precious), Ranking (all site, or ranking:<category> such as ranking:game, ranking:music, ranking:knowledge, ranking:origin, ranking:rookie) and Trending searches (one row per hot keyword). You can also type your own value, e.g. weekly:300.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "popular",
                "weekly",
                "precious",
                "ranking",
                "ranking:game",
                "ranking:music",
                "ranking:knowledge",
                "ranking:tech",
                "ranking:douga",
                "ranking:dance",
                "ranking:food",
                "ranking:origin",
                "ranking:rookie",
                "trending"
              ],
              "enumTitles": [
                "Popular now",
                "Weekly picks (latest issue)",
                "Must-watch (precious)",
                "Ranking — all site",
                "Ranking — gaming",
                "Ranking — music",
                "Ranking — knowledge",
                "Ranking — tech",
                "Ranking — animation",
                "Ranking — dance",
                "Ranking — food",
                "Ranking — originals",
                "Ranking — new creators",
                "Trending searches"
              ]
            }
          },
          "maxResults": {
            "title": "🔢 Max results per source",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many videos each source returns: per search keyword, per chart, and how many creators a creator search returns. Free plan users are limited to 10 items per run; paid plans have no limit. The 10 count all rows of the run together, not each source.",
            "default": 10
          },
          "sortOrder": {
            "title": "🔃 Sort search results by",
            "enum": [
              "totalrank",
              "click",
              "pubdate",
              "dm",
              "stow",
              "scores"
            ],
            "type": "string",
            "description": "Order of search results.",
            "default": "totalrank"
          },
          "durationFilter": {
            "title": "⌛ Video length",
            "enum": [
              "any",
              "under10",
              "10to30",
              "30to60",
              "over60"
            ],
            "type": "string",
            "description": "Only videos of this length.",
            "default": "any"
          },
          "categoryId": {
            "title": "🔖 Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Limit search to one Bilibili category by its classic category id (e.g. 172 = mobile games, 17 = single-player games, 36 = knowledge). 0 = all categories.",
            "default": 0
          },
          "publishedAfter": {
            "title": "📅 Published after",
            "type": "string",
            "description": "Only videos published on or after this date. Pick an absolute date (e.g. 2026-01-01, start of that day in UTC) or a relative one counted from the run start (e.g. 7 days, 2 weeks, 3 months ago). Leave empty for no limit."
          },
          "publishedBefore": {
            "title": "📆 Published before",
            "type": "string",
            "description": "Only videos published on or before this date. An absolute date includes that whole day (UTC); a relative date is counted from the run start (e.g. 1 day ago). Leave empty for no limit."
          },
          "deepSearch": {
            "title": "🔬 Deep search (past 1,000 results)",
            "type": "boolean",
            "description": "Bilibili stops one search at about 1,000 results. When on and you ask for more, the search is repeated over smaller date ranges (newest first) to reach your Max results.",
            "default": true
          },
          "maxVideosPerCreator": {
            "title": "📼 Max uploads per creator",
            "minimum": 1,
            "type": "integer",
            "description": "How many uploads to collect from each creator link or found creator. Free plan users are limited to 10 items per run; paid plans have no limit.",
            "default": 10
          },
          "creatorVideosSort": {
            "title": "📶 Creator uploads order",
            "enum": [
              "pubdate",
              "click",
              "stow"
            ],
            "type": "string",
            "description": "Order of a creator's uploads.",
            "default": "pubdate"
          },
          "includeCreatorProfile": {
            "title": "🪪 Add a profile row for every video author",
            "type": "boolean",
            "description": "Adds one creator row (followers, likes, level, verification, live room, average views and engagement of recent uploads) for the author of every collected video. Creator links and creator searches always get a profile row.",
            "default": false
          },
          "includeCreatorPosts": {
            "title": "📝 Include creator posts",
            "type": "boolean",
            "description": "Also collect each creator's posts (text, image and video posts from their activity feed) as separate rows.",
            "default": false
          },
          "maxPostsPerCreator": {
            "title": "🧾 Max posts per creator",
            "minimum": 1,
            "type": "integer",
            "description": "How many posts to collect per creator when Include creator posts is on. Free plan users are limited to 10 items per run; paid plans have no limit.",
            "default": 50
          },
          "fetchVideoDetails": {
            "title": "📺 Fetch full video details",
            "type": "boolean",
            "description": "Adds the full stats (coins, shares, favorites), tags, parts, honors, collection and author follower count to every video. Search and chart rows lack some of these without it. Video links always get full details.",
            "default": true
          },
          "includeRelated": {
            "title": "🧩 Include related videos",
            "type": "boolean",
            "description": "Adds the BV IDs of Bilibili's related videos to each video row (needs Fetch full video details).",
            "default": false
          },
          "includeSubtitles": {
            "title": "📜 Include subtitles",
            "type": "boolean",
            "description": "Adds the video's subtitles (creator CC or AI subtitles) to the video row. Bilibili only serves subtitles to logged-in users, so this needs your SESSDATA cookie below.",
            "default": false
          },
          "subtitleFormat": {
            "title": "🔤 Subtitle format",
            "enum": [
              "text",
              "segments"
            ],
            "type": "string",
            "description": "Plain text (one line per caption) or timed segments with start and end seconds.",
            "default": "text"
          },
          "cookie": {
            "title": "🍪 Bilibili login cookie (optional)",
            "type": "string",
            "description": "Optional. Your SESSDATA cookie value (or the full cookie string) from a logged-in browser: 1. Log in at bilibili.com. 2. Open DevTools > Application > Cookies > https://www.bilibili.com. 3. Copy the value of SESSDATA. Unlocks subtitles and the commenter IP location. Everything else works without it."
          },
          "includeComments": {
            "title": "💬 Include comments",
            "type": "boolean",
            "description": "Collects each video's comments as their own rows (type: comment) with text, likes, reply count, author, level and pinned flag. No login needed.",
            "default": false
          },
          "maxComments": {
            "title": "📊 Max comments per video",
            "minimum": 0,
            "type": "integer",
            "description": "Top-level comments per video. 0 = all comments. Comment rows count as items. Free plan users are limited to 10 items per run; paid plans have no limit.",
            "default": 5
          },
          "commentSort": {
            "title": "🔥 Sort comments by",
            "enum": [
              "hot",
              "time"
            ],
            "type": "string",
            "description": "Hottest comments first, or newest first.",
            "default": "hot"
          },
          "includeReplies": {
            "title": "🧵 Include replies",
            "type": "boolean",
            "description": "Also collects the replies under each comment as rows (type: reply, linked by rootId). Turns on Include comments automatically.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "💭 Max replies per comment",
            "minimum": 0,
            "type": "integer",
            "description": "Replies per top-level comment. 0 = all replies. Reply rows count as items. Free plan users are limited to 10 items per run; paid plans have no limit.",
            "default": 2
          },
          "danmakuMode": {
            "title": "🌊 Danmaku (bullet comments)",
            "enum": [
              "off",
              "stats",
              "full"
            ],
            "type": "string",
            "description": "Off. Profile: adds danmaku analytics to each video row — count, unique senders, per-minute rate, peak minute, per-minute timeline, top repeated phrases and an evenly spread sample. Profile + every danmaku: also one row per danmaku (type: danmaku) with its video time, text, color and send time. No login needed. Danmaku rows count as items. Free plan users are limited to 10 items per run; paid plans have no limit.",
            "default": "off"
          },
          "danmakuSampleSize": {
            "title": "🧪 Danmaku sample size",
            "minimum": 0,
            "type": "integer",
            "description": "How many danmaku texts, spread evenly across the video, go into the danmakuSample field of the video row.",
            "default": 10
          },
          "danmakuAllParts": {
            "title": "🎼 Every part of multi-part videos",
            "type": "boolean",
            "description": "For videos with several parts, read the danmaku of every part (rows only; the profile describes the requested part). Off = only the part in the link (part 1 by default).",
            "default": false
          },
          "danmakuMaxSegments": {
            "title": "🕒 Danmaku time limit (6-minute blocks)",
            "minimum": 1,
            "type": "integer",
            "description": "How far into each part danmaku are read, in 6-minute blocks. 20 = the first 2 hours.",
            "default": 10
          },
          "trackChanges": {
            "title": "📈 Track changes since the last run",
            "type": "boolean",
            "description": "Adds a changes object to each video row: view, like, coin, favorite, share, comment and danmaku growth since the last run that delivered the same video, plus views per hour. History is kept in your account under the Monitoring key.",
            "default": true
          },
          "deltaMode": {
            "title": "🆕 Only new videos",
            "type": "boolean",
            "description": "Each run returns only videos that earlier runs with the same Monitoring key did not deliver. Pair it with a schedule for a daily 'what is new' feed.",
            "default": false
          },
          "followUpComments": {
            "title": "🔔 Follow-up comments on earlier videos",
            "type": "boolean",
            "description": "Needs Only new videos and Include comments. Re-reads the comment threads of videos delivered by earlier runs and returns only comments posted since then (rows marked isFollowUp: true).",
            "default": false
          },
          "followUpDays": {
            "title": "📆 Follow-up window (days)",
            "minimum": 1,
            "type": "integer",
            "description": "Follow up on videos delivered within this many days.",
            "default": 7
          },
          "followUpMaxVideos": {
            "title": "🎯 Max follow-up videos",
            "minimum": 1,
            "type": "integer",
            "description": "At most this many earlier videos are re-read per run, newest delivered first.",
            "default": 10
          },
          "stateKey": {
            "title": "🔑 Monitoring key",
            "type": "string",
            "description": "Names the saved history so separate monitors do not mix (e.g. genshin-daily, game-ranking). Used by Only new videos, Track changes and Follow-up comments.",
            "default": "default"
          },
          "maxScanned": {
            "title": "🔎 Max results examined per source",
            "minimum": 0,
            "type": "integer",
            "description": "When filters reject many search results, stop after examining this many per source. 0 = no limit.",
            "default": 5000
          },
          "concurrency": {
            "title": "⚡ Videos in parallel",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many videos are processed at the same time (1–8).",
            "default": 3
          },
          "requestDelay": {
            "title": "🐢 Delay between requests (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Pause between requests, with random jitter added. Comments always use at least 0.9 s.",
            "default": 0.35
          },
          "maxRetries": {
            "title": "🔄 Retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How often a failed or limited request is retried before it is skipped.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Default: no proxy. If Bilibili blocks the requests, the run switches to a datacenter proxy, then to a residential proxy (with up to 3 fresh residential IPs), and stays on it for the rest of the run. Pick a proxy here to start with it.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}