> ## 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.

# Instagram Insights Analyzer Endpoint

> This endpoint fetches insights from Instagram Graph API



## OpenAPI

````yaml post /instagram/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:
  /instagram/analyzer/insights:
    post:
      tags:
        - instagram
      summary: Instagram Insights Analyzer Endpoint
      description: This endpoint fetches insights from Instagram Graph API
      operationId: instagram_get_insights
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstagramGetInsightsSerializer'
        required: true
      responses:
        '200':
          description: Insights fetched successfully
          content:
            application/json:
              schema:
                title: Insights Response Object
                type: object
                properties:
                  insights:
                    title: Instagram Statistics
                    type: object
                    properties:
                      most_popular_videos:
                        type: array
                        items:
                          title: Instagram Media
                          type: object
                          properties:
                            id:
                              type: string
                            is_shared_to_feed:
                              type: boolean
                            media_type:
                              type: string
                            media_url:
                              type: string
                            thumbnail_url:
                              type: string
                            timestamp:
                              type: string
                            insights:
                              type: array
                              items:
                                title: Instagram Insight
                                type: object
                                properties:
                                  name:
                                    type: string
                                  period:
                                    type: string
                                  values:
                                    type: array
                                    items:
                                      title: Instagram Insight Value
                                      type: object
                                      properties:
                                        value:
                                          type: integer
                                        end_time:
                                          type: string
                                      description: Instagram Insight Value OpenAPI Schema
                                  title:
                                    type: string
                                  description:
                                    type: string
                                  id:
                                    type: string
                                description: Instagram Insight OpenAPI Schema
                          description: Instagram Media OpenAPI Schema
                      most_liked_videos:
                        type: array
                        items:
                          title: Instagram Media
                          type: object
                          properties:
                            id:
                              type: string
                            is_shared_to_feed:
                              type: boolean
                            media_type:
                              type: string
                            media_url:
                              type: string
                            thumbnail_url:
                              type: string
                            timestamp:
                              type: string
                            insights:
                              type: array
                              items:
                                title: Instagram Insight
                                type: object
                                properties:
                                  name:
                                    type: string
                                  period:
                                    type: string
                                  values:
                                    type: array
                                    items:
                                      title: Instagram Insight Value
                                      type: object
                                      properties:
                                        value:
                                          type: integer
                                        end_time:
                                          type: string
                                      description: Instagram Insight Value OpenAPI Schema
                                  title:
                                    type: string
                                  description:
                                    type: string
                                  id:
                                    type: string
                                description: Instagram Insight OpenAPI Schema
                          description: Instagram Media OpenAPI Schema
                      most_commented_videos:
                        type: array
                        items:
                          title: Instagram Media
                          type: object
                          properties:
                            id:
                              type: string
                            is_shared_to_feed:
                              type: boolean
                            media_type:
                              type: string
                            media_url:
                              type: string
                            thumbnail_url:
                              type: string
                            timestamp:
                              type: string
                            insights:
                              type: array
                              items:
                                title: Instagram Insight
                                type: object
                                properties:
                                  name:
                                    type: string
                                  period:
                                    type: string
                                  values:
                                    type: array
                                    items:
                                      title: Instagram Insight Value
                                      type: object
                                      properties:
                                        value:
                                          type: integer
                                        end_time:
                                          type: string
                                      description: Instagram Insight Value OpenAPI Schema
                                  title:
                                    type: string
                                  description:
                                    type: string
                                  id:
                                    type: string
                                description: Instagram Insight OpenAPI Schema
                          description: Instagram Media OpenAPI Schema
                      most_shared_videos:
                        type: array
                        items:
                          title: Instagram Media
                          type: object
                          properties:
                            id:
                              type: string
                            is_shared_to_feed:
                              type: boolean
                            media_type:
                              type: string
                            media_url:
                              type: string
                            thumbnail_url:
                              type: string
                            timestamp:
                              type: string
                            insights:
                              type: array
                              items:
                                title: Instagram Insight
                                type: object
                                properties:
                                  name:
                                    type: string
                                  period:
                                    type: string
                                  values:
                                    type: array
                                    items:
                                      title: Instagram Insight Value
                                      type: object
                                      properties:
                                        value:
                                          type: integer
                                        end_time:
                                          type: string
                                      description: Instagram Insight Value OpenAPI Schema
                                  title:
                                    type: string
                                  description:
                                    type: string
                                  id:
                                    type: string
                                description: Instagram Insight OpenAPI Schema
                          description: Instagram Media OpenAPI Schema
                      most_saved_videos:
                        type: array
                        items:
                          title: Instagram Media
                          type: object
                          properties:
                            id:
                              type: string
                            is_shared_to_feed:
                              type: boolean
                            media_type:
                              type: string
                            media_url:
                              type: string
                            thumbnail_url:
                              type: string
                            timestamp:
                              type: string
                            insights:
                              type: array
                              items:
                                title: Instagram Insight
                                type: object
                                properties:
                                  name:
                                    type: string
                                  period:
                                    type: string
                                  values:
                                    type: array
                                    items:
                                      title: Instagram Insight Value
                                      type: object
                                      properties:
                                        value:
                                          type: integer
                                        end_time:
                                          type: string
                                      description: Instagram Insight Value OpenAPI Schema
                                  title:
                                    type: string
                                  description:
                                    type: string
                                  id:
                                    type: string
                                description: Instagram Insight OpenAPI Schema
                          description: Instagram Media OpenAPI Schema
                      most_reached_videos:
                        type: array
                        items:
                          title: Instagram Media
                          type: object
                          properties:
                            id:
                              type: string
                            is_shared_to_feed:
                              type: boolean
                            media_type:
                              type: string
                            media_url:
                              type: string
                            thumbnail_url:
                              type: string
                            timestamp:
                              type: string
                            insights:
                              type: array
                              items:
                                title: Instagram Insight
                                type: object
                                properties:
                                  name:
                                    type: string
                                  period:
                                    type: string
                                  values:
                                    type: array
                                    items:
                                      title: Instagram Insight Value
                                      type: object
                                      properties:
                                        value:
                                          type: integer
                                        end_time:
                                          type: string
                                      description: Instagram Insight Value OpenAPI Schema
                                  title:
                                    type: string
                                  description:
                                    type: string
                                  id:
                                    type: string
                                description: Instagram Insight OpenAPI Schema
                          description: Instagram Media OpenAPI Schema
                      follower_count_data:
                        type: array
                        items:
                          type: array
                          items:
                            title: Instagram Insight Value
                            type: object
                            properties:
                              value:
                                type: integer
                              end_time:
                                type: string
                            description: Instagram Insight Value OpenAPI Schema
                      impressions_data:
                        type: array
                        items:
                          type: array
                          items:
                            title: Instagram Insight Value
                            type: object
                            properties:
                              value:
                                type: integer
                              end_time:
                                type: string
                            description: Instagram Insight Value OpenAPI Schema
                      profile_views_data:
                        type: array
                        items:
                          type: array
                          items:
                            title: Instagram Insight Value
                            type: object
                            properties:
                              value:
                                type: integer
                              end_time:
                                type: string
                            description: Instagram Insight Value OpenAPI Schema
                      reach_data:
                        type: array
                        items:
                          type: array
                          items:
                            title: Instagram Insight Value
                            type: object
                            properties:
                              value:
                                type: integer
                              end_time:
                                type: string
                            description: Instagram Insight Value OpenAPI Schema
                    description: Instagram 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
                  user_id:
                    type: array
                    items:
                      type: string
                  max_results:
                    type: array
                    items:
                      type: string
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  insights:
                    title: Instagram Statistics
                    type: object
                    properties:
                      most_popular_videos:
                        type: array
                        items:
                          title: Instagram Media
                          type: object
                          properties:
                            id:
                              type: string
                            is_shared_to_feed:
                              type: boolean
                            media_type:
                              type: string
                            media_url:
                              type: string
                            thumbnail_url:
                              type: string
                            timestamp:
                              type: string
                            insights:
                              type: array
                              items:
                                title: Instagram Insight
                                type: object
                                properties:
                                  name:
                                    type: string
                                  period:
                                    type: string
                                  values:
                                    type: array
                                    items:
                                      title: Instagram Insight Value
                                      type: object
                                      properties:
                                        value:
                                          type: integer
                                        end_time:
                                          type: string
                                      description: Instagram Insight Value OpenAPI Schema
                                  title:
                                    type: string
                                  description:
                                    type: string
                                  id:
                                    type: string
                                description: Instagram Insight OpenAPI Schema
                          description: Instagram Media OpenAPI Schema
                      most_liked_videos:
                        type: array
                        items:
                          title: Instagram Media
                          type: object
                          properties:
                            id:
                              type: string
                            is_shared_to_feed:
                              type: boolean
                            media_type:
                              type: string
                            media_url:
                              type: string
                            thumbnail_url:
                              type: string
                            timestamp:
                              type: string
                            insights:
                              type: array
                              items:
                                title: Instagram Insight
                                type: object
                                properties:
                                  name:
                                    type: string
                                  period:
                                    type: string
                                  values:
                                    type: array
                                    items:
                                      title: Instagram Insight Value
                                      type: object
                                      properties:
                                        value:
                                          type: integer
                                        end_time:
                                          type: string
                                      description: Instagram Insight Value OpenAPI Schema
                                  title:
                                    type: string
                                  description:
                                    type: string
                                  id:
                                    type: string
                                description: Instagram Insight OpenAPI Schema
                          description: Instagram Media OpenAPI Schema
                      most_commented_videos:
                        type: array
                        items:
                          title: Instagram Media
                          type: object
                          properties:
                            id:
                              type: string
                            is_shared_to_feed:
                              type: boolean
                            media_type:
                              type: string
                            media_url:
                              type: string
                            thumbnail_url:
                              type: string
                            timestamp:
                              type: string
                            insights:
                              type: array
                              items:
                                title: Instagram Insight
                                type: object
                                properties:
                                  name:
                                    type: string
                                  period:
                                    type: string
                                  values:
                                    type: array
                                    items:
                                      title: Instagram Insight Value
                                      type: object
                                      properties:
                                        value:
                                          type: integer
                                        end_time:
                                          type: string
                                      description: Instagram Insight Value OpenAPI Schema
                                  title:
                                    type: string
                                  description:
                                    type: string
                                  id:
                                    type: string
                                description: Instagram Insight OpenAPI Schema
                          description: Instagram Media OpenAPI Schema
                      most_shared_videos:
                        type: array
                        items:
                          title: Instagram Media
                          type: object
                          properties:
                            id:
                              type: string
                            is_shared_to_feed:
                              type: boolean
                            media_type:
                              type: string
                            media_url:
                              type: string
                            thumbnail_url:
                              type: string
                            timestamp:
                              type: string
                            insights:
                              type: array
                              items:
                                title: Instagram Insight
                                type: object
                                properties:
                                  name:
                                    type: string
                                  period:
                                    type: string
                                  values:
                                    type: array
                                    items:
                                      title: Instagram Insight Value
                                      type: object
                                      properties:
                                        value:
                                          type: integer
                                        end_time:
                                          type: string
                                      description: Instagram Insight Value OpenAPI Schema
                                  title:
                                    type: string
                                  description:
                                    type: string
                                  id:
                                    type: string
                                description: Instagram Insight OpenAPI Schema
                          description: Instagram Media OpenAPI Schema
                      most_saved_videos:
                        type: array
                        items:
                          title: Instagram Media
                          type: object
                          properties:
                            id:
                              type: string
                            is_shared_to_feed:
                              type: boolean
                            media_type:
                              type: string
                            media_url:
                              type: string
                            thumbnail_url:
                              type: string
                            timestamp:
                              type: string
                            insights:
                              type: array
                              items:
                                title: Instagram Insight
                                type: object
                                properties:
                                  name:
                                    type: string
                                  period:
                                    type: string
                                  values:
                                    type: array
                                    items:
                                      title: Instagram Insight Value
                                      type: object
                                      properties:
                                        value:
                                          type: integer
                                        end_time:
                                          type: string
                                      description: Instagram Insight Value OpenAPI Schema
                                  title:
                                    type: string
                                  description:
                                    type: string
                                  id:
                                    type: string
                                description: Instagram Insight OpenAPI Schema
                          description: Instagram Media OpenAPI Schema
                      most_reached_videos:
                        type: array
                        items:
                          title: Instagram Media
                          type: object
                          properties:
                            id:
                              type: string
                            is_shared_to_feed:
                              type: boolean
                            media_type:
                              type: string
                            media_url:
                              type: string
                            thumbnail_url:
                              type: string
                            timestamp:
                              type: string
                            insights:
                              type: array
                              items:
                                title: Instagram Insight
                                type: object
                                properties:
                                  name:
                                    type: string
                                  period:
                                    type: string
                                  values:
                                    type: array
                                    items:
                                      title: Instagram Insight Value
                                      type: object
                                      properties:
                                        value:
                                          type: integer
                                        end_time:
                                          type: string
                                      description: Instagram Insight Value OpenAPI Schema
                                  title:
                                    type: string
                                  description:
                                    type: string
                                  id:
                                    type: string
                                description: Instagram Insight OpenAPI Schema
                          description: Instagram Media OpenAPI Schema
                      follower_count_data:
                        type: array
                        items:
                          type: array
                          items:
                            title: Instagram Insight Value
                            type: object
                            properties:
                              value:
                                type: integer
                              end_time:
                                type: string
                            description: Instagram Insight Value OpenAPI Schema
                      impressions_data:
                        type: array
                        items:
                          type: array
                          items:
                            title: Instagram Insight Value
                            type: object
                            properties:
                              value:
                                type: integer
                              end_time:
                                type: string
                            description: Instagram Insight Value OpenAPI Schema
                      profile_views_data:
                        type: array
                        items:
                          type: array
                          items:
                            title: Instagram Insight Value
                            type: object
                            properties:
                              value:
                                type: integer
                              end_time:
                                type: string
                            description: Instagram Insight Value OpenAPI Schema
                      reach_data:
                        type: array
                        items:
                          type: array
                          items:
                            title: Instagram Insight Value
                            type: object
                            properties:
                              value:
                                type: integer
                              end_time:
                                type: string
                            description: Instagram Insight Value OpenAPI Schema
                    description: Instagram Statistics OpenAPI Schema
                  error:
                    type: string
components:
  schemas:
    InstagramGetInsightsSerializer:
      required:
        - access_token
        - user_id
      type: object
      properties:
        access_token:
          title: Access token
          minLength: 1
          type: string
        user_id:
          title: User 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

````