# T Bilibili — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Discover what's trending on Bilibili by accessing real-time popular searches, viral videos, and video rankings all in one place. Stay ahead of trends on China's biggest video platform with up-to-date insights into what millions of users are watching and searching for.

**Category:** Streaming Video | **Website:** [t.bilibili.com/](https://t.bilibili.com/) | **Docs:** [parse.bot/marketplace/ff6138ec-acb0-4d31-976b-9006126c5b61/t-bilibili-com-api](https://parse.bot/marketplace/ff6138ec-acb0-4d31-976b-9006126c5b61/t-bilibili-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-t-bilibili-com-api-ff6138ec/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_popular_videos

Retrieves the current popular/hot videos on Bilibili with pagination. Videos are ordered by editorial/algorithmic recommendation. Each video includes metadata, owner info, and engagement statistics.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-based). |
| `page_size` | integer | No | Number of videos per page (1-50). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-t-bilibili-com-api-ff6138ec/get_popular_videos \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","page_size":"<integer>"}'
```

### get_ranking

Retrieves the video ranking for a specific content category on Bilibili. Rankings are based on content quality and recent engagement metrics, dynamically updated. Returns up to 100 top videos per category.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | No | Numeric category ID. Known values: 0 (all/全站), 1 (animation/动画), 3 (music/音乐), 4 (gaming/游戏), 5 (entertainment/娱乐), 36 (technology/科技), 119 (kichiku/鬼畜), 129 (dance/舞蹈), 155 (fashion/时尚), 160 (lifestyle/生活), 168 (guochuang/国创), 211 (food/美食), 217 (animal/动物圈), 223 (automobile/汽车), 234 (sports/运动). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-t-bilibili-com-api-ff6138ec/get_ranking \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>"}'
```

### get_trending_searches

Retrieves the current hot/trending search keywords on Bilibili. Each keyword includes a display name, optional icon, and a heat score indicating relative popularity. Results are ordered by popularity descending.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of trending keywords to return. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-t-bilibili-com-api-ff6138ec/get_trending_searches \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>"}'
```
