YouTube Get Video Info
Retrieve details for one YouTube video. Inputs: - video_id (required string): exactly 11 characters. For https://www.youtube.com/watch?v=oaSNBz4qMQY, pass oaSNBz4qMQY rather than the full URL. - language_code (optional string): language preference; defaults to zh-CN. Examples include en-US, ja-JP and ko-KR. - need_format (optional boolean): defaults to true to clean the data, extract key content and remove redundant information. Set false to request data without this cleanup. Results: Video information is returned in the response data. Documented raw data includes playerResponse (videoDetails, streamingData and microformat) and initialData (watch-page information such as title, view and like counts, channel information and description). Actual fields and structure depend on YouTube's response and the formatting option; some information may be empty or unavailable. This tool retrieves information, not a video file. No proxy is required from you, and proxy_url is not an accepted input. Media URLs in streamingData, if present, are not guaranteed to be downloadable from a different public network exit.
Pricing
| Condition | Charge |
|---|---|
| Each call | 2.07 credits/call |
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.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
video_id | string | Yes | 视频ID/Video ID | — |
need_format | boolean | No | 是否需要清洗数据,提取关键内容,移除冗余数据/Whether to clean and format the data | true |
language_code | string | No | 语言代码(如zh-CN, en-US等)/Language code | zh-CN |
Invocation example
Copy the request and explore its response example.
/agent-api/v1/tool/executeX-Api-Keycurl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_youtube_get_video_info' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"language_code": "en-US",
"need_format": true,
"video_id": "IQLQFEz21Js"
}
}'{
"code": 200,
"data": {
"allow_ratings": true,
"author": "Katrina",
"available_countries": [
"AD"
],
"badge_tooltip": null,
"captions": null,
"title": "不会写代码,却成了马斯克旗下AI负责人,她分享了 7 个“带 AI 团队”的方法。#AI #AI工具 #马斯克 #spacex"
},
"docs": "https://api.tikhub.io/#/YouTube-Web-V2-API/get_video_info_api_v1_youtube_web_v2_get_video_info_get",
"message": "Request successful. This request will incur a charge.",
"message_zh": "请求成功,本次请求将被计费。",
"params": {
"language_code": "en-US",
"need_format": "true",
"video_id": "IQLQFEz21Js"
}
}This example shows part of the response. Copied content is valid JSON.

