Answers
What is a Bilibili mid (UID), and where do I get it?
Short answer
The mid is Bilibili's permanent numeric user ID, the number shown as UID and in profile links like space.bilibili.com/<mid>. okdata returns it as author.id on every Bilibili video and comment, for example $0.002 for a search page of about 20 videos. There is no Bilibili profile endpoint in the catalog, so a mid cannot be turned into follower counts here.
On Bilibili, mid is the account's numeric user ID. The profile page labels it UID, and the profile link is built from it: space.bilibili.com/ followed by the number. A nickname can change, the mid cannot, which is why every serious Bilibili dataset keys creators and commenters on it.
What it looks like
- A positive integer with no prefix. Early accounts have short mids; in the responses we read in November 2026 they ran from 7 to 16 digits, and accounts registered in the last few years have 16 digits starting with 3.
- 16 digits is still safe for a JavaScript number and a 64-bit integer, but more than Excel keeps: it rounds numbers to 15 significant digits. Store mids as text or BIGINT and format the spreadsheet column as text.
- Live rooms have their own room numbers, videos have aids and BV ids, comments have their own ids. None of them is a mid, even when the number looks similar.
Where okdata returns it
| Endpoint | Field holding a mid | Cost |
|---|---|---|
| Bilibili video search | author.id of each video's uploader |
$0.002 a page |
| Bilibili video detail | author.id of the uploader |
$0.002 |
| Bilibili video comments | author.id of each commenter |
$0.002 a page |
author.name is the nickname at fetch time. author.followers and author.verified come back null on Bilibili, and meta.unavailable says so.
What you cannot do with a mid here
The catalog has no Bilibili account endpoint: no follower count, no profile, no "all videos by this uploader" list. If you start from a mid, the practical routes are a search for the creator's name or topic, filtered on author.id, or opening space.bilibili.com/<mid> in a browser for the follower count.
Example
Find the mids behind the newest videos on a topic and count how often each uploader appears:
import os, requests
from collections import Counter
URL = "https://api.okdata.online/v1/bilibili/videos/search"
H = {"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"}
body = requests.get(URL, headers=H, timeout=60, params={
"query": "机械键盘 测评", "sort": "latest",
"fields": "id,title,author.id,author.name"}).json()
if body["code"] != "ok":
raise SystemExit(body["message"])
videos = body["data"]["items"]
by_mid = Counter((v["author"]["id"], v["author"]["name"]) for v in videos)
for (mid, name), n in by_mid.most_common(10):
print(mid, name, n, f"https://space.bilibili.com/{mid}")
One page is $0.002; ten pages across a few keywords are $0.02.
Limits
- Search finds what Bilibili ranks for a keyword. A creator who never uses your words will not show up, and a filter on
author.idonly sees the videos the search returned. - A commenter's mid identifies the account, not the person. Treat it as personal data: keep it only as long as your analysis needs it.
- Deleted or private videos return
not_found, which is free.
For finding sponsorship candidates from search results, see finding Bilibili creators in a niche.
Sources
- yt-dlp Bilibili extractor: space.bilibili.com/<numeric id> profile URLs
- V2EX: Bilibili user UIDs now have 16 digits
- Excel: keeping leading zeros and large numbers (15-digit precision)
Where people asked this (read 2026-11-12)
Updated