# Bilibili API
> Read Bilibili — China's largest video community (300M+ users) — in real time, no account or key needed. Full-text search for videos and users; pull the popular feed and the ranking charts; fetch any video's full detail, its statistics (views, likes, coins, favourites, shares), tags, related videos and paginated comments; and look up any user's card (name, avatar, sign, follower/following counts, level). Video lookups accept the BV id; comments take the numeric aid (returned by the video endpoint). Requests are wbi-signed exactly as the Bilibili web client does and routed through a managed proxy, with transient anti-bot responses retried automatically. Every call is live (no cache) and returns the upstream Bilibili shape. 11 endpoints. Built for video discovery, creator and audience analytics and content aggregation on Bilibili. A Bilibili data API — distinct from YouTube/Dailymotion/PeerTube (different platform). No upstream key, no cache.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/bilibili-api/..."
```

## Pricing
- **Free** (Free) — 3,100 calls/Mo, 2 req/s
- **Starter** ($11/Mo) — 63,000 calls/Mo, 8 req/s
- **Pro** ($31/Mo) — 315,000 calls/Mo, 20 req/s
- **Mega** ($76/Mo) — 1,560,000 calls/Mo, 50 req/s

## Endpoints

### Search

#### `GET /v1/search` — Search videos

**Parameters:**
- `q` (query, required, string) — Query
- `page` (query, optional, string) — Page

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bilibili-api/v1/search"
```

#### `GET /v1/search/users` — Search users

**Parameters:**
- `q` (query, required, string) — Query

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bilibili-api/v1/search/users"
```

### Discovery

#### `GET /v1/popular` — Popular videos

**Parameters:**
- `limit` (query, optional, string) — Page size
- `page` (query, optional, string) — Page

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bilibili-api/v1/popular"
```

**Response:**
```json
{
    "data": {
        "ttl": 1,
        "code": 0,
        "data": {
            "list": [
                {
                    "aid": 116674682426936,
                    "cid": 38774245770,
                    "pic": "http://i1.hdslb.com/bfs/archive/e8bde3297455f3796e516de2362d5eb1085d9abf.jpg",
                    "tid": 138,
                    "bvid": "BV1RvVo6QEqo",
                    "desc": "求婚小记录独家放送啦～快给我嗑",
                    "stat": {
                        "vt": 0,
                        "vv": 1032183,
                        "aid": 116674682426936,
                        "coin": 132740,
                        "like": 161818,
                        "view": 1032183,
                        "fav_g": 0,
                        "reply": 4289,
                        "share": 3728,
                        "like_g": 9,
                        "danmaku": 3777,
                        "dislike": 0,
                        "favorite": 16226,
                        "his_rank": 13,
                        "now_rank": 0
                    },
                    "ctime": 1780314627,
                    "owner": {
                        "mid": 457718798,
                        "face": "https://i2.hdslb.com/bfs/face/571c63f133b7379fbed645130450c3168a4aec5e.jpg",
                        "name": "主持人yoyo酱"
                    },
                    "state": 0,
                    "tidv2": 2083,
                    "title": "不
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/ranking` — Ranking charts

**Parameters:**
- `rid` (query, optional, string) — Category id (0=all) Example: `0`
- `type` (query, optional, string) — all Example: `all`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bilibili-api/v1/ranking?rid=0&type=all"
```

**Response:**
```json
{
    "data": {
        "ttl": 1,
        "code": 0,
        "data": {
            "list": [
                {
                    "aid": 114256632618805,
                    "cid": 29165686089,
                    "pic": "http://i2.hdslb.com/bfs/archive/bd88ddaef2e676a386be293c12de0b9becab9f82.jpg",
                    "tid": 47,
                    "bvid": "BV1B8ZJYTEPg",
                    "desc": "",
                    "stat": {
                        "vt": 0,
                        "vv": 9241681,
                        "aid": 114256632618805,
                        "coin": 22746,
                        "like": 77526,
                        "view": 9241681,
                        "fav_g": 95074,
                        "reply": 1477,
                        "share": 1791,
                        "like_g": 13314,
                        "danmaku": 4235,
                        "dislike": 0,
                        "favorite": 127835,
                        "his_rank": 49,
                        "now_rank": 0
                    },
                    "ctime": 1743418022,
                    "owner": {
                        "mid": 654552,
                        "face": "https://i0.hdslb.com/bfs/face/6c1421573d214809ca86aef25bdd23670e00128a.jpg",
                        "name": "圆桌动漫"
                    },
                    "score": 0,
                    "state": 0,
                    "tidv2": 2037,
                    "title": "现代修仙，没
…(truncated, see openapi.json for full schema)
```

### Videos

#### `GET /v1/video` — Video detail

**Parameters:**
- `bvid` (query, required, string) — Video BV id

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bilibili-api/v1/video"
```

#### `GET /v1/video/comments` — Video comments

**Parameters:**
- `aid` (query, required, string) — Numeric video aid (from /v1/video)
- `page` (query, optional, string) — Page

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bilibili-api/v1/video/comments"
```

#### `GET /v1/video/related` — Related videos

**Parameters:**
- `bvid` (query, required, string) — Video BV id

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bilibili-api/v1/video/related"
```

#### `GET /v1/video/stat` — Video statistics

**Parameters:**
- `bvid` (query, required, string) — Video BV id

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bilibili-api/v1/video/stat"
```

#### `GET /v1/video/tags` — Video tags

**Parameters:**
- `bvid` (query, required, string) — Video BV id

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bilibili-api/v1/video/tags"
```

### Users

#### `GET /v1/user` — User card

**Parameters:**
- `mid` (query, required, string) — User mid

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bilibili-api/v1/user"
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bilibili-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "auth": "none upstream (proxy + wbi); this gateway requires x-api-key",
        "name": "Bilibili API",
        "note": "Live, no cache. Search uses Bilibili wbi signing. Comments take the numeric aid (from /v1/video). Anti-bot HTML/risk-control responses are retried on a fresh proxy.",
        "source": "Bilibili public web API via oanor proxy (wbi-signed, no account)",
        "endpoints": 11
    },
    "meta": {
        "timestamp": "2026-06-02T08:32:50.070Z",
        "request_id": "9552f0f7-fc45-4e3e-9d98-b6fb1ada581d"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/bilibili-api
OpenAPI spec: https://www.oanor.com/api/bilibili-api/openapi.json
