> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Bilibili Posts API

> Bilibili videos with BV and AV IDs, title, description and channel details. Search by keyword or pass video URLs.

`POST /v1/data/bilibili/posts/run`

**Pricing:** $0.01 per post ($10.50 per 1,000).

## Ways to call it

* **By keyword**: set `queries` (optional: `sortBy`, `maxResults`)
* **By video URL**: set `urls` (optional: `maxResults`)

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**queries** `string[]`

One or more search keywords. One request reads them all.

**urls** `string[]`

One or more video urls. One request reads them all.

Format e.g. `https://www.example.com`.

**sortBy** `string` (default: relevance)

Sort By to use. Most relevant by default.

Allowed values: `relevance` (Most relevant), `views` (Most views), `newest` (Newest first), `danmaku` (Most danmaku), `favorites` (Most favorites).

**maxResults** `integer` (default: 100)

How many posts to return in total. Defaults to 100; use 0 for all.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/bilibili/posts/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "queries": [
      "原神",
      "qzxvbnmplkjh9137"
    ],
    "maxResults": 10
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/bilibili/posts/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "queries": [
        "原神",
        "qzxvbnmplkjh9137"
    ],
    "maxResults": 10
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/bilibili/posts/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "queries": [
    "原神",
    "qzxvbnmplkjh9137"
  ],
  "maxResults": 10
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one post, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `videoUrl` | Video URL | url |
| `bvid` | Bvid | text |
| `aid` | Aid | text |
| `title` | Title | text |
| `description` | Description | text |
| `channel` | Channel | text |
| `channelId` | Channel ID | text |
| `channelUrl` | Channel URL | url |
| `channelAvatar` | Channel Avatar | image |
| `views` | Views | number |
| `likes` | Likes | number |
| `coins` | Coins | number |
| `saves` | Saves | number |
| `shares` | Shares | number |
| `comments` | Comments | number |
| `danmaku` | Danmaku | number |
| `durationS` | Duration S | number |
| `published` | Published | text |
| `thumbnail` | Thumbnail | image |
| `category` | Category | text |
| `keywords` | Keywords | array |
| `isOriginal` | Is Original | boolean |
| `isPaid` | Is Paid | boolean |
| `sourceQuery` | Source Query | text |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "bilibili/posts",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "bvid": "BV1dAxE6VErW",
      "channelUrl": "https://space.bilibili.com/401742377",
      "isOriginal": null,
      "videoUrl": "https://www.bilibili.com/video/BV1dAxE6VErW",
      "isPaid": false,
      "published": "2026-10-29T04:00:00+00:00",
      "aid": "117518106630700",
      "saves": 46550,
      "shares": null,
      "danmaku": 18662,
      "description": "在劫后余生后的某个清晨，米提亚决定逃避监督，并趁机给忙碌的朋友们带些礼物。\n只不过是丰富生活乐趣的小伎俩罢了，不用客气。\n\n中文CV：\n米提亚——苏尚卿\n瓦列里——淦子齐\n奥黛塔——潘丹妮\n沃雅妮莎——苏婉\n阿罗夏——王辅平\n\n日文CV：\n米提亚——小林裕介\n瓦列里——古川慎\n奥黛塔——上坂堇\n沃雅妮莎——伊藤加...",
      "likes": 228379,
      "category": "手机游戏",
      "coins": null,
      "views": 1558481,
      "comments": 12395,
      "channel": "原神",
      "sourceQuery": "原神",
      "title": "《原神》米提亚角色PV——「小小伎俩」",
      "thumbnail": "https://i2.hdslb.com/bfs/archive/1ce0d6e289e89c0c5740b9d9434f0dc40b1cc399.jpg",
      "channelAvatar": "https://i2.hdslb.com/bfs/face/e63bacc8b9e68f59f401cc41728a99262ba661a3.jpg",
      "durationS": 677,
      "channelId": "401742377",
      "keywords": [
        "米提亚",
        "原神"
      ]
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.