Bilibili API alternative: scrape B站 (哔哩哔哩) videos, comments with replies, danmaku (弹幕), UP主 creator profiles and the top-100 rankings by keyword, URL, creator or feed. $5 per 1,000 videos, $2 per 1,000 comments, $0.10 per 1,000 danmaku. Only-new monitor mode. No login or cookies needed.
Build 0.2.5 was the non-production QA candidate; build 0.2.6 carries the same fixes to production latest.
Fixed
Same-second danmaku watermarks and recovery merges retain the complete delivered boundary set instead of truncating it to 500 ids. A capped run no longer alternates between two batches and charges for them again; the existing 4 MB state eviction remains the outer bound.
HTTP 403 danmaku responses are classified as blocked, and HTTP 404 responses remain unavailable. Either response makes an empty incremental check MONITOR_CHECK_INCOMPLETE rather than falsely confirming NO_NEW_ROWS; ordinary non-incremental 404 handling is unchanged.
README delivery order now matches the implementation: each video's comments/replies and danmaku are delivered before the next video.
0.2.0 (2026-11-07)
Added
Danmaku rows and the danmaku dataset view. Each anonymous-XML bullet comment includes its timeline position, mode, colour, sender hash and string dmid; the new bilibili-danmaku event has a FREE-tier list price of $0.0001 per row ($0.10 per 1,000).
Inputs danmakuPerVideo and maxDanmakuTotal, with danmaku disabled by default and no danmaku requests when either cap is zero.
Incremental monitoring through incremental, incrementalStateKey and incrementalReset. Watermarks live in the named bilibili-monitor-state key-value store; zero-change runs succeed with NO_NEW_ROWS and no row charges.
Reliability
SDK-short-pushed danmaku batches retain sparse delivered ids and merge them into the continuous watermark on a later run, preventing duplicate rows and charges when timeline order differs from send-time order.
Same-run migration merges the named monitor state with RUN_STATE and preserves the original first-run phase. A failed final save writes monitor-only watermarks to recovery.<stateKey> in the named store, so the next run can discover them without inheriting the previous run's ledger or delivery counts. Final byte-based eviction includes save metadata before enforcing the 4 MB limit.
Empty incremental checks now distinguish upstream failure (UPSTREAM_ZERO, failed) and incomplete checks (MONITOR_CHECK_INCOMPLETE, partial) from a completed NO_NEW_ROWS result.
Comment deliveries participate in the 15-second monitor save cadence. HTTP 200 JSON success envelopes are no longer accepted as empty danmaku XML.
Monitor state is capped at 200 reply watermarks and 500 sparse danmaku ids per video, with final byte-based eviction keeping the saved record within 4 MB.
Changed — breaking field cleanup for new rows
Removed 11 redundant dataset fields: copyrightCode, category.tidV2, category.tnameV2, parts, derived.likeRate, derived.coinRatio, derived.favoriteRate, derived.shareRate, level (creator rows), rollup.sumViews and rollup.postingSpanDays. Existing datasets are not rewritten.
Unchanged
Video, comment and creator prices, the $0.00005 run base fee, Apify RESIDENTIAL + CN proxy defaults, and the no-login/no-cookie policy.
0.1.10 (2026-10-30) — the six-tier ladder went live, closing the A-008 flat-pricing violation
No src/ behaviour change. package.json was still reading 0.1.0 while the
platform had reached build 0.1.9; it is now aligned to the build this entry ships
as. The Apify build number is driven by .actor/actor.json's version plus an
auto-increment, not by package.json, so the alignment is bookkeeping.
The ladder
pricingInfos record #2 was appended (append-only; record #1 is echoed back
untouched, createdAt included). Every paid tier is a discount off the FREE tier,
so this is a price decrease and took effect at once: the record's startedAt
(2026-10-30T06:30:51Z) is the effective time, and the actor-level
notifiedAboutFutureChangeAt — the field that would hold a pending 14-day notice —
came back absent. The platform did stamp
notifiedAboutChangeAt =2026-10-30T07:00:28Z
on the new record ~28 min later, the same instant it stamped
on the other two Actors in this batch, which reads as a periodic notification job.
"No notification window" is supported; "no notification was sent" is not. Existing
users being told the price went down is benign. Readback after the PUT:
23/23 assertions PASS (1 → 2 records).
Event
FREE
BRONZE
SILVER
GOLD
PLATINUM
DIAMOND
bilibili-video
$0.005
$0.0045
$0.004
$0.0035
$0.0035
$0.0035
bilibili-comment
$0.002
$0.0018
$0.0016
$0.0014
$0.0014
$0.0014
bilibili-creator
$0.01
$0.009
$0.008
$0.007
$0.007
$0.007
run-base-fee
$0.00005
$0.00005
$0.00005
$0.00005
$0.00005
$0.00005
The FREE column is byte-identical to the prices before this change, and
cloud-tests/apply-tier-pricing.mjs refuses to run at all if it is not — the red
line is enforced, not promised.
J2 confirmation: run-base-fee was not touched
Required explicitly by the ticket ("只需在 PR 描述里确认未顺手改它"):
run-base-fee stays at $0.00005, still isOneTimeEvent: true, still
charged once per run only when the run delivers at least one row, and still
published as a flat eventPriceUsd — not a tier ladder. It is never
discounted, and the README now says so in words.
It appears in record #2 only because pricingInfos is append-only: every
superseding record must restate every event, so omitting it would have deleted
the event. Restating it at the identical price is what "unchanged" means here.
No base-fee event was added to any Actor by this change, and none was removed.
Disclosure and the drift guard
README now publishes all six tiers for all four events and marks the figures in
its configuration-cost table as FREE-tier prices (that table says what a
configuration "costs at most", which is only true of the FREE tier now).
tests/pricing-tiers.test.js pins three things together off
cloud-tests/pricing-tiers.json: the ladder, LIST_PRICES in src/billing.js,
and the README table. LIST_PRICES is only the offline fallback (readPricing
overwrites it with the prices the run was issued), so drift does not mischarge
anyone — it makes every local run, cost estimate and offline test lie by exactly
the drift, which is how a wrong number reaches a README six weeks later.
Mutation-checked: moving LIST_PRICES for bilibili-video by one part in a
thousand fails 3 tests, moving one README rung fails 1; both files restored
byte-identical afterwards.
A landmine closed in cloud-tests/deploy.mjs
The metadata PUT was unconditional: it pushed title, description, seoTitle,
seoDescription, categories, defaultRunOptions and exampleRunInput from the
local manifest on every run. Live categories had already dropped MARKETING
while the local manifest still carried it, so a docs-only build would have silently
re-added a category. The PUT is now behind --meta, and without it the script
reports live-vs-local drift instead of writing. The local manifest was synced to
live.
This repo's --pricing guard is length-based (it skips whenever pricingInfos is
non-empty), so it was never at risk of appending a flat record over the ladder —
unlike the sibling --repricing paths on amazon-reviews-snapshot and
xiaohongshu-note-tracker, which were, and are now fixed there.
Tests 61 → 68 (all green).
0.1 (2026-10-17)
First release candidate.
Four inputs in one run, processed in this order with a shared maxVideos cap: video URLs/BV/av ids, creator (UP主) space URLs, ranking/popular feeds, keywords. Duplicates are delivered once.
Three row types in one dataset: video (stats plus derived engagement metrics), comment (hot or newest, optional replies with thread ids, pinned comments flagged) and creator (profile plus a rollup computed from the run's videos).
Pay per row: $0.005 per video, $0.002 per comment, $0.01 per creator, and a $0.00005 run fee charged only when the run delivers at least one row.
Safeguards: spending cap, 1,500-request quota, stop 90 seconds before the run timeout, and a stop after three consecutive rejected requests. RUN_SUMMARY records what was delivered, what was skipped and why.
Default network path is the Apify RESIDENTIAL proxy in China: in the 2026-10-17 cloud probe, video details passed 60/60 from Chinese residential IPs but about 1 in 10 from US servers.
Phone numbers and email addresses in titles, descriptions, bios and comments are masked.
Changes from private cloud acceptance (builds 0.1.2–0.1.6):
Comments: the anonymous visitor cookie is now sent to search only. With it, Bilibili treats comment requests as a guest and returns 2–3 comments per video; without it, full pages are returned (a 20-comment-per-video run went from 39 to 200 comments).
Comments: hot order is topped up newest-first when a video's hot list is shorter than commentsPerVideo; every comment row's sort names the list it came from. Paging stops once all of a video's comments are delivered.
New maxRepliesPerComment (default 10) so one very long reply thread cannot use up a video's whole comment allowance.
isOriginal replaced by isRepost and the raw copyrightCode: Bilibili returns an undocumented code 3 on self-made videos that carry a creator statement, which the old field mislabelled.
Creator video lists are retried up to 8 times with growing pauses (Bilibili rejected ~60% of these requests at random from the China residential pool).
The budget message names the cap that applied (input maxTotalChargeUsd or the run's maximum charge).
The home page is visited only when the run searches by keyword.
maxVideos is split evenly across creators (5 creators with maxVideos: 10 get 2 videos each instead of 10 for the first and none for the rest).
Creator rows are charged only when their rollup includes at least one video; creators with no uploads are now free as well.
The visitor-cookie home page visit is retried on a fresh session (up to four visits per run), and a rejected search is retried twice: in one cloud run a single failed visit had left all 15 keyword searches without cookies.
RUN_SUMMARY.skippedBy.blocked now counts rejected search and ranking/popular pages, and the report names keywords that got fewer videos because of them.