YouTube Video Information

https://api.sandbase.ai/v1/api/youtube/web-v2/video-info

Returns detailed video information and caption tracks for a specified YouTube video ID. Supports optional parameters to format output data and set language preferences.

Price
$0.0015USD / callFirst 100 calls per day free (shared per organization)
Method
POST
Response
JSON
Parameters
1 required · 2 optional
Production route

Try the model

Playground

Open playground
Input
**Purpose**: Set language preference
Whether to clean and format the data
**Purpose**: Video ID
OutputExample
Responseoutputs · 17.4 KB · 507 lines
[
  {
    "data": {
      "allow_ratings": true,
      "author": "Rick Astley",
      "available_countries": [
        "AD",
        "AE",
        "AF",
        "AG",
        "AI",
        "AL",
        "AM",
        "AO",
        "AQ",
        "AR",
        "AS",
        "AT",
        "AU",
        "AW",
        "AX",
        "AZ",
        "BA",
        "BB",
        "BD",
        "BE",
        "BF",
        "BG",
        "BH",
        "BI",
        "BJ",
        "BL",
        "BM",
        "BN",
        "BO",
        "BQ",
        "BR",
        "BS",
        "BT",
        "BV",
        "BW",
        "BY",
        "BZ",
        "CA",
        "CC",
        "CD",
        "CF",
        "CG",
        "CH",
        "CI",
        "CK",
        "CL",
        "CM",
        "CN",
        "CO",
        "CR",
        "CU",
        "CV",
        "CW",
        "CX",
        "CY",
        "CZ",
        "DE",
        "DJ",
        "DK",
        "DM",
        "DO",
        "DZ",
        "EC",
        "EE",
        "EG",
        "EH",
        "ER",
        "ES",
        "ET",
        "FI",
        "FJ",
        "FK",
        "FM",
        "FO",
        "FR",
        "GA",
        "GB",
        "GD",
        "GE",
        "GF",
        "GG",
        "GH",
        "GI",
        "GL",
        "GM",
        "GN",
        "GP",
        "GQ",
        "GR",
        "GS",
        "GT",
        "GU",
        "GW",
        "GY",
        "HK",
        "HM",
        "HN",
        "HR",
        "HT",
        "HU",
        "ID",
        "IE",
        "IL",
        "IM",
        "IN",
        "IO",
        "IQ",
        "IR",
        "IS",
        "IT",
        "JE",
        "JM",
        "JO",
        "JP",
        "KE",
        "KG",
        "KH",
        "KI",
        "KM",
        "KN",
        "KP",
        "KR",
        "KW",
        "KY",
        "KZ",
        "LA",
        "LB",
        "LC",
        "LI",
        "LK",
        "LR",
        "LS",
        "LT",
        "LU",
        "LV",
        "LY",
        "MA",
        "MC",
        "MD",
        "ME",
        "MF",
        "MG",
        "MH",
        "MK",
        "ML",
        "MM",
        "MN",
        "MO",
        "MP",
        "MQ",
        "MR",
        "MS",
        "MT",
        "MU",
        "MV",
        "MW",
        "MX",
        "MY",
        "MZ",
        "NA",
        "NC",
        "NE",
        "NF",
        "NG",
        "NI",
        "NL",
        "NO",
        "NP",
        "NR",
        "NU",
        "NZ",
        "OM",
        "PA",
        "PE",
        "PF",
        "PG",
        "PH",
        "PK",
        "PL",
        "PM",
        "PN",
        "PR",
        "PS",
        "PT",
        "PW",
        "PY",
        "QA",
        "RE",
        "RO",
        "RS",
        "RU",
        "RW",
        "SA",
        "SB",
        "SC",
        "SD",
        "SE",
        "SG",
        "SH",
        "SI",
        "SJ",
        "SK",
        "SL",
        "SM",
        "SN",
        "SO",
        "SR",
        "SS",
        "ST",
        "SV",
        "SX",
        "SY",
        "SZ",
        "TC",
        "TD",
        "TF",
        "TG",
        "TH",
        "TJ",
        "TK",
        "TL",
        "TM",
        "TN",
        "TO",
        "TR",
        "TT",
        "TV",
        "TW",
        "TZ",
        "UA",
        "UG",
        "UM",
        "US",
        "UY",
        "UZ",
        "VA",
        "VC",
        "VE",
        "VG",
        "VI",
        "VN",
        "VU",
        "WF",
        "WS",
        "YE",
        "YT",
        "ZA",
        "ZM",
        "ZW"
      ],
      "badge_tooltip": "音乐人官方频道",
      "captions": [
        {
          "base_url": "https://www.youtube.com/api/timedtext?v=dQw4w9WgXcQ&ei=quvEapT4C4O0kucP77OG0Qw&caps=asr&opi=112496729&exp=xpe&xoaf=5&xowf=1&hl=zh-CN&ip=0.0.0.0&ipbits=0&expire=1791315482&sparams=ip,ipbits,expire,v,ei,caps,opi,exp,xoaf&signature=7BF3257F4A17ECF6C86E7C7CD447FD1959E43BC3.C0D1AE7E2EA50B08A2CD2338CE8F6941175B39BF&key=yt8&lang=de-DE",
          "is_translatable": true,
          "kind": "",
          "language_code": "de-DE",
          "language_name": "德语(德国)"
        },
        {
          "base_url": "https://www.youtube.com/api/timedtext?v=dQw4w9WgXcQ&ei=quvEapT4C4O0kucP77OG0Qw&caps=asr&opi=112496729&exp=xpe&xoaf=5&xowf=1&hl=zh-CN&ip=0.0.0.0&ipbits=0&expire=1791315482&sparams=ip,ipbits,expire,v,ei,caps,opi,exp,xoaf&signature=7BF3257F4A17ECF6C86E7C7CD447FD1959E43BC3.C0D1AE7E2EA50B08A2CD2338CE8F6941175B39BF&key=yt8&lang=pt-BR",
          "is_translatable": true,
          "kind": "",
          "language_code": "pt-BR",
          "language_name": "葡萄牙语(巴西)"
        },
        {
          "base_url": "https://www.youtube.com/api/timedtext?v=dQw4w9WgXcQ&ei=quvEapT4C4O0kucP77OG0Qw&caps=asr&opi=112496729&exp=xpe&xoaf=5&xowf=1&hl=zh-CN&ip=0.0.0.0&ipbits=0&expire=1791315482&sparams=ip,ipbits,expire,v,ei,caps,opi,exp,xoaf&signature=7BF3257F4A17ECF6C86E7C7CD447FD1959E43BC3.C0D1AE7E2EA50B08A2CD2338CE8F6941175B39BF&key=yt8&lang=ja",
          "is_translatable": true,
          "kind": "",
          "language_code": "ja",
          "language_name": "日语"
        },
        {
          "base_url": "https://www.youtube.com/api/timedtext?v=dQw4w9WgXcQ&ei=quvEapT4C4O0kucP77OG0Qw&caps=asr&opi=112496729&exp=xpe&xoaf=5&xowf=1&hl=zh-CN&ip=0.0.0.0&ipbits=0&expire=1791315482&sparams=ip,ipbits,expire,v,ei,caps,opi,exp,xoaf&signature=7BF3257F4A17ECF6C86E7C7CD447FD1959E43BC3.C0D1AE7E2EA50B08A2CD2338CE8F6941175B39BF&key=yt8&lang=es-419",
          "is_translatable": true,
          "kind": "",
          "language_code": "es-419",
          "language_name": "西班牙语(拉丁美洲)"
        },
        {
          "base_url": "https://www.youtube.com/api/timedtext?v=dQw4w9WgXcQ&ei=quvEapT4C4O0kucP77OG0Qw&caps=asr&opi=112496729&exp=xpe&xoaf=5&xowf=1&hl=zh-CN&ip=0.0.0.0&ipbits=0&expire=1791315482&sparams=ip,ipbits,expire,v,ei,caps,opi,exp,xoaf&signature=7BF3257F4A17ECF6C86E7C7CD447FD1959E43BC3.C0D1AE7E2EA50B08A2CD2338CE8F6941175B39BF&key=yt8&lang=en",
          "is_translatable": true,
          "kind": "",
          "language_code": "en",
          "language_name": "英语"
        },
        {
          "base_url": "https://www.youtube.com/api/timedtext?v=dQw4w9WgXcQ&ei=quvEapT4C4O0kucP77OG0Qw&caps=asr&opi=112496729&exp=xpe&xoaf=5&xowf=1&hl=zh-CN&ip=0.0.0.0&ipbits=0&expire=1791315482&sparams=ip,ipbits,expire,v,ei,caps,opi,exp,xoaf&signature=7BF3257F4A17ECF6C86E7C7CD447FD1959E43BC3.C0D1AE7E2EA50B08A2CD2338CE8F6941175B39BF&key=yt8&kind=asr&lang=en",
          "is_translatable": true,
          "kind": "asr",
          "language_code": "en",
          "language_name": "英语 (自动生成)"
        }

Examples

Select an example to load its inputs and result into the playground.

Model card

Specifications

Pricing

Base price
$0.0015 / run
Daily free calls
First 100 calls per day free (shared per organization)

Request & response

Method
POST
Request body
application/json
Response
application/json
Execution
sync

Parameters

video_id
string · required
language_code
string · optional
need_format
boolean · optional

Access

Provider
YouTube
API
Platform API
Base URL
https://api.sandbase.ai
Endpoint
/v1/api/youtube/web-v2/video-info
Authentication
Bearer API key

API README

YouTube Video Information API

Retrieve video information and caption URLs for a specific video using video_id. You can optionally format the response with need_format and select language preferences with language_code.

Use cases

  • Retrieve caption track URLs for automated subtitle extraction.
  • Inspect YouTube video metadata for media workflows.
  • Filter video metadata by language preference.

Request

curl -X POST "https://api.sandbase.ai/v1/api/youtube/web-v2/video-info" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"video_id": "dQw4w9WgXcQ"}'

Parameters

NameTypeRequiredDescription
video_idstringYesPurpose: Video ID
need_formatbooleanNoWhether to clean and format the data
language_codestringNoPurpose: Set language preference

Example response

Real response for the request above, trimmed to the main fields. User names and long IDs are masked.

{
  "captions": [
    {
      "base_url": "https://www.youtube.com/api/timedtext?v=dQw4w9WgXcQ&ei=quvEapT4C4O0kucP77OG0Qw&c…",
      "language_name": "德语(德国)"
    }
  ]
}

Notes

  • Set need_format to true to return cleaned and formatted data.
  • Use language_code to specify a preferred language for returned captions.

Related APIs

Start building

Send your first request

Platform API endpoint with unified authentication and usage tracking.

Production API
Platform API endpoint
https://api.sandbase.ai/v1/api/youtube/web-v2/video-info
Authorization header
Authorization: Bearer $SANDBASE_API_KEY
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
  -X POST "https://api.sandbase.ai/v1/api/youtube/web-v2/video-info" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'SANDBASE_JSON'
{
  "video_id": "dQw4w9WgXcQ",
  "need_format": true,
  "language_code": "zh-CN"
}
SANDBASE_JSON
)
printf '%s\n' "$result"

Explore more

Related APIs

All APIs
APIPriceResponseReleased
YouTube$0.0015 per callJSONJul 31, 2026
YouTube$0.0015 per callJSONJul 31, 2026
YouTube$0.0015 per callJSONJul 31, 2026
YouTube$0.0015 per callJSONJul 31, 2026
YouTube$0.0015 per callJSONJul 31, 2026
YouTube$0.0015 per callJSONJul 31, 2026

Questions

FAQ

How do I use the YouTube Video Information API?

Send a POST request to https://api.sandbase.ai/v1/api/youtube/web-v2/video-info with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

How much does the YouTube Video Information API cost?

$0.0015 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

What parameters does the YouTube Video Information API accept?

Required: video_id (string). Optional: language_code (string) and need_format (boolean). The Parameters table and the Playground on this page list every field.

What does the YouTube Video Information API return?

A JSON response returned in the same HTTP request (synchronous). The README on this page includes a sample response.

Do I need a YouTube developer account or API key?

No. YouTube Video Information runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for YouTube API access separately.