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

# Timeseries of top 5 YouTube channels by citation share

> Returns a day/week/month timeseries of the top 5 YouTube channels by citation share, with every channel present in each bucket (0 when absent).



## OpenAPI

````yaml https://api.mentionlab.io/api/docs-json post /api/v1/analytics/social/youtube/channels/timeseries
openapi: 3.0.0
info:
  title: MentionLab Public API v0.3.4-rc
  description: ''
  version: 0.3.4-rc
  contact: {}
servers:
  - url: https://api.mentionlab.io
security: []
tags: []
paths:
  /api/v1/analytics/social/youtube/channels/timeseries:
    post:
      tags:
        - Analytics - Social
      summary: Timeseries of top 5 YouTube channels by citation share
      description: >-
        Returns a day/week/month timeseries of the top 5 YouTube channels by
        citation share, with every channel present in each bucket (0 when
        absent).
      operationId: SocialV1Controller_getYoutubeChannelsTimeseries_v1
      parameters:
        - name: x-project-id
          in: header
          description: Project ID to specify the project context
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/YoutubeChannelsTimeseriesDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YoutubeChannelsTimeseriesResponse'
        '400':
          description: >-
            The request failed validation — the body, query or path parameters
            are malformed or out of range.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: The request is missing valid authentication credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '403':
          description: >-
            The authenticated principal lacks the required permission, or access
            to the requested organisation/project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    YoutubeChannelsTimeseriesDto:
      type: object
      properties:
        startDate:
          type: string
          description: Start date (inclusive)
          example: '2025-01-01'
        endDate:
          type: string
          description: End date (exclusive)
          example: '2025-02-01'
        countries:
          description: Filter by country codes
          example:
            - BE
            - FR
          type: array
          items:
            type: string
        languages:
          description: Filter by language codes
          example:
            - en
            - fr
          type: array
          items:
            type: string
        models:
          description: Filter by AI models
          example:
            - gpt-4o
            - claude-3-5-sonnet
          type: array
          items:
            type: string
        queryIds:
          description: Filter by query IDs
          example:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
          type: array
          items:
            type: string
        hasSources:
          type: string
          description: >-
            Filter by source presence: "sources" (only with sources),
            "no_sources" (only without), "all" (no filter). Legacy true/false
            values are still accepted.
          enum:
            - all
            - sources
            - no_sources
        hasShopping:
          type: string
          description: >-
            Filter by shopping presence: "shopping" (only with shopping),
            "no_shopping" (only without), "all" (no filter). Legacy true/false
            values are still accepted.
          enum:
            - all
            - shopping
            - no_shopping
        queryTagIds:
          description: Filter by query tag IDs (numeric — bigint column)
          example:
            - '42'
          type: array
          items:
            type: string
        execTagIds:
          description: Filter by execution tag IDs
          example:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
          type: array
          items:
            type: string
        queryTagGroupIds:
          description: >-
            Filter by query tag group IDs — matches rows carrying any tag filed
            under a selected group. Combines with queryTagIds per queryTagMode.
          example:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
          type: array
          items:
            type: string
        execTagGroupIds:
          description: >-
            Filter by execution tag group IDs — matches rows carrying any tag
            filed under a selected group. Combines with execTagIds per
            execTagMode.
          example:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
          type: array
          items:
            type: string
        queryTypes:
          type: array
          description: >-
            Filter by query type. Include "untyped" to also match queries
            without a type. Results from since-deleted queries are excluded when
            this filter is set.
          items:
            type: string
            enum:
              - comparative
              - informative
              - perception
              - untyped
        queryTagMode:
          type: string
          description: >-
            Query tag matching mode: "or" matches ANY tag (default), "and"
            matches ALL tags.
          enum:
            - and
            - or
          default: or
        execTagMode:
          type: string
          description: >-
            Execution tag matching mode: "or" matches ANY tag (default), "and"
            matches ALL tags.
          enum:
            - and
            - or
          default: or
        timezone:
          type: string
          description: >-
            IANA timezone for date bucketing and filtering (e.g.
            "Europe/Brussels"). Defaults to UTC.
          example: Europe/Brussels
          default: UTC
        groupBy:
          type: string
          description: >-
            Row grouping level for entity results. "none" = one row per entity,
            "division" = one row per division (entities not in a division get
            their own row), "group" = one row per top-level group (divisions
            roll up into their group). Defaults to "none".
          enum:
            - none
            - division
            - group
        groupByEntityGroup:
          type: boolean
          description: >-
            Deprecated — use groupBy instead. true is equivalent to
            groupBy="group".
          deprecated: true
          example: false
        showAllEntities:
          type: boolean
          description: >-
            Include entities that have only ever been seen in a single AI
            response. These are mostly one-off extraction noise and are hidden
            by default.
          example: false
        bucketSize:
          type: string
          description: Time bucket granularity
          enum:
            - day
            - week
            - month
          example: day
      required:
        - bucketSize
    YoutubeChannelsTimeseriesResponse:
      type: object
      properties:
        channels:
          description: >-
            The top 5 channels ordered by total citations across the full date
            range. Every bucket in `points` will contain an entry for each of
            these 5 channels (0 if absent).
          type: array
          items:
            $ref: '#/components/schemas/YoutubeChannelsTimeseriesChannel'
        points:
          description: >-
            Flat array of data points — one entry per (bucket × channel)
            combination. Ordered by bucket ascending, then by channel rank
            descending within each bucket.
          type: array
          items:
            $ref: '#/components/schemas/YoutubeChannelsTimeseriesPoint'
      required:
        - channels
        - points
    ApiErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code of the error.
          example: 400
        message:
          type: string
          description: >-
            Human-readable description of the error. Validation failures return
            an array of per-field validation errors instead of a single string.
          example: Validation failed
        error:
          type: string
          description: Short name of the HTTP error.
          example: Bad Request
      required:
        - statusCode
    YoutubeChannelsTimeseriesChannel:
      type: object
      properties:
        channelId:
          type: string
          description: YouTube-side channel ID.
          example: UCsXVk37bltHxD1rDPwtNM8Q
        channelName:
          type: string
          description: Channel display name from the latest snapshot.
          example: Kurzgesagt – In a Nutshell
      required:
        - channelId
        - channelName
    YoutubeChannelsTimeseriesPoint:
      type: object
      properties:
        bucket:
          type: string
          description: >-
            Start of the time bucket (ISO 8601). Granularity depends on the
            requested bucketSize (day/week/month).
          example: '2026-03-01T00:00:00.000Z'
        channelId:
          type: string
          description: YouTube-side channel ID.
          example: UCsXVk37bltHxD1rDPwtNM8Q
        channelName:
          type: string
          description: Channel display name from the latest snapshot.
          example: Kurzgesagt – In a Nutshell
        resultCount:
          type: number
          description: >-
            Number of distinct AI responses that cited any video from this
            channel within this bucket.
          example: 12
        citationShare:
          type: number
          description: >-
            This channel's per-bucket share among AI responses citing any
            YouTube channel in the bucket. Formula: (resultCount / bucket total
            YT-citing responses) × 100. Per-bucket shares across the 5 top
            channels can sum to ≤ 100% (other channels outside the top 5 also
            have citations).
          example: 22.5
      required:
        - bucket
        - channelId
        - channelName
        - resultCount
        - citationShare

````