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

# Get YouTube Insights

> This endpoint retrieves the insights for a YouTube channel



## OpenAPI

````yaml post /youtube/analyzer/insights
openapi: 3.0.1
info:
  title: ClipVision API
  description: ClipVision AI API
  termsOfService: https://www.clipvision.ai/terms/
  contact:
    email: help@clipvision.ai
  license:
    name: ClipVision License
  version: v1
servers:
  - url: https://backend.clipvision.ai/
security:
  - Basic: []
  - api_key: []
paths:
  /youtube/analyzer/insights:
    post:
      tags:
        - youtube
      summary: Get YouTube Insights
      description: This endpoint retrieves the insights for a YouTube channel
      operationId: youtube_get_insights
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/YoutubeGetInsightsSerializer'
        required: true
      responses:
        '200':
          description: Insights fetched successfully
          content:
            application/json:
              schema:
                title: Insights Response Object
                type: object
                properties:
                  insights:
                    title: YouTube Statistics
                    type: object
                    properties:
                      channel_id:
                        type: string
                      likes_data:
                        title: YouTube Likes Data
                        type: object
                        properties:
                          title:
                            type: string
                            default: Likes
                          data:
                            type: array
                            items:
                              type: object
                              properties:
                                date:
                                  type: string
                                param1:
                                  type: integer
                                value:
                                  type: integer
                        description: YouTube Likes Data OpenAPI Schema
                      popular_video_data:
                        title: YouTube Popular Video Data
                        type: object
                        properties:
                          id:
                            type: string
                          title:
                            type: string
                          thumbnail:
                            type: string
                          url:
                            type: string
                          publish_date:
                            type: string
                          views:
                            type: integer
                        description: YouTube Popular Video Data OpenAPI Schema
                      views_data:
                        title: YouTube Views Data
                        type: object
                        properties:
                          title:
                            type: string
                            default: Views
                          data:
                            type: array
                            items:
                              type: object
                              properties:
                                date:
                                  type: string
                                param1:
                                  type: integer
                                value:
                                  type: integer
                        description: YouTube Views Data OpenAPI Schema
                      subscribers_data:
                        title: YouTube Subscribers Data
                        type: object
                        properties:
                          title:
                            type: string
                            default: Subscribers
                          data:
                            type: array
                            items:
                              type: object
                              properties:
                                date:
                                  type: string
                                  format: date
                                param1:
                                  type: integer
                                param2:
                                  type: integer
                                value:
                                  type: integer
                        description: YouTube Subscribers Data OpenAPI Schema
                    description: YouTube Statistics OpenAPI Schema
                  error:
                    type: string
                description: Insights Response Object OpenAPI Schema
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: array
                    items:
                      type: string
                  channel_id:
                    type: array
                    items:
                      type: string
                  max_results:
                    type: array
                    items:
                      type: integer
                  time_range:
                    type: array
                    items:
                      type: integer
        '500':
          description: Insights were not fetched successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  insights:
                    title: YouTube Statistics
                    type: object
                    properties:
                      channel_id:
                        type: string
                      likes_data:
                        title: YouTube Likes Data
                        type: object
                        properties:
                          title:
                            type: string
                            default: Likes
                          data:
                            type: array
                            items:
                              type: object
                              properties:
                                date:
                                  type: string
                                param1:
                                  type: integer
                                value:
                                  type: integer
                        description: YouTube Likes Data OpenAPI Schema
                      popular_video_data:
                        title: YouTube Popular Video Data
                        type: object
                        properties:
                          id:
                            type: string
                          title:
                            type: string
                          thumbnail:
                            type: string
                          url:
                            type: string
                          publish_date:
                            type: string
                          views:
                            type: integer
                        description: YouTube Popular Video Data OpenAPI Schema
                      views_data:
                        title: YouTube Views Data
                        type: object
                        properties:
                          title:
                            type: string
                            default: Views
                          data:
                            type: array
                            items:
                              type: object
                              properties:
                                date:
                                  type: string
                                param1:
                                  type: integer
                                value:
                                  type: integer
                        description: YouTube Views Data OpenAPI Schema
                      subscribers_data:
                        title: YouTube Subscribers Data
                        type: object
                        properties:
                          title:
                            type: string
                            default: Subscribers
                          data:
                            type: array
                            items:
                              type: object
                              properties:
                                date:
                                  type: string
                                  format: date
                                param1:
                                  type: integer
                                param2:
                                  type: integer
                                value:
                                  type: integer
                        description: YouTube Subscribers Data OpenAPI Schema
                    description: YouTube Statistics OpenAPI Schema
                  error:
                    type: string
components:
  schemas:
    YoutubeGetInsightsSerializer:
      required:
        - access_token
        - channel_id
      type: object
      properties:
        access_token:
          title: Access token
          minLength: 1
          type: string
        channel_id:
          title: Channel id
          minLength: 1
          type: string
        max_results:
          title: Max results
          type: integer
        time_range:
          title: Time range
          type: integer
          description: 0 for "This Week", 1 for "This Month", 2 for "This Year"
  securitySchemes:
    Basic:
      type: http
      scheme: basic
    api_key:
      type: apiKey
      name: User-JWT
      in: header

````