bilibili-api-python
The fork of module bilibili-api. 哔哩哔哩的各种 API 调用便捷整合(视频、动态、直播等),另外附加一些常用的功能。
What it is and what it does
bilibili-api-python is an async Python client library for interacting with Bilibili (a major Chinese video platform) APIs. It wraps endpoints for videos, live streams, user profiles, dynamics, audio, and more—roughly 400+ endpoints according to the documentation. The library is entirely async-based, meaning all network calls use asyncio and can be run concurrently, which is useful for high-throughput scraping or bulk operations.
The package includes anti-scraping features like proxy support, request throttling, and browser impersonation via curl_cffi to avoid IP bans. It also provides utilities beyond the official API: BV/AV ID conversion, direct WebSocket access to live-stream danmaku (comments), subtitle and danmaku file downloads, and cookie refresh logic. However, the repository is now archived and abandoned, so API breakage is a real risk if Bilibili changes its endpoints—the documentation explicitly warns users to keep the package updated.
Use it for:
- Bulk download video metadata, comments, or subtitles from Bilibili for analysis or archival.
- Monitor live streams programmatically and react to events via WebSocket danmaku connections.
- Automate account actions (likes, follows, subscriptions) using Credential-based authentication.
- Convert between BV and AV video IDs or fetch video statistics without manual API calls.
- Build a scraper that respects rate limits and uses proxies to avoid IP bans.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides async Python bindings for Bilibili's APIs, covering videos, live streams, dynamics, audio, and user operations with built-in anti-scraping measures and proxy support.
No—not for new projects. The repository is archived and abandoned; the maintainer will not fix API breakage when Bilibili changes its endpoints. The documentation itself warns that interfaces may change without notice and users must stay on the latest version. For existing projects already using it, updates may still work until Bilibili's API surface shifts. For new work, seek an actively maintained alternative or be prepared to fork and maintain it yourself.
Install
bilibili-api-python on PyPI
pip
pip install bilibili-api-pythonuv
uv add bilibili-api-pythonpoetry
poetry add bilibili-api-pythonInstalling bilibili-api-python
Before you install
Low install friction with a pure-Python wheel, but the repository is archived and marked abandoned as of the fact sheet date. Maintenance status is critical: the last commit was 2026-07-06, and the module's stability depends entirely on Bilibili not changing its API surface, which the documentation explicitly warns may happen without notice.
License in practice
Licensed under GPL-3.0-or-later (copyleft). Any derivative work or distribution must also be licensed under GPLv3 or later. Closed-source commercial projects cannot use this package without releasing their own code under the same license.
Quickstart
import asyncio
from bilibili_api import video
async def main():
v = video.Video(bvid="BV1uv411q7Mv")
info = await v.get_info()
print(info)
asyncio.run(main())
Requires Python 3.10 or later and a separate async HTTP client (aiohttp, httpx, or curl_cffi) to be installed manually.
Verify before relying
- Whether the archived repository will continue to receive security patches or API fixes if Bilibili changes its endpoints.
- Current compatibility with recent Bilibili API changes since the last commit date.
- Whether the 12 runtime dependencies are all actively maintained and compatible with modern Python versions.
Package facts
| License | GPL-3.0-or-later (copyleft) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 12 — beautifulsoup4, colorama, lxml, pyyaml, brotli, qrcode, APScheduler, pillow, yarl, pycryptodomex, qrcode_terminal, PyJWT |
| Maintenance | abandoned — 56 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 118,119/month — #12,133 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: bilibili_api_python-17.4.2-py3-none-any.whl
Keywords: bilibili, api, spider
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
hiddenlayer-sdkProvides a typed Python client for the…
permissive · top 15,000 on PyPI
parallel-webProvides a Python client library for the…
permissive · top 5,000 on PyPI
openlayerProvides a typed Python client for the…
permissive · top 15,000 on PyPI
steel-sdkProvides a typed Python client for the Steel…
permissive · top 15,000 on PyPI
letta-clientProvides a Python client library for the Letta…
permissive · top 15,000 on PyPI
kernelProvides a Python client library for the Kernel…
permissive · top 15,000 on PyPI
cloudflareProvides a Python client library for the…
permissive · top 5,000 on PyPI
curl-cfficurl_cffi provides Python bindings to libcurl…
permissive · top 1,000 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pytubepytube downloads YouTube videos and playlists…
permissive · top 5,000 on PyPI