# Bilibili Video parts API (bilibili.video_parts)

- Canonical page: [https://everyinfra.com/en/bilibili-api/video_parts](https://everyinfra.com/en/bilibili-api/video_parts?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "bilibili", "action": "video_parts", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=bilibili&action=video_parts

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | A Bilibili video link such as `https://www.bilibili.com/video/<BV ID>`, or the BV ID itself. All parts come back in one call, one row per part, so there is no paging and no `limit`. A value without a recognizable BV ID returns 422 and is not charged. |
| limit | integer (1–) | no | not declared | The most rows to return in this call, an integer of 1 or more. The default applies when you leave it out, and a call can return fewer rows. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| cid | platform-native meaning |
| part_number | platform-native meaning |
| title | Title. null when the platform has no titles (for example text-only posts). |
| duration_seconds | Duration in seconds. null for content that is not video or audio. |
| duration_sec | platform-native meaning |
| width | platform-native meaning |
| height | platform-native meaning |
| video_id | platform-native meaning |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "bilibili",
  "action": "video_parts",
  "params": {
    "url": "https://www.bilibili.com/video/BV1DYjA6KEJ7"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "bilibili",
        "action": "video_parts",
        "params": {
            "url": "https://www.bilibili.com/video/BV1DYjA6KEJ7",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-21T07:17:18Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "bilibili",
  "action": "video_parts",
  "results": [
    {
      "cid": "•••",
      "part_number": 1,
      "title": "《原神》「『空月之歌·谐谑』映夏！归乡？千灵节！」前瞻特别节目",
      "duration_seconds": 2583,
      "width": 2560,
      "height": 1440,
      "video_id": "BV1DYjA6KEJ7",
      "platform": "bilibili",
      "duration_sec": 2583
    }
  ],
  "count": 1,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=bilibili
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
