YouTube Get Video Streams

2.07 credits/call
ae_youtube_get_video_streams

## Inspect YouTube video formats Get a video's basic metadata and available audio/video formats to compare qualities or select a stream format. ### Inputs - `video_id`: YouTube video ID, recommended. - `video_url`: Full YouTube video URL, used when no `video_id` is supplied. If both are supplied, `video_id` takes precedence and `video_url` is ignored. Provide one of these identifiers. No proxy configuration is needed, and this tool has no proxy parameter. ### Returned information - Basic metadata such as title, author, duration and view count. - `formats`: Formats containing combined audio and video. - `adaptive_formats`: Video-only or audio-only formats. - Format details such as `itag`, `mime_type`, quality label, resolution and bitrate. - `available_qualities`: Available quality levels. - `hls_manifest_url` and `dash_manifest_url`, when available. **The `url` field within each stream format is null.** This tool returns format information, not directly playable or downloadable media URLs. A null format URL is expected and does not by itself indicate failure. `has_signature=true` indicates that a separate signed-URL retrieval step is needed. To obtain a playback URL, select an `itag` from `formats` or `adaptive_formats`, then use a separate signed-URL retrieval capability with the video ID and chosen `itag`. Higher-quality formats, often at 720p and above, may require separate audio/video retrieval and merging.

VideoAudio
2.07 credits/call

Pricing

2.07 credits/call
ConditionCharge
Each call2.07 credits/call

Each call has a fixed charge of 2.07 credits/call. Charges are per query. A successful query is billed even if it returns no results.

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
video_idstringNo视频ID/Video ID—
video_urlstringNo视频URL/Video URL (如果提供video_id则忽略此参数/Ignored if video_id is provided)—

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_youtube_get_video_streams' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "video_id": "IQLQFEz21Js"
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "code": 200,
  "data": {
    "adaptive_formats": [
      {
        "audio_quality": 30.852,
        "audio_sample_rate": 22050,
        "bitrate": 30.852,
        "content_length": 588517,
        "fps": null,
        "type": "audio"
      }
    ],
    "author": "Katrina",
    "formats": [
      {
        "audio_quality": null,
        "audio_sample_rate": 48000,
        "bitrate": 596.02,
        "content_length": 11364096,
        "fps": 30,
        "type": "video"
      }
    ],
    "is_live": false,
    "length_seconds": 153,
    "title": "不会写代码,却成了马斯克旗下AI负责人,她分享了 7 个“带 AI 团队”的方法。#AI #AI工具 #马斯克 #spacex"
  },
  "docs": "https://api.tikhub.io/#/YouTube-Web-V2-API/get_video_streams_api_v1_youtube_web_v2_get_video_streams_get",
  "message": "Request successful. This request will incur a charge.",
  "message_zh": "请求成功,本次请求将被计费。",
  "request_id": "48704093-cfdd-4596-b03a-04d917516269"
}

This example shows part of the response. Copied content is valid JSON.