Sand AISand AI MAGI-2MAGI-2 agora está na SandBase: vídeo em 1080p com áudio nativoExperimente agora

Bilibili Video Danmaku

Docs da 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.

Preço
$0.014286USD / chamada
Método
POST
Resposta
JSON
Parâmetros
2 obrigatórios · 1 opcionais

Playground

Entrada
Bilibili Archive ID (AID).
Bilibili Chat ID (CID).
Page number for pagination.
SaídaPronto

Sua saída aparecerá aqui

Preencha as entradas e clique em Executar.

README da 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.

Explorar mais

APIs relacionadas

Todas as APIs
APIPreçoResposta
Bilibili$0.014286 por chamadaJSON
Bilibili$0.001 por chamadaJSON
Bilibili$0.001 por chamadaJSON
Bilibili$0.001 por chamadaJSON
Bilibili$0.001 por chamadaJSON
Bilibili$0.001 por chamadaJSON

Guias:Best Bilibili API in 2026: Pricing Compared

Perguntas

FAQ

Como eu uso a API Bilibili Video Danmaku?

Envie uma solicitação POST para https://api.sandbase.ai/v1/api/bilibili/video-danmu com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.

Quanto custa a API Bilibili Video Danmaku?

$0.014286 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.

Quais parâmetros a API Bilibili Video Danmaku aceita?

Obrigatórios: aid (string) e cid (string). Opcionais: page (string). A tabela de Parâmetros e o Playground nesta página listam todos os campos.

O que a API Bilibili Video Danmaku retorna?

Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.

Preciso de uma conta de desenvolvedor Bilibili ou de uma chave de API?

Não. Bilibili Video Danmaku funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do Bilibili separadamente.