Search and retrieve video information from Bilibili (哔哩哔哩/B站) using bilibili-cli. Use when: finding videos on Bilibili, searching B站 content by keyword, getting video details by BV ID, listing UP主 videos, researching Chinese video content, collecting bilibili video URLs for downloading. Keywords: bilibili, B站, 哔哩哔哩, bvid, video search, 视频搜索
Search and retrieve video information from Bilibili (哔哩哔哩) using the bili CLI tool (bilibili-cli). Automatically uses browser cookies for authentication — no manual setup needed.
bili is installed globally via uv tool install bilibili-cli. The executable is bili.
bili search "关键词" --type video --max 20 --json
--type video — search videos (default is user)--max N — number of results (default 20)--page N — page number (default 1)--json — structured JSON output--yaml — YAML output (good for AI agents)Output fields: bvid, title, author, play, duration
bili video {BVID} --json
bili user-videos {UID_OR_NAME} --max 20 --json
UID_OR_NAME can be a numeric UID or username (searches for first match).
bili search "用户名" --type user --json
bili user {UID_OR_NAME} --json
https://www.bilibili.com/video/{bvid}/--json for structured output when parsing results programmaticallybili handles cookie extraction and rate limiting automaticallybili --help or bili {command} --helpEdit PDFs with natural-language instructions using the nano-pdf CLI.