Bilibili Scraper – Structured Public Data · Apify
Bilibili Video & Search Scraper avatar

Bilibili Video & Search Scraper

Pricing

from $2.00 / 1,000 bilibili video & search scrapers

Go to Apify Store
Bilibili Video & Search Scraper

Bilibili Video & Search Scraper

Collect public Bilibili video, comment, danmaku, and search data. Get dataset rows; searchVideo card play and danmaku counts derive from rounded labels and are approximate. Run an operation with an input; no account or API key. Free-plan pricing: $0.002 per row plus $0.00005 per Actor Start event.

Pricing

from $2.00 / 1,000 bilibili video & search scrapers

Rating

0.0

(0)

Developer

Vitalii Bondarev

Vitalii Bondarev

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

3 days ago

Last modified

Features

Limited permissions

Share

Bilibili Scraper

Scrape public video, creator, relation, comment, danmaku, subtitle, and keyword-search data from bilibili.com with one operation per run. Free plan pricing: $0.002 per dataset row plus $0.00005 per apify-actor-start event.

  • Search public video cards by keyword with titles, URLs, creators, counts, durations, and publication dates.
  • Collect creator profiles, relation statistics, and creator videos for creator research.
  • Extract comments and danmaku for audience-feedback analysis.
  • Collect video details and subtitle metadata for cataloging.
  • Run without signing in or an API key.

What you get

Each run uses one operation. Rows contain source-backed values and normalized aliases; unavailable fields are omitted.

Field familyFieldsTypeWhat it contains
Run metadata_operation, _fetchedAt, statusstring or ISO 8601 stringOperation, UTC time, and row status
Pagination and provenance_page, _sourceKeyword, _sourceAid, _sourceCidinteger or stringPage number and source IDs
Video identitytitle, url, videoTitle, videoDesc, bvid, aid, cidstringTitles, descriptions, IDs, and canonical URL
Video page assetsvideoPageUrl, coverUrlstringVideo and cover URLs
Timing and publicationdurationSec, durationStr, publishedAt, publishedDate, createdAtinteger or stringDuration and publication or creation values
Category and tagsvideoTypeId, videoTypeName, tagsinteger, string, or array of stringsCategories and page tags
Video metricsplayCount, playCountDisplay, likeCount, coinCount, favoriteCount, shareCount, commentCount, danmuCount, danmuCountDisplayinteger or stringVideo counts and display labels
Video partsvideoPageCount, videoPagesinteger or arrayListed parts and part data
Creator profileuserId, userName, userPageUrl, avatarUrl, bio, sex, school, profession, level, userVipStatus, verificationstring or integerCreator or commenter identity and profile fields
Creator relationsfollowerCount, followingCount, whisperCount, archiveCountintegerRelation and archive statistics
Comment identitycommentId, parentCommentId, rootCommentId, userLevelstring or integerComment and author identifiers
Comment contentcommentText, replyCount, commentTimestring or integerText, replies, and creation time
Danmaku datadanmuId, danmuText, timeOffsetSec, mode, fontSize, color, pool, userHashstring, number, or integerText, timing, display values, and source hash
Subtitle metadatasubtitleId, subtitleLanguage, subtitleName, subtitleType, subtitleUrlstring or integerSubtitle IDs, languages, type, and URL

Fields by operation

Every operation returns the run metadata fields plus the families below, when the source provides them.

OperationField families returned
searchVideoPagination and provenance, video identity and assets (title, url, bvid, coverUrl), creator userId, userName, userPageUrl, play and danmaku counts with display labels, duration, publishedDate
videoDetailVideo identity, aid, cid, description, cover, duration, publishedAt, createdAt, category, the seven video counts, video parts, tags, creator profile and relation fields from the page
userDetailCreator profile fields, publishedAt, archiveCount, followerCount, followingCount, whisperCount
userRelationStatuserId, url, userPageUrl, followerCount, followingCount, whisperCount
userVideosVideo identity, aid, description, cover, duration, publishedAt, playCount, commentCount, videoTypeName, creator identity
videoCommentsComment identity and content, likeCount, replyCount, commentTime, commenter userId, userName, userPageUrl, userLevel, userVipStatus, video aid and URLs
videoDanmuDanmaku data, createdAt, aid, cid, _sourceAid, _sourceCid, URLs
videoCaptionVideo identity (bvid, aid, cid, videoTitle), URLs, subtitle metadata

publishedAt, createdAt, and commentTime are Unix seconds. searchVideo playCount and danmuCount are approximate: the Actor derives them from the rounded labels on search cards (for example 2079.9万), and the exact label is kept in playCountDisplay and danmuCountDisplay. In videoDetail the counts come from the video page's stat block.

Sample output

This shortened sample omits duplicate video-title and URL fields, plus cover and profile URL fields. All shown values are copied from one real dataset record.

{
"_operation": "searchVideo",
"_fetchedAt": "2026-10-15T01:25:24.113157+00:00",
"status": "success",
"_page": 1,
"title": "【全748集】目前B站最全最细的Python零基础全套教程,2026最新版,包含所有干货!七天就能从小白到大神!少走99%的弯路!存下吧!很难找全的!",
"url": "https://www.bilibili.com/video/BV1rpWjevEip/",
"bvid": "BV1rpWjevEip",
"_sourceKeyword": "python",
"userId": "3546597933714079",
"userName": "Python官方课程",
"playCountDisplay": "2079.9万",
"playCount": 20799000,
"danmuCountDisplay": "13.3万",
"danmuCount": 133000,
"durationStr": "39:58:14",
"durationSec": 143894,
"publishedDate": "2024年8月22日"
}

