room_idstringrequerido
Live room ID
https://api.sandbase.ai/v1/api/bilibili/web/live-videosReturns stream URLs and playback connection details for a specific Bilibili broadcast room. Filter using the unique room identifier.
[
{
"data": {
"code": 0,
"data": {
"accept_quality": [
"4"
],
"current_qn": 10000,
"current_quality": 4,
"durl": [
{
"length": 0,
"order": 1,
"p2p_type": -1,
"stream_type": 0,
"url": "https://d1--ov-gotcha07.bilivideo.com/live-bvc/451596/live_1777360364_82518558.flv?expires=1787221949&len=0&oi=2886142013&pt=android&qn=10000&trid=100067cbee5073cdf00f61032720556a86c9&bmt=1&sigparams=cdn,expires,len,oi,pt,qn,trid,bmt&cdn=ov-gotcha07&sign=f25581d628277c9b07e784ca6c24d5cf&site=4d5b259e7440cb62fbaeda813faecd46&free_type=0&mid=0&sche=ban&trace=0&isp=other&rg=other&pv=other&info_source=origin&sk=a418dfe3b5d2a85dc2243b92a1dda63d&pp=&origin_bitrate=0&hdr_type=0&sl=1&suffix=origin&deploy_env=prod&hot_cdn=0&p2p_type=-1&score=1&source=puv3_onetier&media_type=0&vd=bc&src=puv3&order=1"
},
{
"length": 0,
"order": 2,
"p2p_type": -1,
"stream_type": 0,
"url": "https://d1--ov-gotcha07b.bilivideo.com/live-bvc/451596/live_1777360364_82518558.flv?expires=1787221949&len=0&oi=2886142013&pt=android&qn=10000&trid=100067cbee5073cdf00f61032720556a86c9&bmt=1&sigparams=cdn,expires,len,oi,pt,qn,trid,bmt&cdn=ov-gotcha07&sign=f25581d628277c9b07e784ca6c24d5cf&site=4d5b259e7440cb62fbaeda813faecd46&free_type=0&mid=0&sche=ban&trace=0&isp=other&rg=other&pv=other&info_source=origin&sk=a418dfe3b5d2a85dc2243b92a1dda63d&pp=&origin_bitrate=0&hdr_type=0&sl=1&suffix=origin&deploy_env=prod&hot_cdn=0&p2p_type=-1&score=1&source=puv3_onetier&media_type=0&vd=bc&src=puv3&order=2"
}
],
"quality_description": [
{
"desc": "原画",
"qn": 10000
}
]
},
"message": "OK",
"ttl": 1
}
}
]Seleccione un ejemplo para cargar sus entradas y el resultado en el playground.
Returns stream URLs and quality settings for one Bilibili live room. The only input is room_id, the live room ID, sent as a string.
curl -X POST "https://api.sandbase.ai/v1/api/bilibili/web/live-videos" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"room_id": "1815229528"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
room_id | string | Yes | Live room ID |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"code": 0,
"data": {
"accept_quality": [
"4"
],
"current_qn": 10000,
"current_quality": 4,
"durl": [
{
"length": 0,
"order": 1,
"p2p_type": -1,
"stream_type": 0,
"url": "https://d1--ov-gotcha07.bilivideo.com/live-bvc/251381/live_1777360364_82518558.f…"
}
],
"quality_description": [
{
"desc": "原画",
"qn": 10000
}
]
},
"message": "OK",
"ttl": 1
}
| Field | Meaning |
|---|---|
data.durl[].url | Full stream URL for the room. The query string carries values such as expires and qn. |
data.durl[].order | Position of the stream URL in the list, starting at 1. Each entry points to a different host. |
data.durl[].stream_type / data.durl[].p2p_type / data.durl[].length | Stream type code, P2P type code and length value for each URL. In the sample, stream_type is 0, p2p_type is -1 and length is 0. |
data.current_qn | Quality number of the stream now being served. The sample returns 10000. |
data.current_quality | Current quality level as a small integer. The sample returns 4. |
data.accept_quality[] | Quality levels the room accepts, returned as strings. The sample lists "4". |
data.quality_description[].qn | Quality number that matches a quality label. |
data.quality_description[].desc | Text label for the quality number. In the sample, 10000 is labeled 原画. |
code / message | Status of the call. code is 0 and message is OK on success. |
room_id as a string, for example "1815229528".expires value in the query string, so fetch a fresh response before you play a stream.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Empiece a construir
Endpoint de la API de la plataforma con autenticación unificada y seguimiento de uso.
curl -X POST "https://api.sandbase.ai/v1/api/bilibili/web/live-videos" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"room_id": "1815229528"
}'Configure su clave de API de SandBase en el entorno de su servidor. Las solicitudes usan autenticación Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserve su clave en el servidor. No la exponga en código del navegador.
room_idstringrequeridoLive room ID
Respuesta de ejemplo guardada para esta API; no se realiza ninguna solicitud en vivo al verla.
[
{
"data": {
"code": 0,
"data": {
"accept_quality": [
"4"
],
"current_qn": 10000,
"current_quality": 4,
"durl": [
{
"length": 0,
"order": 1,
"p2p_type": -1,
"stream_type": 0,
"url": "https://d1--ov-gotcha07.bilivideo.com/live-bvc/451596/live_1777360364_82518558.flv?expires=1787221949&len=0&oi=2886142013&pt=android&qn=10000&trid=100067cbee5073cdf00f61032720556a86c9&bmt=1&sigparams=cdn,expires,len,oi,pt,qn,trid,bmt&cdn=ov-gotcha07&sign=f25581d628277c9b07e784ca6c24d5cf&site=4d5b259e7440cb62fbaeda813faecd46&free_type=0&mid=0&sche=ban&trace=0&isp=other&rg=other&pv=other&info_source=origin&sk=a418dfe3b5d2a85dc2243b92a1dda63d&pp=&origin_bitrate=0&hdr_type=0&sl=1&suffix=origin&deploy_env=prod&hot_cdn=0&p2p_type=-1&score=1&source=puv3_onetier&media_type=0&vd=bc&src=puv3&order=1"
},
{
"length": 0,
"order": 2,
"p2p_type": -1,
"stream_type": 0,
"url": "https://d1--ov-gotcha07b.bilivideo.com/live-bvc/451596/live_1777360364_82518558.flv?expires=1787221949&len=0&oi=2886142013&pt=android&qn=10000&trid=100067cbee5073cdf00f61032720556a86c9&bmt=1&sigparams=cdn,expires,len,oi,pt,qn,trid,bmt&cdn=ov-gotcha07&sign=f25581d628277c9b07e784ca6c24d5cf&site=4d5b259e7440cb62fbaeda813faecd46&free_type=0&mid=0&sche=ban&trace=0&isp=other&rg=other&pv=other&info_source=origin&sk=a418dfe3b5d2a85dc2243b92a1dda63d&pp=&origin_bitrate=0&hdr_type=0&sl=1&suffix=origin&deploy_env=prod&hot_cdn=0&p2p_type=-1&score=1&source=puv3_onetier&media_type=0&vd=bc&src=puv3&order=2"
}
],
"quality_description": [
{
"desc": "原画",
"qn": 10000
}
]
},
"message": "OK",
"ttl": 1
}
}
]Explorar más
| API | Precio | Respuesta |
|---|---|---|
Bilibili Room Stream DataEsta API Bilibili | $0.001 por llamada | JSON |
Bilibili | $0.001 por llamada | JSON |
Bilibili | $0.001 por llamada | JSON |
Bilibili | $0.001 por llamada | JSON |
Bilibili | $0.001 por llamada | JSON |
Bilibili | $0.001 por llamada | JSON |
Preguntas
Envía una solicitud POST a https://api.sandbase.ai/v1/api/bilibili/web/live-videos 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.
$0.001 por llamada, facturado desde tu saldo de SandBase. Solo se te cobra por las llamadas que haces; no hay suscripción.
Requeridos: room_id (string). La tabla de Parámetros y el Playground de esta página enumeran todos los campos.
Una respuesta JSON devuelta en la misma solicitud HTTP (sincrónica). El README de esta página incluye una respuesta de ejemplo.
No. Bilibili Room Stream Data 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.