Sand AISand AI MAGI-2MAGI-2 est maintenant sur SandBase : vidéo 1080p avec audio natifEssayer maintenant

Bilibili Video Danmaku

Docs API
https://api.sandbase.ai/v1/api/bilibili/video-danmu

Get one page of danmaku comments for a Bilibili video segment identified by AID and CID. Use it to review time-synchronized audience reactions or page through danmaku for a known video.

Prix
$0.014286USD / appel
Méthode
POST
Réponse
JSON
Paramètres
2 obligatoires · 1 facultatifs

Bac à sable

Entrée
Bilibili Archive ID (AID).
Bilibili Chat ID (CID).
Page number for pagination.
SortiePrêt

Votre sortie apparaîtra ici

Complétez les entrées, puis cliquez sur Exécuter.

README de l'API

Bilibili Video Danmaku API

Returns one page of danmaku (time-synced viewer comments) for a Bilibili video segment. It needs the video's aid and cid, and takes an optional page number.

Use cases

  • Read the on-screen audience reactions for a specific video segment.
  • Collect danmaku text for sentiment or keyword analysis on a known video.
  • Plot when viewers comment most by grouping entries on their stime value.
  • Page through all danmaku of a video by increasing page.

Request

curl -X POST "https://api.sandbase.ai/v1/api/bilibili/video-danmu" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"aid": "80433022", "cid": "137649199"}'

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

Parameters

NameTypeRequiredDescription
aidstringYesBilibili Archive ID (AID).
cidstringYesBilibili Chat ID (CID).
pagestringNoPage number for pagination.

Example response

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

[
  {
    "color": 16777215,
    "date": 1593092327,
    "dmid": "34576873522987015",
    "id": 34576873522987015,
    "mode": 1,
    "size": 25,
    "stime": 95453,
    "text": "80年代迪厅必放金曲",
    "uhash": "d2b24dbe",
    "weight": 9
  }
]

Response fields

FieldMeaning
textThe danmaku comment text shown on screen.
stimeTime position of the comment in the video. The value 95453 suggests milliseconds, but the response does not state the unit.
dateTime the comment was posted, as a Unix timestamp in seconds.
id / dmidUnique ID of the danmaku. dmid is the same number as id, returned as a string.
uhashHashed ID of the user who sent the comment. It is not a plain user ID.
colorComment color as a decimal number. The value 16777215 is white (#FFFFFF).
mode / size / weightDisplay mode, font size and weight value of the comment. All three are plain numbers.

Notes

  • The response is a top-level JSON array. Each item is one danmaku comment.
  • Use page to move through further pages for the same aid and cid.
  • To find the aid from a BV ID, call Bilibili BV to AID Converter.
  • To list the parts of a video and get their cid values, call Bilibili Video Parts.

Pricing

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

Explorer plus

APIs associées

Toutes les APIs
APIPrixRéponse
Bilibili$0.014286 par appelJSON
Bilibili$0.001 par appelJSON
Bilibili$0.001 par appelJSON
Bilibili$0.001 par appelJSON
Bilibili$0.001 par appelJSON
Bilibili$0.001 par appelJSON

Guides :Best Bilibili API in 2026: Pricing Compared

Questions

FAQ

Comment utiliser l’API Bilibili Video Danmaku ?

Envoyez une requête POST à https://api.sandbase.ai/v1/api/bilibili/video-danmu avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.

Combien coûte l’API Bilibili Video Danmaku ?

$0.014286 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.

Quels paramètres l’API Bilibili Video Danmaku accepte-t-elle ?

Obligatoire : aid (string) et cid (string). Facultatif : page (string). Le tableau des paramètres et le Playground sur cette page listent tous les champs.

Que renvoie l’API Bilibili Video Danmaku ?

Une réponse JSON renvoyée dans la même requête HTTP (synchrone). Le README sur cette page inclut un exemple de réponse.

Ai-je besoin d’un compte développeur ou d’une clé API Bilibili ?

Non. Bilibili Video Danmaku fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API Bilibili séparément.