Sand AISand AI MAGI-2MAGI-2 ya está en SandBase: video en 1080p con audio nativoPruébalo ahora

Bilibili Video Danmaku

Documentación de la 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.

Precio
$0.014286USD / llamada
Método
POST
Respuesta
JSON
Parámetros
2 obligatorios · 1 opcionales

Entorno de pruebas

Entrada
Bilibili Archive ID (AID).
Bilibili Chat ID (CID).
Page number for pagination.
SalidaListo

Su salida aparecerá aquí

Complete las entradas y luego haga clic en Ejecutar.

README de la 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 más

APIs relacionadas

Todas las APIs
APIPrecioRespuesta
Bilibili$0.014286 por llamadaJSON
Bilibili$0.001 por llamadaJSON
Bilibili$0.001 por llamadaJSON
Bilibili$0.001 por llamadaJSON
Bilibili$0.001 por llamadaJSON
Bilibili$0.001 por llamadaJSON

Guías:Best Bilibili API in 2026: Pricing Compared

Preguntas

FAQ

¿Cómo uso la API de Bilibili Video Danmaku?

Envía una solicitud POST a https://api.sandbase.ai/v1/api/bilibili/video-danmu con tu clave API de SandBase en el encabezado Authorization (Bearer) y los parámetros como un cuerpo JSON. También puedes probarlo en el Playground de esta página sin escribir código.

¿Cuánto cuesta la API de Bilibili Video Danmaku?

$0.014286 por llamada, facturado desde tu saldo de SandBase. Solo se te cobra por las llamadas que haces; no hay suscripción.

¿Qué parámetros acepta la API de Bilibili Video Danmaku?

Requeridos: aid (string) y cid (string). Opcionales: page (string). La tabla de Parámetros y el Playground de esta página enumeran todos los campos.

¿Qué devuelve la API de Bilibili Video Danmaku?

Una respuesta JSON devuelta en la misma solicitud HTTP (sincrónica). El README de esta página incluye una respuesta de ejemplo.

¿Necesito una cuenta de desarrollador o una clave API de Bilibili?

No. Bilibili Video Danmaku funciona a través de SandBase, así que una sola clave API de SandBase cubre este endpoint y todas las demás APIs y modelos del catálogo. No necesitas solicitar acceso a la API de Bilibili por separado.