Sand AISand AI MAGI-2MAGI-2가 이제 SandBase에서 제공됩니다: 네이티브 오디오가 포함된 1080p 동영상지금 사용해 보기

YouTube Video Streams (V2)

API 문서
https://api.sandbase.ai/v1/api/youtube/web-v2/video-streams-v2

Retrieves stream information and playback details for a YouTube video. Queries data using either a video ID or a full video URL.

가격
$0.004USD / 호출
메서드
POST
응답
JSON
매개변수
필수 0개 · 선택 사항 2개

Playground

입력
Video ID (recommended)
Full video URL (optional, ignored if video_id is provided)
출력준비됨

출력이 여기에 표시됩니다

입력을 완료한 다음 Run을 클릭하세요.

API README

YouTube Video Streams (V2) API

Returns stream details for one YouTube video: title, author, length, view count, and lists of downloadable video and audio formats with their URLs. It needs a video_id or a full video_url.

Use cases

  • List the audio-only formats of a video to build a podcast-style player.
  • Pick a progressive MP4 format by quality_label and height for in-app playback.
  • Check is_live and length_seconds before queuing a video for processing.
  • Compare content_length across formats to estimate download sizes.

Request

curl -X POST "https://api.sandbase.ai/v1/api/youtube/web-v2/video-streams-v2" \
  -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.

Parameters

NameTypeRequiredDescription
video_idstringNoVideo ID (recommended)
video_urlstringNoFull video URL (optional, ignored if video_id is provided)

Example response

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"
}

Response fields

FieldMeaning
title / author / video_idVideo title, channel name, and the 11-character video ID.
length_seconds / view_countVideo length in seconds and the view count.
is_livetrue if the video is a live stream, false otherwise.
short_descriptionStart of the video description text. Long descriptions are cut.
thumbnail[].urlLink to a thumbnail image for the video.
formats[]Formats that carry video in a single file. Each row has itag, mime_type, quality, quality_label, width, height and fps.
adaptive_formats[]Separate audio-only or video-only formats. Check type to tell them apart, and audio_sample_rate for audio rows.
formats[].url / adaptive_formats[].urlDirect stream URL for that format. It stops working after the time set in expires_in_seconds.
bitrate / content_lengthBitrate value and file size of the format. content_length is the size of the stream data.
available_qualities / expires_in_secondsQuality labels found in the response, and the number of seconds the stream URLs stay valid.

Notes

  • Send video_id when you can. The API ignores video_url if video_id is set.
  • The video_id is the value after v= in a watch URL, such as dQw4w9WgXcQ.
  • Stream URLs are time-limited. Use them within expires_in_seconds of the call.
  • For title, description and stats without stream links, see YouTube Video Information (V2). For captions, see YouTube Video Captions.

Pricing

$0.004 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

더 살펴보기

관련 API

모든 API
API가격응답
YouTube$0.004 / 호출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

질문

FAQ

YouTube Video Streams (V2) API를 어떻게 사용하나요?

Authorization 헤더(Bearer)에 SandBase API 키를 넣고, 매개변수를 JSON 본문으로 담아 https://api.sandbase.ai/v1/api/youtube/web-v2/video-streams-v2에 POST 요청을 보내세요. 이 페이지의 Playground에서도 코드를 작성하지 않고 직접 테스트할 수 있습니다.

YouTube Video Streams (V2) API 비용은 얼마인가요?

호출당 $0.004, SandBase 잔액에서 청구됩니다. 사용한 호출에 대해서만 요금이 부과되며, 구독은 없습니다.

YouTube Video Streams (V2) API는 어떤 매개변수를 받나요?

필수 매개변수는 없습니다. 선택: video_id (string) 및 video_url (string). 이 페이지의 Parameters 표와 Playground에 모든 필드가 나와 있습니다.

YouTube Video Streams (V2) API는 무엇을 반환하나요?

같은 HTTP 요청에서 반환되는 JSON 응답입니다(동기식). 이 페이지의 README에 샘플 응답이 포함되어 있습니다.

YouTube 개발자 계정이나 API 키가 필요한가요?

아니요. YouTube Video Streams (V2)은 SandBase를 통해 실행되므로, SandBase API 키 하나로 이 엔드포인트와 카탈로그의 다른 모든 API 및 모델을 사용할 수 있습니다. YouTube API 액세스를 별도로 신청할 필요는 없습니다.