{"id":"b01c84d7-dc3b-40e4-a8fc-bae02a0c8e12","slug":"space-bilibili-com-api","name":"space.bilibili.com API","description":"space.bilibili.com API","front_facing_description":"Retrieve and browse videos from any Bilibili user channel with customizable sorting, filtering, and pagination options. Organize your video discovery by applying specific criteria to find exactly the content you're looking for.","source_url":"https://space.bilibili.com/261168118/upload/video","is_authenticated":false,"canonical_scraper_id":"e2c6ce2c-d987-4efe-9785-ce57978ea8ab","apis":[{"method":"GET","endpoint_name":"get_channel_videos","description":"Fetches the paginated video list for a Bilibili channel (user space). Returns video metadata including title, description, thumbnail, duration, view/comment/danmaku counts, and publish timestamp. Also returns the channel's video category breakdown. Sorted by publish date by default; supports sorting by play count or favorites. Each call makes up to 8 upstream requests (session warmup + signed API call with one retry). Pagination is caller-controlled via page and page_size; total video count is returned in the response.","input_params":{"mid":{"type":"string","required":true,"description":"Bilibili user/channel numeric ID (e.g. '261168118').","domain":{"kind":"open","example":"261168118","pattern":"^\\d+$","generator":{"type":"static","value":"261168118"}}},"tid":{"type":"string","required":false,"description":"Category/type ID to filter videos. Use '0' for all categories. Category IDs are returned in the categories field of the response.","default":"0"},"page":{"type":"integer","required":false,"description":"Page number for pagination (1-indexed).","default":1},"order":{"type":"string","required":false,"description":"Sort order for videos. Omitted defaults to pubdate (newest first).","default":"pubdate","enum":"VideoOrder","closed":true,"domain":{"kind":"enum","values":["pubdate","click","stow"],"generator":{"type":"enum_pick","strategy":"first"},"exhaustive":true,"source_selector":"select#order"}},"keyword":{"type":"string","required":false,"description":"Search keyword to filter videos within this channel. Omitted returns all videos."},"page_size":{"type":"integer","required":false,"description":"Number of videos per page (1-50).","default":30}},"return_schema":{"type":"object","fields":{"page":"object with current page number, page_size, and total video count","videos":"array of video objects with bvid, aid, title, description, thumbnail, duration, play_count, comment_count, danmaku_count, created, author, mid, type_id, is_union_video","categories":"object mapping category tid to name and video count for this channel"},"sample":{"data":{"page":{"total":187,"current":1,"page_size":5},"videos":[{"aid":117002676996042,"mid":261168118,"bvid":"BV1wp326PEQH","title":"不到30岁就裸辞，现在后悔了吗？探访年薪10-90万职场女性","author":"Jane Doe","created":1785320504,"type_id":209,"duration":"27:11","thumbnail":"http://i2.hdslb.com/bfs/archive/02c730a2578d002ada1735e6bf20f712f0c282e2.jpg","play_count":144831,"description":"你会放弃一份年薪50万的工作吗？","comment_count":323,"danmaku_count":444,"is_union_video":false}],"categories":{"36":{"tid":36,"name":"知识","count":6},"160":{"tid":160,"name":"生活","count":173}}},"status":"success"}},"initiates_session":false,"price":10,"verification":{"assertions":[{"path":"$.status","op":"equals","value":"success"},{"path":"$.data.videos","op":"array_min_len","value":1},{"path":"$.data.videos[*]","op":"field_present","value":"bvid"},{"path":"$.data.videos[*]","op":"field_present","value":"title"},{"path":"$.data.page","op":"not_null"},{"path":"$.data.page.total","op":"not_null"}],"empty_is_valid":false,"recipe_version":1}}],"sample_inputs":{"get_channel_videos":{"mid":"261168118","order":"pubdate"}},"prefill_inputs":{"get_channel_videos":{"mid":"261168118","order":"pubdate"}},"last_verified_at":"2026-10-26T12:04:25.214263+00:00","endpoint_health":[{"endpoint_name":"get_channel_videos","status":"healthy","last_checked_at":"2026-10-26T12:04:25.214263+00:00","last_verified_at":"2026-10-26T12:04:25.214263+00:00","recent_runs":[{"at":"2026-10-26T12:04:25.214263+00:00","status":"healthy"},{"at":"2026-10-26T06:03:53.010708+00:00","status":"ambiguous"},{"at":"2026-10-25T23:03:52.972958+00:00","status":"ambiguous"},{"at":"2026-10-25T17:02:53.156646+00:00","status":"ambiguous"},{"at":"2026-10-25T11:00:25.182824+00:00","status":"ambiguous"}]}],"sdk_usage_example":{"code":"\"\"\"Walkthrough: Bilibili Channel Videos API — browse a creator's uploads.\"\"\"\nfrom parse_apis.space_bilibili_com_api import Bilibili, VideoOrder, InputFormatInvalid\n\nclient = Bilibili()\n\n# Paginate through the most-viewed videos for a channel, capped at 5 total.\nfor video in client.videos.list(mid=\"261168118\", order=VideoOrder.CLICK, limit=5):\n    print(video.title, f\"▶ {video.play_count}\", video.duration)\n\n# Drill into the first result from a keyword search.\nhit = client.videos.list(mid=\"261168118\", keyword=\"旅游\", limit=1).first()\nif hit is not None:\n    print(hit.bvid, hit.title, hit.comment_count, \"comments\")\n\n# Fetch the full feed page to access category breakdown and pagination info.\ntry:\n    feed = client.video_feeds.get(mid=\"261168118\", page_size=5)\nexcept InputFormatInvalid:\n    print(\"Invalid channel ID format\")\nelse:\n    print(f\"Total videos: {feed.page.total}, this page: {feed.page.current}\")\n    for tid, cat in feed.categories.items():\n        print(f\"  {cat.name}: {cat.count} videos\")\n\nprint(\"exercised: videos.list / video_feeds.get / VideoOrder / InputFormatInvalid\")\n","endpoints":["get_channel_videos"],"has_session":false,"shape":"parse_sdk","hover_map":[{"line":7,"col":4,"len":5,"label":"video: Video","kind":"variable"},{"line":11,"col":0,"len":3,"label":"hit: Video","kind":"variable"},{"line":4,"col":9,"len":8,"label":"Bilibili — API client","kind":"class"},{"line":7,"col":27,"len":4,"label":"list() → List[Video]","kind":"method"},{"line":12,"col":3,"len":3,"label":"hit: Video","kind":"variable"},{"line":17,"col":4,"len":4,"label":"feed: VideoFeed","kind":"variable"},{"line":18,"col":7,"len":18,"label":"InputFormatInvalid — error: A supplied input parameter has an invalid format","kind":"error"},{"line":7,"col":66,"len":5,"label":"VideoOrder.CLICK","kind":"enum-member"},{"line":8,"col":16,"len":5,"label":"title: str","kind":"field"},{"line":8,"col":56,"len":8,"label":"duration: str","kind":"field"},{"line":13,"col":14,"len":4,"label":"bvid: str","kind":"field"},{"line":13,"col":24,"len":5,"label":"title: str","kind":"field"},{"line":13,"col":35,"len":13,"label":"comment_count: int","kind":"field"},{"line":17,"col":30,"len":3,"label":"get() → VideoFeed","kind":"method"},{"line":7,"col":55,"len":10,"label":"VideoOrder — enum: CLICK, PUBDATE, STOW","kind":"enum"},{"line":8,"col":10,"len":5,"label":"video: Video","kind":"variable"},{"line":8,"col":50,"len":5,"label":"video: Video","kind":"variable"},{"line":11,"col":20,"len":4,"label":"list() → List[Video]","kind":"method"},{"line":13,"col":10,"len":3,"label":"hit: Video","kind":"variable"},{"line":13,"col":20,"len":3,"label":"hit: Video","kind":"variable"},{"line":13,"col":31,"len":3,"label":"hit: Video","kind":"variable"},{"line":22,"col":25,"len":10,"label":"categories: Dict[str, Category]","kind":"field"},{"line":8,"col":36,"len":10,"label":"play_count: int","kind":"field"},{"line":21,"col":37,"len":5,"label":"total: int","kind":"field"},{"line":21,"col":67,"len":7,"label":"current: int","kind":"field"},{"line":22,"col":20,"len":4,"label":"feed: VideoFeed","kind":"variable"},{"line":8,"col":30,"len":5,"label":"video: Video","kind":"variable"},{"line":21,"col":32,"len":4,"label":"page: PageInfo","kind":"field"},{"line":21,"col":62,"len":4,"label":"page: PageInfo","kind":"field"},{"line":21,"col":27,"len":4,"label":"feed: VideoFeed","kind":"variable"},{"line":21,"col":57,"len":4,"label":"feed: VideoFeed","kind":"variable"}]},"sdk_delivery_state":"available","summary":"Retrieve the video feed for a Bilibili user channel, with sorting, filtering, and pagination.","updated_at":"2026-08-15T01:52:16.543557+00:00","user_variants":[],"latest_version":1,"user_status":null,"user_scraper_id":null,"contributes_to_marketplace":true,"pinned_version":null,"seo_content":{"faqs":[{"a":"Bilibili does not publish a general-purpose public developer API for third-party use. There is no official API portal or documented REST API available to external developers.","q":"Does Bilibili have an official developer API?"},{"a":"Every response from `get_channel_videos` includes a `categories` field that maps each `tid` integer to a category name and the count of videos in that category for the requested channel. Call the endpoint once with `tid=0` (all categories) to retrieve this map, then re-call with the specific `tid` you want.","q":"How do I find the right `tid` value to filter a channel by category?"},{"a":"The API returns publicly visible videos on a channel's upload page. Videos that are private, hidden, or gated behind Bilibili membership are not included in the response. You can fork this API on Parse and revise it to handle authenticated sessions if your use case requires access to restricted content.","q":"Does the API return private or members-only videos on a channel?"},{"a":"Not currently. The API covers the video feed for a channel, including per-video metadata and the channel's category breakdown, but does not include subscriber counts, channel descriptions, or live stream listings. You can fork it on Parse and revise to add an endpoint covering those fields.","q":"Does the API return channel subscriber counts, channel-level bios, or live stream data?"},{"a":"The `page_size` parameter accepts a maximum value of 50. To retrieve more videos, increment the `page` parameter and continue paginating. The `page.total` field in the response tells you the total number of videos available for the current filter, so you can determine upfront how many requests are needed.","q":"What is the maximum number of videos I can retrieve per request?"}],"keywords":["bilibili channel videos API","bilibili user space video feed","bilibili video metadata API","space.bilibili.com scraper API","bilibili danmaku count API","bilibili play count API","bilibili video pagination API","bilibili creator uploads API","bilibili video category filter API","bilibili channel video list","bilibili bvid API","fetch bilibili videos by user ID","bilibili mid video endpoint","bilibili video thumbnail API"],"use_cases":["Track a creator's upload history by paginating all videos sorted by `created` timestamp.","Build a category-aware video browser using the `categories` map returned per channel.","Monitor engagement trends by polling `play_count`, `comment_count`, and `danmaku_count` over time.","Index channel thumbnails and titles for a Bilibili content discovery or recommendation feed.","Search within a specific creator's uploads using the `keyword` parameter to surface relevant clips.","Compare video output across channels by collecting `page.total` from multiple `mid` values.","Filter a prolific channel's content to a single content type by passing category `tid` values."],"meta_title":"Bilibili Channel Videos API | space.bilibili.com","generated_at":"2026-08-15T01:53:42.858531+00:00","lead_paragraph":"The Bilibili Channel Videos API exposes a single endpoint, `get_channel_videos`, that returns up to 50 videos per page from any Bilibili user space, with 10 response fields per video including `bvid`, `play_count`, `danmaku_count`, `duration`, and `created` timestamp. You can filter by category using `tid` values returned in the same response, sort by publish date or popularity, and search by keyword within a channel — all by specifying a channel's numeric `mid`.","schema_version":2,"meta_description":"Fetch paginated video feeds from any Bilibili user channel. Returns titles, view counts, danmaku counts, thumbnails, durations, and category breakdowns.","primary_category":"streaming_video","long_description_md":"## What the endpoint returns\n\n`get_channel_videos` accepts a Bilibili user's numeric `mid` and returns a paginated list of their uploaded videos. Each video object includes identifiers (`bvid`, `aid`), display fields (`title`, `description`, `thumbnail`), engagement metrics (`play_count`, `comment_count`, `danmaku_count`), playback info (`duration`), and a Unix `created` timestamp. The response also includes a `page` object with the current page number, page size, and total video count across the channel.\n\n## Filtering and sorting\n\nThe `tid` parameter filters videos to a specific category. Valid category IDs for a given channel are returned in the `categories` field of every response — a mapping of `tid` to category name and video count — so you can enumerate available categories before filtering. Pass `tid=0` to retrieve all categories. The `order` parameter controls sort order (defaulting to newest-first by publish date), and `keyword` filters results to videos whose metadata matches a search term within the channel.\n\n## Pagination\n\nResults are paginated via the `page` and `page_size` parameters. `page` is 1-indexed, and `page_size` accepts values from 1 to 50. The `page.total` field in the response tells you the total number of videos, so you can calculate how many pages exist for a given channel and category combination before walking through them.","generated_with_model":"global.anthropic.claude-sonnet-4-6","secondary_categories":["social_media","entertainment"]},"primary_category":"streaming_video","secondary_categories":["social_media","entertainment"],"access_requirements":[]}