Bilibili Video Search, Ranking & Metadata Scraper avatar

Bilibili Video Search, Ranking & Metadata Scraper

Pricing

from $0.49 / 1,000 results

Go to Apify Store
Bilibili Video Search, Ranking & Metadata Scraper

Bilibili Video Search, Ranking & Metadata Scraper

Search Bilibili videos by keyword, look up specific videos by URL or ID, or pull the popular feed and partition ranking charts, with view, like and danmaku counts.

Pricing

from $0.49 / 1,000 results

Rating

0.0

(0)

Developer

Nimbryxo-studio

Nimbryxo-studio

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

Bilibili is one of China's largest video platforms, and this actor reads its public video data four ways: keyword search, direct lookup by video URL/BV ID/AV ID, the site-wide popular feed, or a partition's ranking chart.

What this actor does

  • Switches between four modes via mode: search, byVideoUrl, popular, and ranking.
  • Searches by keyword with sort order (total rank, most viewed, newest, most danmaku, rating score), a partition filter, and a duration-range filter.
  • Fetches specific videos directly by full URL, bare BV ID, or numeric AV ID.
  • Pulls the site's popular feed or one of 15 ranking charts (site-wide plus 14 partitions such as anime, music, game and food).
  • Filters results in every mode by minimum view count or a title/description/author keyword.
  • Omits any field a given video doesn't have, so which fields appear depends on the mode (see the notes under the table).

Output per video

FieldDescription
bvidBilibili's BV-format video ID.
aidBilibili's numeric video ID (AV ID).
titleVideo title, with search-highlight markup stripped.
descriptionVideo description.
authorUploader's display name.
authorMidUploader's numeric member ID.
viewCountTotal play count.
danmakuDanmaku (bullet comment) count.
replyCountComment count.
favoritesFavorite/collection count.
likeCountLike count.
coinCountCoin count (Bilibili's tipping currency).
shareCountShare count.
durationVideo length in seconds.
durationTextVideo length formatted as H:MM:SS.
coverUrlCover image URL.
publishTimePublish timestamp, UTC ISO format.
publishDatePublish date (YYYY-MM-DD), only on reduced search records (see below).
typeNamePartition/category label.
uploadRegionUploader's declared location, when published.
pageCountNumber of parts, on multi-part uploads only (not in search mode).
resolutionVideo resolution (e.g. 1920x1080), when available (not in search mode).
tagsUp to 15 tags attached to the video (search mode only).
videoUrlCanonical URL of the video on bilibili.com.
sourceUrlThe page or chart the record was read from (the video page in search mode, the popular/ranking chart or lookup request in other modes).
recordType"video" for a normal record, "error" for an error record (see below).
scrapedAtUTC timestamp of when the record was scraped.

If Bilibili's regular search results can't be loaded for a page, the actor reads the public search page instead. Those reduced search records carry only bvid, videoUrl, title, author, publishDate, coverUrl, viewCount, danmaku, duration and durationText, and the order, tids and duration filters are not applied to them.

Error records

The dataset can also contain records with recordType: "error", written at the end of the run and not counted toward maxItems. They have errorType (invalid_input, not_found or fetch_error), message, sourceUrl (the input or request that failed) and scrapedAt. They appear for an unresolvable video URL or BV ID, a video that can't be found, an empty search query, missing lookup inputs, or a search/popular/ranking request that fails.

Input

FieldTypeDefaultDescription
modeString (select)searchsearch, byVideoUrl, popular, or ranking.
searchQueryStringpythonKeyword to search. Used in search mode; an empty query produces an invalid_input error record.
videoUrlsList of strings[]Bilibili video URLs (https://www.bilibili.com/video/BV...). Used in byVideoUrl mode. The URL must contain a BV ID; b23.tv short links and av-style URLs come back as error records.
bvidsList of strings[]Bare BV IDs. Used in byVideoUrl mode.
aidsList of strings[]Numeric video IDs (AV IDs). Used in byVideoUrl mode; non-numeric entries are skipped.
ridString (select)0Ranking partition (15 options, e.g. anime, music, game). Used in ranking mode.
orderString (select)totalrankSearch sort: totalrank, click, pubdate, danmaku, or scores. Used in search mode.
tidsString (select)0Restrict search results to one partition. Used in search mode.
durationString (select)0Restrict search results by length: all, under 10 min, 10-30 min, 30-60 min, over 60 min. Used in search mode.
minViewCountInteger–Drop videos with fewer views than this (videos without a view count are dropped too). Applies to every mode.
containsKeywordString–Only keep videos whose title, description, or author contains this substring (case-insensitive). Applies to every mode.
maxItemsInteger20Maximum video records to return (1–500). search and popular read at most 10 result pages and ranking reads one chart, so the real ceiling can be lower.

Example: most-viewed Python tutorials

{
"mode": "search",
"searchQuery": "python",
"order": "click",
"minViewCount": 100000,
"maxItems": 15
}

Example: 30-60 minute food videos from the food partition

{
"mode": "search",
"searchQuery": "美食",
"tids": "211",
"duration": "3",
"maxItems": 10
}

Example: a specific video by URL

{
"mode": "byVideoUrl",
"videoUrls": ["https://www.bilibili.com/video/BV1wD4y1o7AS/"]
}

Example: music partition ranking chart

{
"mode": "ranking",
"rid": "3",
"maxItems": 20
}

Use cases

  • Creator discovery — search a niche keyword to find active uploaders and their typical view counts.
  • Trend tracking — pull a partition's ranking chart on a schedule to see which content is climbing.
  • Content research — compare titles, durations and engagement across the videos a keyword surfaces.
  • Catalog lookups — resolve a known list of BV IDs or video links into full metadata in one run.
  • Category benchmarking — compare average view/like/danmaku counts across different partitions via ranking.

FAQ

Do I need a Bilibili account? No. Every mode reads public video data only.

What's the difference between tids in search mode and rid in ranking mode? They use the same partition ID list, but tids narrows a keyword search to one partition while rid selects which partition's ranking chart to fetch — ranking mode has no keyword at all.

Why is tags only present on search-mode records? Bilibili's search results API returns tags directly on each result; the popular, ranking and direct-video lookups don't expose that field on the same payload.

Why do I get fewer videos than maxItems? Search and the popular feed stop after 10 result pages, a ranking chart is a single fixed list, and minViewCount/containsKeyword drop records after they are fetched. Any of these can leave you below the cap.

What happens if I pass an invalid BV ID or URL? That entry produces a record with recordType: "error" instead of being silently dropped, so you can see exactly which inputs failed. Non-numeric aids entries are the exception: they are skipped without an error record.

Why do some search records have publishDate instead of publishTime? Those are the reduced search records read from Bilibili's public search page when the regular results can't be loaded; that page only shows a calendar date. Every other video record carries the full publishTime timestamp when Bilibili provides one.

Can I fetch a specific uploader's full video list? No, not in this version — only search, direct video lookup, popular feed, and partition rankings are supported.

Is this affiliated with Bilibili? No. This is an independent tool and is not affiliated with, endorsed by, or sponsored by Bilibili or its operators.