videoIdstringrequerido
The unique identifier for a YouTube video.
https://api.sandbase.ai/v1/api/youtube/video-detailGet public details for a YouTube video identified by video ID. Use it to inspect a known video before further content or comment analysis.
Su salida aparecerá aquí
Complete las entradas y luego haga clic en Ejecutar.
Returns public details for one YouTube video: title, description, view and like counts, channel info, thumbnails, music credits, related videos, and lists of audio, video and subtitle file links. It needs a videoId, such as dQw4w9WgXcQ.
curl -X POST "https://api.sandbase.ai/v1/api/youtube/video-detail" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"videoId": "dQw4w9WgXcQ"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
videoId | string | Yes | The unique identifier for a YouTube video. |
lang | string | No | Optional IETF language tag for localized video details, such as en-US. Leave empty to use the default language. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"audios": {
"errorId": "Success",
"expiration": 1793713698,
"items": [
{
"extension": "m4a",
"isDrc": false,
"lastModified": 1766955925572207,
"lengthMs": 213089,
"mimeType": "audio/mp4; codecs=\"mp4a.40.2\"",
"size": 3449447,
"sizeText": "3.3MB",
"url": "https://redirector.googlevideo.com/videoplayback?expire=1793713698&ei=wpHpao6zJ4…"
}
]
},
"channel": {
"avatar": [
{
"height": 48,
"url": "https://yt3.ggpht.com/_ShEGOdg-t5YGJse14Ooq6FYBZqX_QSlhaTNjG06miYusm5lWm1UroLyVx…",
"width": 48
}
],
"handle": "@RickAstleyYT",
"id": "UCuAXFkgsw1L7xaCfnd5JJOw",
"isVerified": true,
"isVerifiedArtist": true,
"name": "Rick Astley",
"subscriberCountText": "4.56M subscribers",
"type": "channel"
},
"commentCountText": "2.4M",
"description": "The official video for “Never Gonna Give You Up” by Rick Astley. \n\nNever: The Au…",
"errorId": "Success",
"id": "dQw4w9WgXcQ",
"isCommentDisabled": false,
"isLiveNow": false,
"isLiveStream": false,
"isRegionRestricted": false,
"isUnlisted": false,
"lengthSeconds": 213
}
| Field | Meaning |
|---|---|
id / title / description | The video ID, the video title, and the start of the video description. |
viewCount / likeCount | Total views and likes as plain numbers. |
commentCountText | Comment count as display text, such as 2.4M. |
lengthSeconds | Video length in seconds. |
publishedTime / publishedTimeText | Publish time as an ISO 8601 timestamp with a UTC offset, and the same date as display text. |
isLiveNow / isLiveStream / isUnlisted / isRegionRestricted / isCommentDisabled | Boolean flags that show whether the video is live, a live stream, unlisted, region restricted, or has comments turned off. |
channel.id / channel.handle / channel.name | ID, handle and name of the channel that published the video. |
channel.subscriberCountText / channel.isVerified | Subscriber count as display text, and whether the channel is verified. |
musicCredits[].title / musicCredits[].artist / musicCredits[].album | Song title, artist and album listed for the video. |
related.items[].id / related.items[].title / related.items[].viewCountText | ID, title and view count text of each related video. |
videos.items[].quality / videos.items[].url / audios.items[].url | Quality label and file link for each video or audio stream. The hasAudio field shows whether a video file includes sound. |
subtitles.items[].code / subtitles.items[].url | Language code and file link for each subtitle track. |
videoId from a YouTube watch URL, where it follows v=. Video IDs in this response, such as E9de-cmycx8, are 11 characters.lang as a language tag such as en-US to get localized details. Leave it out for the default language.expiration value, a Unix timestamp in seconds. Use the links before that time.related.nextToken to continue the related video list. For comments, call YouTube Video Comments.$0.014286 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/youtube/video-detail" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"videoId": "dQw4w9WgXcQ"
}'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.
videoIdstringrequeridoThe unique identifier for a YouTube video.
langstringOptional IETF language tag for localized video details, such as en-US. Leave empty to use the default language.
Respuesta de ejemplo guardada para esta API; no se realiza ninguna solicitud en vivo al verla.
No se ha publicado ninguna respuesta guardada. Ejecute la API en Playground para inspeccionar su respuesta.
Explorar más
| API | Precio | Respuesta |
|---|---|---|
YouTube Video DetailsEsta API YouTube | $0.014286 por llamada | JSON |
YouTube | Desde $0.00045 por llamada | JSON |
YouTube | Desde $0.0012 por llamada | JSON |
YouTube | Desde $0.0012 por llamada | JSON |
YouTube | Desde $0.0012 por llamada | JSON |
YouTube | $0.014286 por llamada | JSON |
Preguntas
Envía una solicitud POST a https://api.sandbase.ai/v1/api/youtube/video-detail 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.014286 por llamada, facturado desde tu saldo de SandBase. Solo se te cobra por las llamadas que haces; no hay suscripción.
Requeridos: videoId (string). Opcionales: lang (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. YouTube Video Details 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 YouTube por separado.