Pricing

Billing uses pay-per-event pricing. A dataset row is billed once as one scraped result with all fields.

Charge eventBilling unitPrice per event (Free plan)Condition
apify-actor-startOne Actor Start event$0.00005 (Free plan)Charged when the Actor starts running
apify-default-dataset-itemOne dataset row$0.002 (Free plan)One scraped result with all fields

On the Free plan, 1,000 row events cost $2, and 10,000 cost $20; 1,000 start events cost $0.05.

2,499 x $0.002 = $4.998 on the Free plan, so the $5 monthly Free credit covers about 2,499 rows. At the default maxResults of 50, the Free credit covers 49 full runs (2,450 dataset rows) with one apify-actor-start event each; additional start events reduce that count.

Only the events listed above are charged. This Actor does not use the Pay per event + usage option, so compute, proxy traffic, and storage are not billed separately.

How to use

  1. Choose one operation: videoDetail, userDetail, userRelationStat, userVideos, videoComments, videoDanmu, videoCaption, or searchVideo.
  2. Enter the matching identifier: keyword for searchVideo; bvid for videoDetail or videoCaption; userId for creator operations; aid for comments; and both aid and cid for danmaku.
  3. Set maxResults for the row cap and maxPages for search, creator-video, or comment pagination.
  4. Select an optional Apify proxy configuration.
  5. Start the run and inspect the resulting dataset rows.
  6. Repeat the run through Apify Schedules; daily is a starting point for tracking keyword search results or creator videos.
{
"operation": "searchVideo",
"keyword": "python",
"maxResults": 10,
"maxPages": 2,
"proxyConfiguration": {
"useApifyProxy": false
}
}

Export the dataset as JSON or CSV, or read it through the Apify dataset API.

Input parameters

ParameterWhat it doesDefault
operationSelects the collection mode: videoDetail, userDetail, userRelationStat, userVideos, videoComments, videoDanmu, videoCaption, or searchVideo.searchVideo
keywordSearch term for searchVideo; Chinese, English, and mixed terms are accepted.Not set
bvidBilibili BV identifier for videoDetail and videoCaption; expects BV plus 10 letters or digits.Not set
aidPositive numeric video ID for videoComments and videoDanmu.Not set
cidPositive numeric video-part ID for videoDanmu.Not set
userIdPositive numeric creator ID for userDetail, userRelationStat, and userVideos.Not set
maxResultsMaximum dataset rows; the schema accepts 1 through 1000.50
maxPagesPage limit for search, creator videos, and comments; the schema accepts 1 through 50.5
proxyConfigurationOptional proxy settings. The input form prefills the Apify proxy with the RESIDENTIAL group ({"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}). If you omit the field or set useApifyProxy to false, requests go out over a direct connection, as in the example input above.Prefilled: Apify proxy, RESIDENTIAL

Limits and edge cases

Records are built before output writing. After collection, rows are pushed one at a time; a failure before writing leaves no rows, while an abort or timeout during writing leaves rows already written.

ConditionWhat the buyer seesWhat to do
maxResults is reachedNo more than the selected row cap is written.Increase maxResults within the schema range.
A paginated operation reaches maxPagesSearch, creator-video, or comment collection stops at the configured limit.Increase maxPages up to 50 and adjust maxResults.
Pagination reaches the source end or returns no page rowsFewer rows than requested, or no rows, may be written.Check the keyword or identifier and try again.
Bilibili returns a challenge page or HTTP 403, 406, or 412The request is retried up to three attempts and is never treated as data. If it still fails, the run fails; userDetail can fall back to the public space page when the profile or relation API errors.Try an optional Apify proxy configuration or rerun later.
A video detail page has no usable videoData, a creator response has no creator name, or relation statistics have no usable dataThe affected operation fails.Verify the Bilibili identifier and rerun.
Danmaku returns a non-XML response or unparsable XMLThe danmaku operation fails.Verify aid and cid, then rerun.

The schema accepts maxResults from 1 through 1000. The execution path also returns zero rows when it receives maxResults equal to 0, although that value is outside the schema range.

FAQ

How much does it cost to scrape Bilibili?

The Actor charges $0.002 per dataset row on the Free plan; see Pricing for the full calculation.

Do I need a Bilibili account or API key?

No. The Actor does not sign in and does not require a Bilibili account or API key. You only need an Apify account to run it.

Why did my run return no rows?

A keyword may have no matching rows, or creator-video and comment collection may reach the source end. Danmaku and subtitle metadata operations may also return no rows when the public source provides no corresponding records. Check the operation, identifier, and pagination settings before rerunning.

What happens if Bilibili returns an anti-bot challenge?

The Actor detects challenge pages, retries, and does not write the page as a collected record; if retries fail, the run fails. Try an optional Apify proxy configuration or run the collection again later.

The Actor reads public Bilibili page data and public endpoints. Whether a particular use is allowed depends on Bilibili’s terms of use and applicable law for your use case; the Actor does not provide a legal guarantee.