JP

Bilibili Video Stats Scraper

Collect Bilibili (bilibili.com) video stats by keyword search or by video link: views, likes, coins, favorites, shares, danmaku, comments, duration, category, uploader and more

開発者
過去 30 日間の成功率
—
最終更新
2026-11-27

概要

Give it a keyword, or a batch of video links, and it pulls the matching Bilibili videos into one performance table: title, views, likes, coins, favorites, shares, danmaku, comments, duration, category, publish date and uploader.

For content operators and topic researchers the slow part is rarely the judgement - it is copying views, likes and favorites off one video page after another into a spreadsheet. This app turns that step into a single run: give it a keyword and it walks the on-site search ranking, give it links and it fetches exactly those.

Filling in the input

By keyword: set Collection mode to Keyword search, enter a term (for example 猫咪), and use Max results to control how many rows you get. This is the default mode.

By video link: set Collection mode to Video links, then put a JSON array in the Video links field. Copy this and edit it:

["https://www.bilibili.com/video/BV17x411w7KC", "BV1jFUkBPEZA"]

For more addresses, separate them with commas and quote each one. All of these forms are accepted:

FormatExample
Full linkhttps://www.bilibili.com/video/BV17x411w7KC
Mobile linkhttps://m.bilibili.com/video/BV17x411w7KC
Bare BV ID (any case)BV1jFUkBPEZA, bv1jFUkBPEZA
av number or bare numeric aidav170001, 170001
Short linkhttps://b23.tv/BV17x411w7KC
Whole pasted share message【some video】 https://b23.tv/BV17x411w7KC

If a run reports start_urls: '...' is not of type 'array', the field holds plain text - add the square brackets and quotes as shown above.

Two things to know: running with nothing filled in searches cat and returns 50 rows by default, so it really does spend money; and asking for 1000 rows usually yields just over 900. The reason is below.

About the data

One record per video, deduplicated on the BV ID, so re-running the same input never produces duplicate rows. Both collection modes land in the same table and differ only in the source columns: Matched keyword and Search rank have values only in keyword search, while link collection leaves the first empty and sets the second to -1.

In keyword search the app keeps paging until it has enough rows for Max results rather than stopping after a fixed number of pages, because adjacent search pages frequently repeat the same video and a fixed page count would come up short after dedupe. That dedupe is also why Search rank skips numbers (asking for 100 rows may reach rank 119): those are the videos' real positions in the results, not missed rows. Site search pages out at 50, which is why 1000 usually returns just over 900; a keyword with fewer results than requested also comes up short, and both cases are stated in the log.

Views, likes, coins, favorites, shares, danmaku and comments are all cumulative values as of the scrape and move with a video's popularity. To compare trends, re-run the same input a few days later and use Fetched at to separate batches. Duration is normalised to seconds. Publish date and fetch time are both UTC, so reading them as Beijing time is 8 hours off.

The on-site search endpoint does not return coins or shares, so those columns are filled from the video detail call; when a detail call fails the value is -1, meaning "not retrieved" rather than zero. Likes and comments follow the same convention.

Shares come straight from the raw value in Bilibili's detail endpoint and reflect the platform's own definition (it appears to count off-platform forwards), so some videos show eight-figure numbers. That is the raw data Bilibili returns, not a parsing error - if you reconcile against another tool, a mismatch on this column is expected.

Category is filled in both modes where possible: keyword search takes the category name from site search, while link collection gets only a category ID from the detail endpoint, so the app reverse-looks it up from related videos in the same category. That covers the vast majority; the rare gaps (no related video in that category) stay empty, and Tags can stand in for judging content type. Listing the same video by both BV and av produces a single row.

Follower-only, deleted, removed and paywalled videos cannot be fetched; they are skipped and logged without affecting the rest of the batch. The comment column gives a count only, never the text, and danmaku likewise gives only a count.

What the results look like

Each record is a snapshot of one video's performance at scrape time.

Video titleViewsLikesFavoritesDanmakuUploader
给我家猫咪看的动画149211611818129021569猫老大的世界
【MV】保加利亚妖王AZIS视频合辑45851017943944876717915703冰封.虾子

Beyond this table the output carries coins, shares, comments, duration, thumbnail, category, publish date, uploader ID and avatar, video URL, matched keyword, search rank, tags and part count.

Use cases

Topic research: search a batch of videos by keyword, group views by category, and see which content type takes off under that topic; combine with duration to learn whether short punchy clips or long videos win.

Engagement quality: compute likes, coins and favorites against views. Videos with a high coin and favorite ratio are strongly endorsed by the audience, which is closer to real sentiment than raw views.

Ranking tracking: run the same keyword every few days and watch search rank against views to see which video is climbing; publish date helps you discount the natural accumulation of older videos.

Uploader review: group a batch by uploader name to see how many videos each account produced on the topic and what their average views look like.

