Docs
View as Markdown

bilibili.popular

stable 3 credits may need a pack

Bilibili popular (hot) videos right now.

GET /v1/bilibili/popular

What you get#

A list of Bilibili results in Onekey's unified shape, in data (an array). An empty array is a normal, successful answer and is charged like any other; a source that reports "nothing found" as an error returns a free 404 not_found instead.

What it costs#

  • 3 credits for a fresh fetch, charged only when it succeeds.
  • Free when served from cache (0.2 credit for a cached response over 100 KB).
  • Free if the request is invalid (never charged) or the source fails or reports not found (refunded).

Parameters#

This endpoint takes no parameters.

Request#

curl "https://api.onekey.dev/v1/bilibili/popular" \
  -H "x-api-key: YOUR_API_KEY"

Try it

Add your key to run this call right here. No key? Get one free. The key stays in this tab.

Recorded response#

A real Bilibili response, recorded and returned in Onekey's shape. Fields the platform does not provide are null.

json
{
  "success": true,
  "data": [
    {
      "content": {
        "id": "117343824973370",
        "title": "三幻魔集结!超越神的力量!【水无月菌】",
        "text": "感谢观看!喜欢记得三连点个关注!\n三幻魔真的很好玩!!!\n非竞技构筑和竞技对局,希望大家看得开心!!!",
        "createdAt": "2026-09-28T11:30:00Z"
      },
      "ext": {
        "bvid": "BV14Qah6DEBL",
        "danmaku": 10423,
        "coins": 110562
      },
      "author": {
        "id": "1958342",
        "displayName": "水无月菌",
        "avatarUrl": "https://i2.hdslb.com/bfs/face/f9c8a8ecb20f3e1a8cb7f93c579e06a40f01ecb2.jpg"
      },
      "engagement": {
        "views": 827436,
        "likes": 113788,
        "comments": 5189,
        "shares": 13569,
        "bookmarks": 29771
      },
      "media": {
        "durationSeconds": 1183,
        "thumbnailUrl": "http://i1.hdslb.com/bfs/archive/e1c966d35be7a8b71a844d35d106ddbebf96e00b.jpg"
      }
    },
    {
      "content": {
        "id": "117343120398899",
        "title": "《原神》六周年主题曲《风的来信》",
        "text": "旅途有你,就是意义。\n——————————————————\n音乐出品:HOYO-MiX\n作曲:赵鑫(HOYO-MiX)\n \n中文演唱:孙晔\n英文演唱:Griffin Burns\n日文演唱:西川贵教\n韩文演唱:南度亨\n\n《原神》bilibili服下载地址: https://www.biligame.com/detail/?id=103496",
        "createdAt": "2026-09-28T04:00:00Z"
      },
      "ext": {
        "bvid": "BV14Baa6JENd",
        "danmaku": 35641,
        "coins": 185125
      },
      "author": {
        "id": "401742377",
        "displayName": "原神",
        "avatarUrl": "https://i2.hdslb.com/bfs/face/e63bacc8b9e68f59f401cc41728a99262ba661a3.jpg"
      },
      "engagement": {
        "views": 1848011,
        "likes": 294305,
        "comments": 16451,
        "shares": 37393,
        "bookmarks": 89774
      },
      "media": {
        "durationSeconds": 878,
        "thumbnailUrl": "http://i2.hdslb.com/bfs/archive/e0fff47818224cf8016d5743fb8b35a2c3812eb8.jpg"
      }
    }
  ],
  "metadata": {
    "platform": "bilibili",
    "endpoint": "popular",
    "cached": false,
    "stale": false,
    "age_s": 0,
    "fetched_at": "2026-01-01T12:00:00+00:00",
    "credits_charged": 3,
    "request_id": "7f3a9c2e5b1d4c8fa2e6d0b9c4f18e37"
  },
  "error": null
}

Field mapping#

How this endpoint's source fields become Onekey's unified schema. Fields the source lacks come back as null.

Source pathOnekey fieldTransform
aidcontent.idtoString
bvidext.bvid-
titlecontent.titlestripHtml
desccontent.text-
pubdatecontent.createdAttoIsoDate
owner.midauthor.idtoString
owner.nameauthor.displayName-
owner.faceauthor.avatarUrlsafeUrl
stat.viewengagement.viewstoNumber
stat.likeengagement.likestoNumber
stat.replyengagement.commentstoNumber
stat.shareengagement.sharestoNumber
stat.danmakuext.danmakutoNumber
stat.coinext.coinstoNumber
stat.favoriteengagement.bookmarkstoNumber
durationmedia.durationSecondstoNumber
picmedia.thumbnailUrlsafeUrl

Caching and freshness#

  • Fresh for about 30 seconds. Repeat calls in that window are served from cache and are free.
  • Between 30 seconds and 5 minutes the cached copy is still served instantly and marked stale: true while Onekey refreshes it in the background.
  • If the source is down when a refresh is needed, the last copy can be served for up to 15 minutes more (marked stale).
  • A "not found" is remembered for 1 minute and is free.
  • The cache is shared across all customers, which is what keeps repeat calls cheap.

What can go wrong#

StatusCodeWhat to do
401unauthorizedCheck the x-api-key header.
402insufficient_creditsAdd credits; your balance must cover the price.
404not_foundUnknown endpoint path.
422invalid_paramsFix the parameters using the table above. Free.
429rate_limitedWait Retry-After seconds, then retry.
502upstream_errorThe source failed. Refunded; retry with backoff.

See Errors for the full list and retry guidance.

Status: stable (verified against the live source).