The Complete Bilibili URL & ID Reference
Every Bilibili link you’ve ever seen — BV… codes, old av… numbers, b23.tv short links, bangumi ep/ss/md IDs, user spaces, live rooms, and the query parameters riding along — dissected part by part. Hover any highlighted segment of a URL to see what it means; each example is followed by a plain-English legend. Published by SaveBili Research.
A quick note on how to read this page: Bilibili (哔哩哔哩) is China’s largest anime, gaming, and creator-video platform, and its URL scheme has grown organically over a decade. Nothing here is secret — these are the public link formats the site itself generates — but no complete English-language reference existed, so we wrote one. All example IDs below are illustrative; only download videos you have the right to save.
Video page URLs: BV and legacy av
The standard video URL is the one you’ll encounter most. Since March 2020, Bilibili’s canonical video identifier is the BV number — a 12-character code starting with BV1. Before that, videos used a plain numeric av number. Both still work.
Modern BV video URL
https://www.bilibili.com/video/BV1x7411x7Qx| Part | Meaning |
|---|---|
https:// | Protocol (standard HTTPS). |
www.bilibili.com | Bilibili’s main domain. |
/video/ | Marks this as an uploaded video page (bangumi, live, and user spaces use different paths). |
BV1x7411x7Qx | The BV number: 12 characters, base58 alphabet, always beginning with BV1. This is the video’s permanent public ID. |
Legacy av video URL
https://www.bilibili.com/video/av170001| Part | Meaning |
|---|---|
av170001 | Legacy numeric video ID, prefixed with av. Still resolves: Bilibili 301-redirects it to the equivalent /video/BV… page. Useful when you find old bookmarks or forum posts from before 2020. |
av → BV under the hood. Try pasting any link into our Bilibili link inspector to see the BV, av, and canonical URL side by side.b23.tv short links
Bilibili’s share button generates short links on its own b23.tv domain — the equivalent of YouTube’s youtu.be. They redirect (HTTP 302) to the full video page, usually with tracking parameters attached.
https://b23.tv/xYz9AbC| Part | Meaning |
|---|---|
b23.tv | Bilibili’s first-party short domain. (“B23” is a play on the Bilibili name.) |
xYz9AbC | Opaque short token — not decodable by hand. Expands to a full www.bilibili.com/video/BV… URL (plus tracking params) when opened. |
Tip: because short links hide the destination, always expand a b23.tv link before trusting it — a link inspector that shows you the resolved BV number is the safest way to confirm what a shared link actually points to.
Bangumi URLs: ep, ss, and md
Licensed anime and drama series live under /bangumi/ and use three different IDs that are easy to confuse. They form a hierarchy: media (the series overview) → season (one season of the series) → episode (one playable video).
Episode URL (the playable page)
https://www.bilibili.com/bangumi/play/ep123456Season URL (one season of a series)
https://www.bilibili.com/bangumi/play/ss12345Media URL (the series overview page)
https:///bangumi/media/md12345| Prefix | Stands for | Points to | Plays video? |
|---|---|---|---|
ep | Episode | One specific episode | Yes — this is the playable URL |
ss | Season | One season’s episode list | No (lists episodes) |
md | Media | The series overview page | No (series info) |
If you’re trying to reference a specific watchable episode, you want the ep URL. The ss and md pages are for browsing and metadata. Note that bangumi availability is region-locked for much licensed content — an ep link that works in one country may show “not available in your region” in another.
User spaces and live rooms
User space (creator profile)
https://space.bilibili.com/123456| Part | Meaning |
|---|---|
space.bilibili.com | Subdomain for user profile (“space”) pages. |
123456 | The numeric UID of the creator. Lower numbers generally mean older accounts — Bilibili’s earliest users have 5–6 digit UIDs. |
Live room
https://live.bilibili.com/12345| Part | Meaning |
|---|---|
live.bilibili.com | Subdomain for livestreams. |
12345 | The public room number (short ID). Unlike video URLs, live room links point to an ongoing broadcast, not a permanent file. |
Cheese: paid course URLs
Bilibili’s paid knowledge section (“课堂”, marketed in English URLs as cheese) hosts paid courses. Its episode URLs mirror the bangumi pattern:
https://www.bilibili.com/cheese/play/ep123Important: cheese content is paid and DRM-protected. These URLs are documented here for identification only — paid course videos are not legitimately downloadable, and this reference does not describe any way to access them beyond a lawful purchase.
Query parameters
Everything after the ? in a Bilibili URL is a parameter. The video still loads if you strip them all — they’re instructions and tracking, not identity. Here are the ones you’ll actually see:
| Parameter | Example | Meaning | Safe to strip? |
|---|---|---|---|
p | ?p=2 | Part number. Multi-part videos (分P) split one upload into numbered segments; p=2 opens the second part. Omit it and you get part 1. | Yes — defaults to part 1 |
t | ?t=65 | Timestamp in seconds. Opens the video 65 seconds in. This is how “share at current time” links work. | Yes — defaults to 0:00 |
spm_id_from | ?spm_id_from=333.788… | Tracking token. SPM (Super Position Model) records which page, module, and position the click came from — pure analytics for Bilibili. It identifies the referrer, not you. | Yes — always safe. Stripping it changes nothing about the video. |
bvid | ?bvid=BV1x7411x7Qx | BV number as a parameter. Appears on some share/API-style URLs (e.g., player or embed URLs) where the ID travels in the query string instead of the path. | Only if the path already contains the ID |
https://www.bilibili.com/video/BV1x7411x7Qx?p=2&t=90&spm_id_from=333.788.recommend_popular.0Cleaning a shared link down to just https://www.bilibili.com/video/BV… is good hygiene before bookmarking or citing it — you lose nothing except the sender’s tracking trail.
The AV↔BV math, explained for humans
Every video has one underlying numeric ID. The av form shows it plainly; the BV form shows it scrambled through a reversible base58 encoding. “Reversible” is the key word: it’s not encryption and not a hash — it’s a fixed mathematical shuffle, which is why any converter can go both directions instantly with no lookup table.
In plain English, the transform does three things:
- XORs the av number with a constant (
177451812) — a bit-flipping step that obscures sequential IDs. - Adds another constant (
8728348608) — shifting the number into a range that always encodes to the right length. - Encodes the result in base58 using Bilibili’s custom 58-character alphabet, then interleaves the characters into the fixed template
BV1??4?1?7??(the1,4,1,7at positions 3, 5, 7, 9 are always literal).
The character set deliberately excludes lookalikes (0, O, I, l) so BV codes survive being read aloud or retyped. Because the mapping is one-to-one, av170001 will always and only ever equal its corresponding BV1… code, on every mirror and archive of Bilibili data.
Don’t do the arithmetic by hand — paste any av or BV link into the Bilibili link inspector and it converts both directions, shows the canonical URL, and expands b23.tv short links.
For developers
Building a tool, bot, or dataset that handles Bilibili links? The practical rules:
- Normalize on input: accept
av,BV,b23.tv, and mobile (m.bilibili.com) forms; resolve everything to the canonicalhttps://www.bilibili.com/video/BV…before storing. - Strip tracking: drop
spm_id_fromand otherspm/share_*params at ingest — they bloat databases and leak referrer context. - Preserve
pandt: unlike tracking params, part numbers and timestamps are user intent. Keep them when they matter (e.g., “link to the moment”), drop them when you want the canonical video. - Never guess IDs: BV codes are not sequential — you cannot enumerate videos by incrementing characters. Use Bilibili’s public search or API endpoints for discovery.
- Respect robots and terms: Bilibili’s terms of service and
robots.txtgovern automated access; cache aggressively and identify your bot honestly.
Citing this reference: you may quote or adapt the URL-pattern descriptions on this page in documentation, code comments, or research. Attribution: “Bilibili URL Anatomy” by SaveBili Research (https://bbvideosaver.com/research/bilibili-url-anatomy/), with a link back to the publish URL. If you spot a new URL form in the wild that isn’t covered here, we’d genuinely like to know — accurate references stay accurate through corrections.
Frequently asked questions
What is a BV number, exactly?
A BV number is Bilibili’s canonical video identifier since March 2020: a 12-character code starting with BV1 (e.g., BV1x7411x7Qx). It encodes the same underlying numeric ID as the old av number through a reversible base58 transform — so every video has exactly one av number and one BV number, permanently paired.
Can I still use old av links?
Yes. Bilibili redirects /video/av170001-style URLs to their /video/BV… equivalents automatically. For sharing and bookmarking, prefer the BV form since it’s canonical, but av links are not dead.
What does spm_id_from mean, and can I remove it?
It’s Bilibili’s click-tracking parameter recording which surface the link came from (search, recommendation feed, etc.). It affects analytics only — the video, part, and timestamp are untouched. You can always safely delete it (and any spm parameter) to get a clean canonical link.
Why does one video have so many different links?
Because the same video can be addressed several ways: the canonical /video/BV… URL, the legacy /video/av… URL, a b23.tv short link from the share button, and mobile (m.bilibili.com) variants — plus optional ?p= and ?t= parameters. They all resolve to the same video; the differences are convenience, history, and tracking.
Do Bilibili video URLs expire?
Canonical /video/BV… URLs are permanent as long as the video stays published. b23.tv short links are the exception — they’re lookup tokens on Bilibili’s shortener, and very old ones occasionally stop resolving. If you need a link to last, store the full BV URL.
Got a Bilibili link? Decode it instantly.
Paste any BV, av, b23.tv, or bangumi link — see the canonical URL, both ID forms, and a clean shareable link.
Try SaveBili — free Bilibili video downloaderConfused by a link format? Our Bilibili video link guide and troubleshooting guide cover the rest. For the formats those links can carry, see Bilibili format compatibility — or browse all SaveBili Research.
A quick reminder: only download videos you own, created yourself, or have permission to save — your own uploads, Creative Commons content, or videos whose creators allow downloading. Respect copyright and Bilibili’s terms of service.