入力

この App の呼び出しに必要なパラメータです。

  • Collection modemode必須string(enum)
    Search videos by keyword, or collect specific video links. search reads Search keyword; url reads Video links
    選択可能な値Keyword searchsearchVideo linksurlデフォルトsearch
  • Search keywordquery任意string
    Search this term on Bilibili and take the results in relevance order. Chinese, English and space-separated terms all work; only used in keyword search mode
    デフォルトcat
  • Video linksstart_urls任意array<string>
    Video addresses to collect. Must be a JSON array such as ["https://www.bilibili.com/video/BV17x411w7KC"]; several addresses become ["url1", "url2"]. Accepted: full links, m.bilibili.com mobile links, bare BV IDs (any case), av numbers or bare numeric aid, b23.tv short links, and even a whole share message pasted from the app; a ?p= part link collects the whole video. If you see "is not of type 'array'", the field holds plain text - add the brackets and quotes. Only used in video link mode
    件数最大 1000 件例["https://www.bilibili.com/video/BV17x411w7KC"]
  • Max resultsmax_results任意integer
    Maximum videos returned in keyword search mode, taken in rank order. Actual output can fall short: site search pages out at 50, and adjacent pages repeat the same video (duplicates are removed), so asking for 1000 usually yields just over 900. In video link mode the number of links decides the row count and this setting is ignored
    範囲1–1000デフォルト50

出力

1 件のレコードのフィールド構成です。

  • BV IDbvidstring
    Bilibili BV identifier of the video; stable per video and used as the dedupe key
    例BV1jFUkBPEZA
  • av numberaidinteger
    Legacy numeric video ID (aid); equivalent to the BV identifier
    例115603541137064
  • Video titletitlestring
    Raw video title with the search-result keyword highlight tags stripped
    例Animation for my cat
  • Video descriptiondescriptionstring
    Video description written by the uploader; may be empty

料金

Per record

正常に返されたレコードの件数に応じて課金されます。失敗した実行には課金されません。

$0.00015/ 件

複数の課金イベントはそれぞれ独立して累計されます。詳細は各項目をご覧ください。失敗した実行には課金されません。

Credits を確認

今すぐ実行

入力したパラメータで実際に 1 回実行し、料金に従って課金されます。

入力パラメータ

連携方法

MCP を使えば、Claude や Cursor などの AI クライアントからこの Data App を直接呼び出せます。

Octoparse Data Hub に接続済みですか?チャットでそのまま使えます

追加の設定は不要です。次の一文をコピーして AI に送り、続けてやりたいことを書いてください:

「llx/bilibili-video-scraper」という Data App を使って、この Data App でやりたいことをここに書いてください。

まだ接続していませんか?以下のいずれかの方法で一度設定すれば、以降はすべての Data App をそのまま使えます。

クライアント設定

YOUR_API_KEY をご自身の API Key に置き換えてください。あらゆるクライアント、CI、ヘッドレス環境で利用できます。API Key を取得 →

mcpServers config
{
  "mcpServers": {
    "octoparse_datahub": {
      "type": "http",
      "url": "https://mcp-v2.octoparse.com",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}

AI に設定を任せる

設定を手作業で編集したくない場合は、インストールプロンプトをコピーして任意の AI クライアントに貼り付けてください。AI が自分のやり方でセットアップを完了します(デフォルトではログインを案内し、API Key をチャットに送るよう求めることはありません)。

注意事項

適用範囲

Only public Bilibili video display and engagement data; no user privacy data, no video file downloads, no comment text

適さない用途

  • You need comment text, danmaku text or user profiles - this app returns counts only, not content
  • You need to download video or audio files
  • You need data on private, follower-only or removed videos

実行とキャンセル

この App は非同期で実行され、途中でキャンセルできます。キャンセル前に返された結果は保持され、通常どおり課金されます。

失敗時の処理

MCP で接続すると、AI が以下の説明を自動で読み取ります。API や SDK で接続する場合は、コードでこのとおりに処理してください。

  1. 1An upstream HTTP 412 or code -412 means the egress IP is being risk-controlled; switch egress IP or retry later
  2. 2A video that was deleted or became invisible is skipped and logged without affecting other rows
  3. 3Rows collected before a block are kept, so the run does not fail as a whole

よくある質問

料金はどのように課金されますか?

1 件あたり $0.00015 / 件。失敗した実行は課金されません。料金を見る →

1 回でどれくらい収集できますか?制限はありますか?

Only public Bilibili video display and engagement data; no user privacy data, no video file downloads, no comment text注意事項を見る →

AI アシスタントやエージェントで使えますか?

はい。Octoparse Data Hub を一度接続すれば、チャットで名前を指定してすべての Data App を呼び出せます(llx/bilibili-video-scraper も含みます)。連携方法を見る →

$0.00015 / 件