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

# Platform Metrics

> Get platform-specific metrics for an artist over time — followers, listeners, views, engagement, and radio airplay. Supports 16 sources.



## OpenAPI

````yaml api-reference/openapi/research.json GET /api/research/metrics
openapi: 3.1.0
info:
  title: Recoup API - Research
  description: >-
    API documentation for the Recoup platform - an AI agent platform for the
    music industry
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security: []
paths:
  /api/research/metrics:
    get:
      description: >-
        Get platform-specific metrics for an artist over time — followers,
        listeners, views, engagement, and radio airplay. Supports 16 sources.
      parameters:
        - name: artist
          in: query
          required: false
          description: Artist name. Required unless `id` is provided.
          schema:
            type: string
        - name: source
          in: query
          required: true
          description: Platform to get metrics for.
          schema:
            type: string
            enum:
              - spotify
              - instagram
              - tiktok
              - twitter
              - facebook
              - youtube_channel
              - youtube_artist
              - soundcloud
              - deezer
              - twitch
              - line
              - melon
              - wikipedia
              - bandsintown
              - radio
              - sxm
        - name: id
          in: query
          required: false
          description: >-
            Provider artist ID returned by lookup or search. Required unless
            `artist` is provided.
          schema:
            type: string
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
            example: artist_123
      responses:
        '200':
          description: Platform metrics over time
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResearchMetricsResponse'
        '202':
          description: Metrics refresh is pending. Retry this endpoint shortly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResearchRefreshPendingResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResearchErrorResponse'
        '401':
          description: Authentication failed — invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResearchErrorResponse'
        '501':
          $ref: '#/components/responses/ResearchDataSourceUnsupported'
components:
  schemas:
    ResearchMetricsResponse:
      type: object
      description: Current statistics for the artist on the requested `source`.
      properties:
        status:
          type: string
          example: success
        result:
          type: string
          example: success
        message:
          type: string
          example: Data Retrieved.
        stats:
          type: array
          items:
            $ref: '#/components/schemas/ResearchMetricStat'
        artist_info:
          $ref: '#/components/schemas/ResearchArtistRef'
        source_ids:
          type: array
          description: Sources included in `stats`.
          items:
            type: string
    ResearchRefreshPendingResponse:
      type: object
      required:
        - status
        - state
        - message
      description: >-
        Returned when metrics are being refreshed and no cached result is
        available yet.
      properties:
        status:
          type: string
          enum:
            - pending
          example: pending
        state:
          type: string
          enum:
            - refresh_pending
          example: refresh_pending
        message:
          type: string
          example: Research metrics refresh is pending. Retry this endpoint shortly.
    ResearchErrorResponse:
      type: object
      required:
        - status
        - error
      description: >-
        Error response returned by all research endpoints for validation
        failures (400) and authentication errors (401).
      properties:
        status:
          type: string
          enum:
            - error
          example: error
        error:
          type: string
          description: Human-readable error message describing what went wrong.
          example: 'Missing required parameter: artist'
    ResearchMetricStat:
      type: object
      description: Per-source current statistics.
      properties:
        source:
          type: string
          description: Platform the metrics belong to, e.g. `spotify`, `tiktok`.
        data:
          type: object
          description: Platform-specific metric fields. Keys vary by `source`.
          additionalProperties:
            type: number
          example:
            monthly_listeners_current: 99222567
            followers_total: 112035525
            popularity_current: 100
            streams_total: 137582496099
            playlists_current: 169220
            charts_current: 184
      additionalProperties: true
    ResearchArtistRef:
      type: object
      description: Provider-neutral artist reference.
      properties:
        id:
          type: string
          description: Provider-neutral artist ID.
          example: wjcgfd9i
        name:
          type: string
          example: Drake
        avatar:
          type: string
          description: Artist image URL.
          nullable: true
        site_url:
          type: string
          description: Artist page URL.
          nullable: true
      additionalProperties: true
  responses:
    ResearchDataSourceUnsupported:
      description: >-
        The configured research data source does not support this endpoint or
        data shape.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResearchErrorResponse'
          example:
            status: error
            error: Request failed with status 501

````