YouTube Get Video Info

2.07 credits/call
ae_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.

Video
2.07 credits/call

Pricing

2.07 credits/call
ConditionCharge
Each call2.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.

ParameterTypeRequiredDescriptionDefault
video_idstringYes视频ID/Video ID—
need_formatbooleanNo是否需要清洗数据,提取关键内容,移除冗余数据/Whether to clean and format the datatrue
language_codestringNo语言代码(如zh-CN, en-US等)/Language codezh-CN

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_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"
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "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.