Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

Bilibili App Home Feed

API 文件
https://api.sandbase.ai/v1/api/bilibili/app/home-feed

Returns recommended video items from the Bilibili app home feed. Supports pagination via timestamp index and pull-to-refresh controls.

價格
$0.001美元/次呼叫
方法
POST
回應
JSON
參數
0 個必填 · 3 個選填

Playground

輸入
Flush flag (0=normal load, 1=refresh)
Page index, defaults to current timestamp
Pull to refresh
輸出範例
回應outputs · 16.6 KB · 460 行
[
  {
    "data": {
      "code": 0,
      "data": {
        "config": {
          "auto_refresh_time": 1200,
          "auto_refresh_time_by_active": 1200,
          "auto_refresh_time_by_appear": 1200,
          "autoplay_card": 2,
          "card_density_exp": 1,
          "column": 2,
          "enable_rcmd_guide": true,
          "feed_clean_abtest": 0,
          "home_transfer_test": 0,
          "inline_sound": 2,
          "is_back_to_homepage": true,
          "pegasus_code": -1200,
          "rcmd_label_mng_entrance": 0,
          "show_inline_danmaku": 1,
          "small_cover_wh_ratio": 1.33,
          "space_enlarge_exp": 1,
          "toast": {},
          "visible_area": 80
        },
        "interest_choose": null,
        "items": [
          {
            "args": {
              "aid": 117378520259290,
              "tid": 68,
              "tname": "鬼畜",
              "up_id": 632887,
              "up_name": "伢伢gagako"
            },
            "can_play": 1,
            "card_goto": "av",
            "card_type": "small_cover_v2",
            "cover": "http://i2.hdslb.com/bfs/archive/bc86edae71763e450b07709de96d7f5af3eaa13b.jpg",
            "cover_info_priority": 123,
            "cover_left_1_content_description": "609.7万观看",
            "cover_left_2_content_description": "1149弹幕",
            "cover_left_icon_1": 1,
            "cover_left_icon_2": 3,
            "cover_left_text_1": "609.7万",
            "cover_left_text_2": "1149",
            "cover_right_content_description": "1分钟15秒",
            "cover_right_text": "1:15",
            "desc_button": {
              "event": "nickname",
              "text": "伢伢gagako",
              "type": 1,
              "uri": "bilibili://space/632887"
            },
            "goto": "av",
            "goto_icon": {
              "icon_height": 16,
              "icon_night_url": "https://i0.hdslb.com/bfs/activity-plat/static/20230227/0977767b2e79d8ad0a36a731068a83d7/ldbCXtkoK2.png",
              "icon_url": "https://i0.hdslb.com/bfs/activity-plat/static/20230227/0977767b2e79d8ad0a36a731068a83d7/077GOeHOfO.png",
              "icon_width": 16
            },
            "idx": 1791290317,
            "official_icon": 16,
            "param": "117378520259290",
            "player_args": {
              "aid": 117378520259290,
              "cid": 42438298118,
              "duration": 75,
              "type": "av"
            },
            "report_flow_data": "{\"flow_card_type\":\"av\"}",
            "talk_back": "视频,⚡️ 疯 狂 闪 身 步 ⚡️,609.7万观看,1149弹幕,时长1分钟15秒,UP主伢伢gagako,",
            "three_point": {
              "dislike_reasons": [
                {
                  "id": 4,
                  "name": "UP主:伢伢gagako",
                  "toast": "将减少相似内容推荐"
                },
                {
                  "id": 3,
                  "name": "频道:鬼畜",
                  "toast": "将减少相似内容推荐"
                },
                {
                  "id": 12,
                  "name": "此类内容过多",
                  "toast": "将减少相似内容推荐"
                },
                "… 2 more items in the full response"
              ],
              "feedbacks": [
                {
                  "id": 1,
                  "name": "恐怖血腥",
                  "toast": "将优化首页此类内容"
                },
                {
                  "id": 2,
                  "name": "色情低俗",
                  "toast": "将优化首页此类内容"
                },
                {
                  "id": 3,
                  "name": "封面恶心",
                  "toast": "将优化首页此类内容"
                },
                "… 1 more items in the full response"
              ],
              "watch_later": 1
            },
            "three_point_v": "v2",
            "three_point_v2": [
              {
                "icon": "https://i0.hdslb.com/bfs/activity-plat/static/ce06d65bc0a8d8aa2a463747ce2a4752/NyPAqcn0QF.png",
                "title": "添加至稍后再看",
                "type": "watch_later"
              },
              {
                "reasons": [
                  {
                    "id": 1,
                    "name": "恐怖血腥",
                    "toast": "将优化首页此类内容"
                  },
                  {
                    "id": 2,
                    "name": "色情低俗",
                    "toast": "将优化首页此类内容"
                  },
                  {
                    "id": 3,
                    "name": "封面恶心",
                    "toast": "将优化首页此类内容"
                  },
                  "… 1 more items in the full response"
                ],
                "subtitle": "(选择后将优化首页此类内容)",
                "title": "反馈",
                "type": "feedback"
              },
              {
                "reasons": [
                  {
                    "id": 4,
                    "name": "UP主:伢伢gagako",
                    "toast": "将减少相似内容推荐"
                  },
                  {
                    "id": 3,
                    "name": "频道:鬼畜",
                    "toast": "将减少相似内容推荐"
                  },
                  {
                    "id": 12,
                    "name": "此类内容过多",
                    "toast": "将减少相似内容推荐"
                  },
                  "… 2 more items in the full response"
                ],
                "subtitle": "(选择后将减少相似内容推荐)",
                "title": "不感兴趣",
                "type": "dislike"
              }
            ],
            "title": "⚡️ 疯 狂 闪 身 步 ⚡️",
            "track_id": "gateway_fb_58993830fd2d7e6e1896d167226ac4eb",
            "uri": "bilibili://video/117378520259290?cid=42438298118&player_height=2160&player_preload=%7B%22expire_time%22%3A1791293912%2C%22cid%22%3A42438298118%2C%22quality%22%3A32%2C%22file_info%22%3A%7B%2216%22%3A%7B%22infos%22%3A%5B%7B%22filesize%22%3A2161250%2C%22timelength%22%3A74666%7D%5D%7D%2C%2232%22%3A%7B%22infos%22%3A%5B%7B%22filesize%22%3A3192395%2C%22timelength%22%3A74666%7D%5D%7D%2C%2264%22%3A%7B%22infos%22%3A%5B%7B%22filesize%22%3A5590781%2C%22timelength%22%3A74666%7D%5D%7D%2C%2280%22%3A%7B%22infos%22%3A%5B%7B%22filesize%22%3A11507978%2C%22timelength%22%3A74666%7D%5D%7D%7D%2C%22video_codecid%22%3…"
          },
          {
            "args": {
              "aid": 117355585737986,
              "tid": 1615271,
              "tname": "米哈游",
              "up_id": 401742377,
              "up_name": "原神"
            },
            "can_play": 1,
            "card_goto": "av",
            "card_type": "small_cover_v2",
            "cover": "http://i0.hdslb.com/bfs/archive/29039a908967d67804af8bc1702def8e00f79374.jpg",
            "cover_info_priority": 123,
            "cover_left_1_content_description": "137.1万观看",
            "cover_left_2_content_description": "4135弹幕",
            "cover_left_icon_1": 1,
            "cover_left_icon_2": 3,
            "cover_left_text_1": "137.1万",
            "cover_left_text_2": "4135",
            "cover_right_content_description": "12分钟14秒",
            "cover_right_text": "12:14",
            "desc_button": {
              "event": "nickname",
              "text": "原神",
              "type": 1,
              "uri": "bilibili://space/401742377"
            },
            "goto": "av",
            "goto_icon": {
              "icon_height": 16,
              "icon_night_url": "https://i0.hdslb.com/bfs/activity-plat/static/20230227/0977767b2e79d8ad0a36a731068a83d7/ldbCXtkoK2.png",
              "icon_url": "https://i0.hdslb.com/bfs/activity-plat/static/20230227/0977767b2e79d8ad0a36a731068a83d7/077GOeHOfO.png",
              "icon_width": 16
            },
            "idx": 1791290316,
            "official_icon": 17,
            "param": "117355585737986",
            "player_args": {
              "aid": 117355585737986,
              "cid": 42317909895,
              "duration": 734,
              "type": "av"
            },
            "report_flow_data": "{\"flow_card_type\":\"av\"}",
            "talk_back": "视频,《原神》剧情PV-「燕归来」,137.1万观看,4135弹幕,时长12分钟14秒,UP主原神,",
            "three_point": {
              "dislike_reasons": [
                {
                  "id": 4,
                  "name": "UP主:原神",
                  "toast": "将减少相似内容推荐"
                },
                {
                  "id": 3,
                  "name": "频道:米哈游",
                  "toast": "将减少相似内容推荐"
                },
                {
                  "id": 12,
                  "name": "此类内容过多",
                  "toast": "将减少相似内容推荐"
                },
                "… 2 more items in the full response"
              ],
              "feedbacks": [
                {
                  "id": 1,
                  "name": "恐怖血腥",
                  "toast": "将优化首页此类内容"
                },
                {
                  "id": 2,
                  "name": "色情低俗",
                  "toast": "将优化首页此类内容"
                },
                {
                  "id": 3,
                  "name": "封面恶心",
                  "toast": "将优化首页此类内容"
                },
                "… 1 more items in the full response"
              ],
              "watch_later": 1
            },
            "three_point_v": "v2",
            "three_point_v2": [
              {
                "icon": "https://i0.hdslb.com/bfs/activity-plat/static/ce06d65bc0a8d8aa2a463747ce2a4752/NyPAqcn0QF.png",
                "title": "添加至稍后再看",
                "type": "watch_later"
              },
              {
                "reasons": [
                  {
                    "id": 1,
                    "name": "恐怖血腥",
                    "toast": "将优化首页此类内容"
                  },
                  {
                    "id": 2,
                    "name": "色情低俗",
                    "toast": "将优化首页此类内容"
                  },
                  {
                    "id": 3,
                    "name": "封面恶心",
                    "toast": "将优化首页此类内容"
                  },
                  "… 1 more items in the full response"
                ],
                "subtitle": "(选择后将优化首页此类内容)",
                "title": "反馈",
                "type": "feedback"
              },
              {
                "reasons": [
                  {
                    "id": 4,
                    "name": "UP主:原神",
                    "toast": "将减少相似内容推荐"
                  },
                  {
                    "id": 3,
                    "name": "频道:米哈游",
                    "toast": "将减少相似内容推荐"
                  },
                  {
                    "id": 12,
                    "name": "此类内容过多",
                    "toast": "将减少相似内容推荐"
                  },

範例

選擇一個範例,將其輸入與結果載入 playground。

API README

Bilibili App Home Feed API

Returns a page of recommended video cards from the Bilibili app home feed. Each card has the title, cover, creator, view and danmaku text, and duration. All inputs are optional, so an empty request returns a first page.

Use cases

  • Collect the videos Bilibili recommends on the app home feed at a given moment.
  • Build a list of creators and channels (up_name, tname) that appear in the feed.
  • Feed args.aid values into a video detail call to get full metadata for each recommended video.
  • Show a mobile-style recommendation list in a custom viewer.

Request

curl -X POST "https://api.sandbase.ai/v1/api/bilibili/app/home-feed" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
flushintegerNoFlush flag (0=normal load, 1=refresh)
idxintegerNoPage index, defaults to current timestamp
pullbooleanNoPull to refresh

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "code": 0,
  "data": {
    "config": {
      "auto_refresh_time": 1200,
      "auto_refresh_time_by_active": 1800,
      "auto_refresh_time_by_appear": 1800,
      "autoplay_card": 2,
      "card_density_exp": 1,
      "close_small_window": 1,
      "column": 2,
      "enable_rcmd_guide": true,
      "exposure_duration_end_ratio": 0.800000011920929,
      "exposure_duration_min_ms": 1,
      "exposure_duration_start_ratio": 0.800000011920929,
      "feed_clean_abtest": 0
    },
    "interest_choose": null,
    "items": [
      {
        "ad_info": {
          "card_index": 1,
          "client_ip": "146.190.39.116",
          "index": 1,
          "is_ad_loc": true,
          "request_id": "1793690837234q10a90a18a61q4499",
          "resource": 1897,
          "source": 1898
        },
        "args": {
          "aid": 117522066114493,
          "tid": 19822077,
          "tname": "#悬疑推理",
          "up_id": 281188808,
          "up_name": "听风的蚕基地"
        },
        "can_play": 1,
        "card_goto": "av",
        "card_type": "small_cover_v2",
        "cover": "http://i1.hdslb.com/bfs/archive/87c3fe6006d435225f498f2960d0f72ec970d5fa.jpg",
        "cover_info_priority": 123,
        "cover_left_1_content_description": "2491观看",
        "cover_left_2_content_description": "-弹幕",
        "cover_left_icon_1": 1,
        "cover_left_icon_2": 3,
        "cover_left_text_1": "2491"
      }
    ]
  },
  "message": "OK",
  "ttl": 1
}

Response fields

FieldMeaning
data.items[].titleTitle of the recommended video.
data.items[].args.aidNumeric ID of the video. It matches param and player_args.aid.
data.items[].args.up_id / data.items[].args.up_nameID and display name of the creator who uploaded the video.
data.items[].args.tid / data.items[].args.tnameID and name of the channel or tag attached to the video, for example #悬疑推理.
data.items[].coverURL of the cover image.
data.items[].cover_left_text_1 / data.items[].cover_left_text_2View count and danmaku count as display text, for example 1.7万. A - means no count is shown.
data.items[].cover_right_text / data.items[].player_args.durationVideo length as display text such as 13:01, and as a number 781, which equals 13 minutes 1 second.
data.items[].player_args.cidID of the video part (cid) used by the player.
data.items[].uriApp deep link that opens the video in the Bilibili app.
data.items[].idxIndex value of the card. It looks like a Unix timestamp in seconds and counts down by one from card to card.

Notes

  • Send {} to get the first page. idx defaults to the current timestamp.
  • For the next page, try passing the last item's idx as the idx parameter. Use flush set to 1 for a refresh load.
  • Some items carry an ad_info object. Items without it are normal video cards.
  • To get full details for a video, pass its args.aid to Bilibili App Single Video Details.

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

探索更多

相關 APIs

所有 APIs
API價格回應
Bilibili每次呼叫 $0.001JSON
Bilibili每次呼叫 $0.001JSON
Bilibili每次呼叫 $0.001JSON
Bilibili每次呼叫 $0.001JSON
Bilibili每次呼叫 $0.001JSON
Bilibili每次呼叫 $0.001JSON

指南:Best Bilibili API in 2026: Pricing Compared

問題

常見問題

我要如何使用 Bilibili App Home Feed API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/bilibili/app/home-feed。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

Bilibili App Home Feed API 的費用是多少?

每次 $0.001,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

Bilibili App Home Feed API 接受哪些參數?

不需要任何參數。 選填:flush (integer), idx (integer) 和 pull (boolean)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

Bilibili App Home Feed API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 Bilibili 開發者帳號或 API 金鑰嗎?

不需要。Bilibili App Home Feed 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Bilibili API 存取權。