> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keyapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取视频详情

> 获取YouTube视频详情信息，返回原始完整数据（包含 playerResponse 和 initialData）

🪙
3 credits每次请求

## 复制给 AI

🤖 为什么还要自己写代码？让 AI 来处理重复工作。点击按钮即可复制一段整理好的提示词，用于 ChatGPT、Claude 或你常用的 AI 助手。

✨
复制给 AI


## OpenAPI

````yaml /zh/youtube.zh.openapi.json get /v1/youtube/get_video_info
openapi: 3.0.1
info:
  title: YouTube API 中文文档
  description: YouTube API 的中文参考文档，包含接口用途、参数说明、响应状态和示例结构。
  version: 1.0.0
servers:
  - url: https://api.keyapi.ai
    description: Production
security: []
tags:
  - name: YouTube 视频
  - name: YouTube 频道
paths:
  /v1/youtube/get_video_info:
    get:
      tags:
        - YouTube 视频
      summary: 获取视频详情
      description: 获取YouTube视频详情信息，返回原始完整数据（包含 playerResponse 和 initialData）
      parameters:
        - name: video_id
          in: query
          description: >-
            视频ID

            获取方式: 从视频URL中提取，例如
            https://www.youtube.com/watch?v=oaSNBz4qMQY，video_id 就是 oaSNBz4qMQY
          required: true
          example: oaSNBz4qMQY
          schema:
            type: string
            example: oaSNBz4qMQY
        - name: language_code
          in: query
          description: |-
            设置语言偏好
            可选值: "zh-CN", "en-US", "ja-JP", "ko-KR" 等
          required: false
          example: zh-CN
          schema:
            type: string
            default: zh-CN
        - name: need_format
          in: query
          description: 是否需要清洗数据，提取关键内容，移除冗余数据
          required: false
          example: 'true'
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: 请求成功
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example:
                code: 0
                message: success
                data:
                  video_id: oaSNBz4qMQY
                  title: ''
                  description: >-
                    Today, we've moved into a sorcerer village! This village
                    hides a dark secret... a terrible monster sealed away in a
                    cursed painting! We can't let it get loose, we have to find
                    a way to take it down and save the village!


                    We hope you enjoy our videos! Have a great day! 


                    Maizen Merchandise ► https://shop-maizen.myspreadshop.com/
                  length_seconds: ''
                  keywords: null
                  thumbnails: []
                  author: Maizen
                  channel_id: UCJHBJ7F-nAIlMGolm0Hu4vg
                  channel_handle: '@maizenofficial'
                  channel_url: https://www.youtube.com/channel/UCJHBJ7F-nAIlMGolm0Hu4vg
                  channel_avatar_thumbnails:
                    - url: >-
                        https://yt3.ggpht.com/jtaYDxDtMB2WZp9dOXCCcX4xuaJNkl5iEZPlzjMLuiVqkyUM851nBUArs0wDSBGIWvUfny2uYw=s48-c-k-c0x00ffffff-no-rj
                      width: 48
                      height: 48
                    - url: >-
                        https://yt3.ggpht.com/jtaYDxDtMB2WZp9dOXCCcX4xuaJNkl5iEZPlzjMLuiVqkyUM851nBUArs0wDSBGIWvUfny2uYw=s88-c-k-c0x00ffffff-no-rj
                      width: 88
                      height: 88
                    - url: >-
                        https://yt3.ggpht.com/jtaYDxDtMB2WZp9dOXCCcX4xuaJNkl5iEZPlzjMLuiVqkyUM851nBUArs0wDSBGIWvUfny2uYw=s176-c-k-c0x00ffffff-no-rj
                      width: 176
                      height: 176
                  subscriber_count_text: 1610万位订阅者
                  is_verified: true
                  badge_tooltip: 已验证
                  view_count: ''
                  view_count_text: 1,666,377次观看
                  short_view_count: 166万次观看
                  like_count: ''
                  like_count_text: 1万
                  comment_count: '957'
                  publish_date: ''
                  upload_date: ''
                  date_text: 2026年1月9日
                  relative_date_text: 1个月前
                  category: ''
                  super_title: null
                  is_live_content: false
                  is_private: false
                  is_unlisted: false
                  is_family_safe: null
                  is_shorts_eligible: null
                  is_crawlable: null
                  allow_ratings: null
                  available_countries: null
                  captions: null
                  chapters: null
                  endscreen: null
                  merchandise:
                    - title: Mikey Plush
                      price: US$34.99
                      vendor_name: Juniper
                      thumbnails:
                        - url: >-
                            https://encrypted-tbn0.gstatic.com/shopping?q=tbn:ANd9GcSx2_7BAHeg38-wwtroU_fBkxRHIUOd2gqzSU5uuA9ImeKbIG8HK9fqnBXtcZ8MNLUB810zV5c
                          width: 128
                          height: 128
                        - url: >-
                            https://encrypted-tbn0.gstatic.com/shopping?q=tbn:ANd9GcRO_4gUShjDmyjUFTg84VZVExeSuptTefXMzm9RVFZQYXmqkC0IDLD7Ng_hBFhsIkXG7Lg3WwmY
                          width: 256
                          height: 256
                        - url: >-
                            https://encrypted-tbn0.gstatic.com/shopping?q=tbn:ANd9GcTrZMSLEwOZTT-ZrIpixYD3V5_YWbACztfiZKjFxzFKmJBL5GnA6A3yhmvf4Z3O-smnfp7oJ1d5
                          width: 512
                          height: 512
                      buy_url: >-
                        https://maizen.hellojuniper.com/p/7925971943615?srsltid=AfmBOooBhpu4Z073e6HGy3D-MFqpLIS242qPB-PwEA_KjOOTq7cBYr-jWZI&utm_content=YT3-Q921kxaDB_lY9syZ3s5W_IgzybbWdtKa5cfjIIY8BPb0JQpp3683rrXLtS02NU_7RuKTEbndZ8mlAOwn86I-bgnW&utm_term=UCJHBJ7F-nAIlMGolm0Hu4vg&utm_medium=product_shelf&utm_source=youtube
                    - title: JJ Plush
                      price: US$27.99
                      vendor_name: Juniper
                      thumbnails:
                        - url: >-
                            https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcRmxAQQ0n_PUFHULkJ4eH77c1d8tdgQ_Eti8OWKlfF0j2C-op-3QmLubwVxuGAFCHAOZ6mkohWt
                          width: 128
                          height: 128
                        - url: >-
                            https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcQX9GC3oeG6uYAppZ9LR9KjZMqRnoW32uMXKKSTre1xQOfg-tmDNxTzQuoAZYc7zt8Dqtonh8vS
                          width: 256
                          height: 256
                        - url: >-
                            https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcR4sThe7hhuWeN9BOJgj0bh-WOOFIqJFW-PHEEx3sxc3YjvePJb33cqK89wDDX3AXMvpI8CfjdC
                          width: 512
                          height: 512
                      buy_url: >-
                        https://maizen.hellojuniper.com/p/7925971288255?srsltid=AfmBOoqvx4_CIYpwC-8Ge5WVySiwVTsCDEek-SYugdTp-2QXe7js522UoC0&utm_content=YT3-cW5jNvizbEWWG-uoGKPFqAQk6oGm-Rd-bKWdgcyGAuut6Fnjza6h0_iChM8HdeYoODWilCpnEBNEFikIUXzmdG4t&utm_term=UCJHBJ7F-nAIlMGolm0Hu4vg&utm_medium=product_shelf&utm_source=youtube
                  storyboard_spec: null
                  embed_url: ''
                  video_url: https://www.youtube.com/watch?v=oaSNBz4qMQY
                  owner_profile_url: ''
                  playability_status: LOGIN_REQUIRED
                requestId: 9a121156-46b4-4fff-9bc1-0dda7589139b
          headers: {}
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '402':
          $ref: '#/components/responses/402'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      deprecated: false
      security:
        - JWT Bearer: []
components:
  responses:
    '400':
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            example:
              code: 400
              data: null
              message: 'Missing required parameter: handle'
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            example:
              code: 401
              data: null
              message: apiKey is null
    '402':
      description: Payment Required
      content:
        application/json:
          schema:
            type: object
            example:
              code: 402
              data: null
              message: apiKey quota is not enough
    '429':
      description: Too Many Requests
      content:
        application/json:
          schema:
            type: object
            example:
              code: 429
              data: null
              message: qps limit exceeded
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            example:
              code: 500
              data: null
              message: Internal server error
  securitySchemes:
    JWT Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        接口鉴权凭证。请在请求 Header 中传入 `Authorization: Bearer <YOUR_API_KEY>`。
        可在 [Dashboard](https://keyapi.ai/app/dashboard) 获取你的 API Key。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.