video_idstring
Video ID (recommended)
https://api.sandbase.ai/v1/api/youtube/web-v2/video-streamsReturns stream details and media information for a specified YouTube video. Queries accept either a direct video identifier or a full video URL.
Ваш результат появится здесь
Заполните входные данные, затем нажмите «Запустить».
Returns the downloadable stream formats for one YouTube video, with basic video details such as title, author and length. It needs a video_id or a full video_url.
itag and mime_type for a podcast or transcription tool.curl -X POST "https://api.sandbase.ai/v1/api/youtube/web-v2/video-streams" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"video_id": "dQw4w9WgXcQ", "video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
video_id | string | No | Video ID (recommended) |
video_url | string | No | Full video URL (optional, ignored if video_id is provided) |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"adaptive_formats": [
{
"audio_quality": 30.813,
"audio_sample_rate": 22050,
"bitrate": 30.813,
"content_length": 821022,
"fps": null,
"has_signature": false,
"height": null,
"itag": 599,
"mime_type": "audio/mp4",
"quality": "ultralow",
"quality_label": "audio only",
"type": "audio"
}
],
"author": "Rick Astley",
"available_qualities": [
"audio only"
],
"expires_in_seconds": 21600,
"formats": [
{
"audio_quality": null,
"audio_sample_rate": 44100,
"bitrate": 444.226,
"content_length": 11832459,
"fps": 25,
"has_signature": false,
"height": 360,
"itag": 18,
"mime_type": "video/mp4",
"quality": "360p",
"quality_label": "640x360",
"type": "video"
}
],
"is_live": false,
"length_seconds": 213,
"short_description": "The official video for “Never Gonna Give You Up” by Rick Astley. \n\nNever: The Au…",
"strategy": "account_mweb",
"thumbnail": [
{
"url": "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/maxresdefault.webp"
}
],
"title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
"video_id": "dQw4w9WgXcQ"
}
| Field | Meaning |
|---|---|
title / author / video_id | Title of the video, name of the channel that published it, and the video ID. |
length_seconds | Length of the video in seconds. |
view_count | Number of views on the video. |
is_live | Whether the video is a live stream (false for this video). |
available_qualities | List of quality labels offered, such as audio only, 854x480 and 640x360. |
formats[] | Streams that carry video and audio together. Each row has itag, mime_type, quality_label, width, height, fps, bitrate and content_length. |
adaptive_formats[] | Separate streams, such as audio only. Each row has type, itag, mime_type, quality_label, audio_sample_rate, bitrate and content_length. |
formats[].url / adaptive_formats[].url | Direct link to the media stream for that format. |
expires_in_seconds | Number of seconds given for the stream URLs, 21600 in this response. |
thumbnail[].url | Link to a thumbnail image of the video. |
video_id when you have it. video_url is ignored if video_id is provided.video_id is the 11-character value after v= in a YouTube watch URL, such as dQw4w9WgXcQ.width, height and fps are null for audio-only streams.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Начните разработку
Конечная точка платформенного API с единообразной аутентификацией и учётом использования.
curl -X POST "https://api.sandbase.ai/v1/api/youtube/web-v2/video-streams" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"video_id": "dQw4w9WgXcQ",
"video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}'Укажите свой ключ SandBase API в окружении сервера. Запросы используют аутентификацию Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Храните ключ на сервере. Не раскрывайте его в коде браузера.
video_idstringVideo ID (recommended)
video_urlstringFull video URL (optional, ignored if video_id is provided)
Сохранённый пример ответа для этого API; при просмотре живой запрос не выполняется.
Сохранённый ответ не опубликован. Запустите API в Playground, чтобы посмотреть его ответ.
Посмотреть больше
| API | Цена | Ответ |
|---|---|---|
YouTube Video StreamsЭтот API YouTube | $0.001 за запрос | JSON |
YouTube | $0.001 за запрос | JSON |
YouTube | $0.001 за запрос | JSON |
YouTube | $0.001 за запрос | JSON |
YouTube | $0.001 за запрос | JSON |
YouTube | $0.001 за запрос | JSON |
Руководства:Best YouTube API in 2026: Pricing Compared
Вопросы
Отправьте POST-запрос на https://api.sandbase.ai/v1/api/youtube/web-v2/video-streams, указав ключ SandBase API в заголовке Authorization (Bearer), а параметры — в теле JSON. Вы также можете попробовать это в Playground на этой странице без написания кода.
$0.001 за вызов. Каждой организации предоставляется 100 бесплатных вызовов в сутки по UTC, общих для всех подходящих API SandBase, включая этот; после этого каждый вызов тарифицируется по этой цене и списывается с баланса SandBase. Подписка не требуется.
Параметры не требуются. Необязательные: video_id (string) и video_url (string). В таблице Parameters и в Playground на этой странице перечислены все поля.
JSON-ответ, возвращаемый в том же HTTP-запросе (синхронно). В README на этой странице приведен пример ответа.
Нет. YouTube Video Streams работает через SandBase, поэтому один API key SandBase покрывает этот endpoint и все остальные API и модели в каталоге. Вам не нужно отдельно запрашивать доступ к API YouTube.