# 获取频道描述信息/Get channel description

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v1/youtube/web_v2/get_channel_description:
    get:
      summary: 获取频道描述信息/Get channel description
      deprecated: false
      description: >-
        # [中文]

        ### 用途:

        - 获取YouTube频道的介绍信息（订阅数、视频数、观看次数、注册时间、社交链接等）


        ### 重要提示 - 需要两次请求获取完整数据:

        - **第一次请求**（使用channel_id）: 返回基本信息（频道名称、描述、订阅数、视频数、头像、横幅等）

        - **第二次请求**（使用continuation_token）: 返回高级信息（**注册时间、社交媒体链接、国家、观看次数**等）


        ### 如何获取channel_id:

        - 如果你只有频道URL（如 `https://www.youtube.com/@CozyCraftYT`），请先调用
        **get_channel_id** 接口获取channel_id

        - 该接口会返回类似 `UCeu6U67OzJhV1KwBansH3Dg` 的频道ID


        ### 参数详解:


        #### 📌 必选参数（二选一）:

        **channel_id** (string)

        - **作用**: 频道ID，用于第一次请求获取频道基本信息

        - **格式**: 通常以 `UC` 开头的24位字符串

        - **示例**: `"UCeu6U67OzJhV1KwBansH3Dg"`

        - **获取方式**: 调用 **get_channel_id** 接口，传入频道URL即可获取


        **continuation_token** (string)

        - **作用**: 翻页标志，用于第二次请求获取频道的高级信息

        - **获取方式**: 从第一次请求的响应中获取 `continuation_token` 字段

        - **注意**: `channel_id` 和 `continuation_token` 必须提供其中一个


        #### ⚙️ 可选参数:

        **language_code** (string, 可选)

        - **作用**: 设置显示语言偏好

        - **默认值**: `"zh-CN"`

        - **可用值**: `"zh-CN"`, `"en-US"`, `"ja-JP"`, `"ko-KR"` 等


        **country_code** (string, 可选)

        - **作用**: 设置地区代码

        - **默认值**: `"US"`

        - **可用值**: `"US"`, `"JP"`, `"GB"` 等


        **need_format** (boolean, 可选)

        - **作用**: 是否返回清洗后的精简数据

        - **默认值**: `true`

        - **可用值**:
          - `false` - 返回原始完整数据
          - `true` - 返回清洗后的精简数据（推荐，默认）

        ### 使用流程（三步获取完整数据）:

        1. **获取channel_id**: 如果只有频道URL，先调用
        `get_channel_id?channel_url=https://www.youtube.com/@CozyCraftYT`

        2. **第一次请求**: 使用 `channel_id` 参数获取频道基本信息，同时获取 `continuation_token`

        3. **第二次请求**: 使用 `continuation_token` 获取高级信息（注册时间、社交链接等）


        ### 返回数据结构 (need_format=true):


        #### 第一次请求返回（使用channel_id）:

        ```json

        {
          "channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
          "title": "CozyCraft",
          "handle": "CozyCraftYT",
          "description": "频道介绍...",
          "subscriber_count": "9.84万位订阅者",
          "video_count": "181 个视频",
          "view_count": null,
          "country": null,
          "creation_date": null,
          "links": [],
          "avatar": [{"url": "...", "width": 900, "height": 900}],
          "banner": [{"url": "...", "width": 2560, "height": 424}],
          "keywords": "Minecraft Ambience...",
          "channel_url": "https://www.youtube.com/channel/UCeu6U67OzJhV1KwBansH3Dg",
          "vanity_url": "http://www.youtube.com/@CozyCraftYT",
          "rss_url": "https://www.youtube.com/feeds/videos.xml?channel_id=UCeu6U67OzJhV1KwBansH3Dg",
          "is_family_safe": true,
          "verified": false,
          "has_business_email": false,
          "has_membership": true,
          "continuation_token": "4qmFsgJg..."
        }

        ```


        #### 第二次请求返回（使用continuation_token）:

        ```json

        {
          "channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
          "title": null,
          "handle": "CozyCraftYT",
          "description": "完整频道介绍...",
          "subscriber_count": "98.4K subscribers",
          "video_count": "181 videos",
          "view_count": "53,218,926 views",
          "country": "United States",
          "creation_date": "Oct 28, 2022",
          "links": [
            {"name": "Discord", "url": "https://discord.gg/tvuxxcsgSS"},
            {"name": "Twitter", "url": "https://twitter.com/..."}
          ],
          "avatar": [],
          "banner": [],
          "verified": false,
          "has_business_email": true,
          "continuation_token": null
        }

        ```


        ### 注意事项:

        - **必须进行两次请求才能获取完整的频道信息**

        - 第一次请求: 获取基本信息（title、avatar、banner、keywords、rss_url等）和
        continuation_token

        - 第二次请求: 获取高级信息（creation_date、links、view_count、country等）

        - 建议两次请求都设置 `need_format=true` 获取清洗后的数据

        - 可以合并两次请求的结果来获得完整的频道信息


        # [English]

        ### Purpose:

        - Get YouTube channel description information (subscribers, videos,
        views, creation date, social links, etc.)


        ### Important - Two requests required for complete data:

        - **First request** (with channel_id): Returns basic info (title,
        description, subscribers, videos, avatar, banner, etc.)

        - **Second request** (with continuation_token): Returns advanced info
        (**creation date, social media links, country, view count**, etc.)


        ### How to get channel_id:

        - If you only have channel URL (e.g.,
        `https://www.youtube.com/@CozyCraftYT`), call **get_channel_id**
        endpoint first

        - It will return channel_id like `UCeu6U67OzJhV1KwBansH3Dg`


        ### Parameters:


        #### 📌 Required (choose one):

        **channel_id** (string)

        - **Purpose**: Channel ID for first request to get basic channel info

        - **Format**: Usually starts with `UC`, 24 characters

        - **Example**: `"UCeu6U67OzJhV1KwBansH3Dg"`

        - **How to get**: Call **get_channel_id** endpoint with channel URL


        **continuation_token** (string)

        - **Purpose**: Pagination token for second request to get advanced info

        - **How to get**: Get `continuation_token` field from first request
        response

        - **Note**: Must provide either `channel_id` or `continuation_token`


        #### ⚙️ Optional:

        **language_code** (string, optional)

        - **Purpose**: Set language preference

        - **Default**: `"zh-CN"`

        - **Values**: `"zh-CN"`, `"en-US"`, `"ja-JP"`, `"ko-KR"`, etc.


        **country_code** (string, optional)

        - **Purpose**: Set region code

        - **Default**: `"US"`

        - **Values**: `"US"`, `"JP"`, `"GB"`, etc.


        **need_format** (boolean, optional)

        - **Purpose**: Whether to return cleaned simplified data

        - **Default**: `true`

        - **Values**:
          - `false` - Return raw complete data
          - `true` - Return cleaned simplified data (recommended, default)

        ### Usage Flow (3 steps for complete data):

        1. **Get channel_id**: If you only have URL, call
        `get_channel_id?channel_url=https://www.youtube.com/@CozyCraftYT`

        2. **First request**: Use `channel_id` parameter to get basic info and
        `continuation_token`

        3. **Second request**: Use `continuation_token` to get advanced info
        (creation date, social links, etc.)


        ### Response Structure (need_format=true):


        #### First request response (with channel_id):

        ```json

        {
          "channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
          "title": "CozyCraft",
          "handle": "CozyCraftYT",
          "description": "Channel description...",
          "subscriber_count": "98.4K subscribers",
          "video_count": "181 videos",
          "view_count": null,
          "country": null,
          "creation_date": null,
          "links": [],
          "avatar": [{"url": "...", "width": 900, "height": 900}],
          "banner": [{"url": "...", "width": 2560, "height": 424}],
          "keywords": "Minecraft Ambience...",
          "channel_url": "https://www.youtube.com/channel/UCeu6U67OzJhV1KwBansH3Dg",
          "vanity_url": "http://www.youtube.com/@CozyCraftYT",
          "rss_url": "https://www.youtube.com/feeds/videos.xml?channel_id=UCeu6U67OzJhV1KwBansH3Dg",
          "is_family_safe": true,
          "verified": false,
          "has_business_email": false,
          "has_membership": true,
          "continuation_token": "4qmFsgJg..."
        }

        ```


        #### Second request response (with continuation_token):

        ```json

        {
          "channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
          "title": null,
          "handle": "CozyCraftYT",
          "description": "Full channel description...",
          "subscriber_count": "98.4K subscribers",
          "video_count": "181 videos",
          "view_count": "53,218,926 views",
          "country": "United States",
          "creation_date": "Oct 28, 2022",
          "links": [
            {"name": "Discord", "url": "https://discord.gg/tvuxxcsgSS"},
            {"name": "Twitter", "url": "https://twitter.com/..."}
          ],
          "avatar": [],
          "banner": [],
          "verified": false,
          "has_business_email": true,
          "continuation_token": null
        }

        ```


        ### Notes:

        - **Two requests are required to get complete channel information**

        - First request: Get basic info (title, avatar, banner, keywords,
        rss_url, etc.) and continuation_token

        - Second request: Get advanced info (creation_date, links, view_count,
        country, etc.)

        - Recommend setting `need_format=true` for both requests

        - You can merge results from both requests for complete channel info


        # [示例/Examples]

        ## 步骤1 - 获取channel_id（如果只有URL）

        GET
        /youtube_web/get_channel_id?channel_url=https://www.youtube.com/@CozyCraftYT


        ## 步骤2 - 第一次请求获取基本信息和continuation_token

        GET
        /youtube_web/get_channel_description?channel_id=UCeu6U67OzJhV1KwBansH3Dg&need_format=true


        ## 步骤3 - 第二次请求获取高级信息（使用返回的continuation_token）

        GET
        /youtube_web/get_channel_description?continuation_token=xxx&need_format=true
      operationId: >-
        get_channel_description_api_v1_youtube_web_v2_get_channel_description_get
      tags:
        - YouTube-Web-V2-API
        - YouTube-Web-V2-API
      parameters:
        - name: channel_id
          in: query
          description: >-
            频道ID（格式如：UCeu6U67OzJhV1KwBansH3Dg），可通过get_channel_id接口从频道URL获取/Channel
            ID, can be obtained from channel URL via get_channel_id endpoint
          required: false
          example: UCeu6U67OzJhV1KwBansH3Dg
          schema:
            type: string
            description: >-
              频道ID（格式如：UCeu6U67OzJhV1KwBansH3Dg），可通过get_channel_id接口从频道URL获取/Channel
              ID, can be obtained from channel URL via get_channel_id endpoint
            title: Channel Id
        - name: continuation_token
          in: query
          description: >-
            翻页标志（用于获取频道注册时间等高级信息）/Continuation token for getting advanced info
            like channel creation date
          required: false
          schema:
            type: string
            description: >-
              翻页标志（用于获取频道注册时间等高级信息）/Continuation token for getting advanced info
              like channel creation date
            title: Continuation Token
        - name: language_code
          in: query
          description: 语言代码（如zh-CN, en-US等）/Language code
          required: false
          example: zh-CN
          schema:
            type: string
            description: 语言代码（如zh-CN, en-US等）/Language code
            default: zh-CN
            title: Language Code
        - name: country_code
          in: query
          description: 国家代码（如US, JP等）/Country code
          required: false
          example: US
          schema:
            type: string
            description: 国家代码（如US, JP等）/Country code
            default: US
            title: Country Code
        - name: need_format
          in: query
          description: 是否需要清洗数据，提取关键内容，移除冗余数据/Whether to clean and format the data
          required: false
          schema:
            type: boolean
            description: 是否需要清洗数据，提取关键内容，移除冗余数据/Whether to clean and format the data
            default: true
            title: Need Format
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseModel'
          headers: {}
          x-apifox-name: OK
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          headers: {}
          x-apifox-name: Unprocessable Entity
      security:
        - HTTPBearer: []
          x-apifox:
            schemeGroups:
              - id: Mpr1f31RXc_8UnqRXtsaH
                schemeIds:
                  - HTTPBearer
            required: true
            use:
              id: Mpr1f31RXc_8UnqRXtsaH
            scopes:
              Mpr1f31RXc_8UnqRXtsaH:
                HTTPBearer: []
      x-apifox-folder: YouTube-Web-V2-API
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/4705614/apis/api-419083084-run
components:
  schemas:
    ResponseModel:
      properties:
        code:
          type: integer
          title: Code
          description: HTTP status code | HTTP状态码
          default: 200
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
          description: Unique request identifier | 唯一请求标识符
        message:
          type: string
          title: Message
          description: Response message (EN-US) | 响应消息 (English)
          default: Request successful. This request will incur a charge.
        message_zh:
          type: string
          title: Message Zh
          description: Response message (ZH-CN) | 响应消息 (中文)
          default: 请求成功，本次请求将被计费。
        support:
          type: string
          title: Support
          description: Support message | 支持消息
          default: 'Discord: https://discord.gg/aMEAS8Xsvz'
        time:
          type: string
          title: Time
          description: The time the response was generated | 生成响应的时间
        time_stamp:
          type: integer
          title: Time Stamp
          description: The timestamp the response was generated | 生成响应的时间戳
        time_zone:
          type: string
          title: Time Zone
          description: The timezone of the response time | 响应时间的时区
          default: America/Los_Angeles
        docs:
          anyOf:
            - type: string
            - type: 'null'
          title: Docs
          description: >-
            Link to the API Swagger documentation for this endpoint | 此端点的 API
            Swagger 文档链接
        cache_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Cache Message
          description: Cache message (EN-US) | 缓存消息 (English)
          default: >-
            This response is cached and accessible via the URL below for 24
            hours at no extra cost. The cache is for request tracing only — it
            doesn't affect the API's data freshness and won't be returned
            through the API again.
        cache_message_zh:
          anyOf:
            - type: string
            - type: 'null'
          title: Cache Message Zh
          description: Cache message (ZH-CN) | 缓存消息 (中文)
          default: >-
            本次响应已缓存，可通过下方 URL 直接查看，有效期 24
            小时，访问缓存链接无额外费用。缓存仅用于请求溯源，不影响接口数据的时效性，也不会再次通过接口返回。
        cache_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Cache Url
          description: The URL to access the cached result | 访问缓存结果的 URL
        router:
          type: string
          title: Router
          description: The endpoint that generated this response | 生成此响应的端点
          default: ''
        params:
          type: string
        data:
          anyOf:
            - type: string
            - type: 'null'
          title: Data
          description: The response data | 响应数据
      type: object
      title: ResponseModel
      x-apifox-orders:
        - code
        - request_id
        - message
        - message_zh
        - support
        - time
        - time_stamp
        - time_zone
        - docs
        - cache_message
        - cache_message_zh
        - cache_url
        - router
        - params
        - data
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
      x-apifox-orders:
        - detail
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
      x-apifox-orders:
        - loc
        - msg
        - type
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
  securitySchemes:
    HTTPBearer:
      type: bearer
      description: >
        ----

        #### API Token Introduction:

        ##### Method 1: Use API Token in the Request Header (Recommended)

        - **Header**: `Authorization`

        - **Format**: `Bearer {token}`

        - **Example**: `{"Authorization": "Bearer your_token"}`

        - **Swagger UI**: Click on the `Authorize` button in the upper right
        corner of the page to enter the API token directly without the `Bearer`
        keyword.


        ##### Method 2: Use API Token in the Cookie (Not Recommended, Use Only
        When Method 1 is Unavailable)

        - **Cookie**: `Authorization`

        - **Format**: `Bearer {token}`

        - **Example**: `Authorization=Bearer your_token`


        #### Get API Token:

        1. Register and log in to your account on the TikHub website.

        2. Go to the user center, click on the API token menu, and create an API
        token.

        3. Copy and use the API token in the request header.

        4. Keep your API token confidential and use it only in the request
        header.


        ----


        #### API令牌简介:

        ##### 方法一：在请求头中使用API令牌（推荐）

        - **请求头**: `Authorization`

        - **格式**: `Bearer {token}`

        - **示例**: `{"Authorization": "Bearer your_token"}`

        - **Swagger UI**: 点击页面右上角的`Authorize`按钮，直接输入API令牌，不需要`Bearer`关键字。


        ##### 方法二：在Cookie中使用API令牌（不推荐，仅在无法使用方法一时使用）

        - **Cookie**: `Authorization`

        - **格式**: `Bearer {token}`

        - **示例**: `Authorization=Bearer your_token`


        #### 获取API令牌:

        1. 在TikHub网站注册并登录账户。

        2. 进入用户中心，点击API令牌菜单，创建API令牌。

        3. 复制并在请求头中使用API令牌。

        4. 保密您的API令牌，仅在请求头中使用。
      scheme: bearer
servers:
  - url: https://api.tikhub.io
    description: Production Environment
security: []

```
