Chartmetric Albums API

Album metadata, tracks, followers, charts, and placements.

OpenAPI Specification

chartmetric-albums-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Chartmetric Albums API
  description: REST API for the Chartmetric music analytics and artist-intelligence platform. Provides programmatic access to artists, tracks, albums, playlists, and charts along with cross-platform streaming, social, and radio statistics across Spotify, Apple Music, YouTube, TikTok, Instagram, and other platforms, plus a unified search endpoint. Authentication uses a short-lived Bearer access token minted by exchanging a long-lived refresh token at POST /token.
  termsOfService: https://chartmetric.com/terms-of-service
  contact:
    name: Chartmetric Support
    email: hi@chartmetric.com
    url: https://apidocs.chartmetric.com/
  version: '1.0'
servers:
- url: https://api.chartmetric.com/api
  description: Chartmetric production API
security:
- bearerAuth: []
tags:
- name: Albums
  description: Album metadata, tracks, followers, charts, and placements.
paths:
  /album/{id}:
    get:
      operationId: getAlbum
      tags:
      - Albums
      summary: Get album metadata
      parameters:
      - $ref: '#/components/parameters/AlbumId'
      responses:
        '200':
          description: Album metadata object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlbumResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /album/{id}/tracks:
    get:
      operationId: getAlbumTracks
      tags:
      - Albums
      summary: Get album tracks
      parameters:
      - $ref: '#/components/parameters/AlbumId'
      responses:
        '200':
          description: Tracks belonging to the album.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericObject'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /album/{id}/{source}/followers:
    get:
      operationId: getAlbumFollowers
      tags:
      - Albums
      summary: Get album followers by source
      parameters:
      - $ref: '#/components/parameters/AlbumId'
      - $ref: '#/components/parameters/Source'
      responses:
        '200':
          description: Follower time series for the album on the given source.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /album/{id}/{source}/{status}/playlists:
    get:
      operationId: getAlbumPlaylists
      tags:
      - Albums
      summary: Get album playlist placements
      parameters:
      - $ref: '#/components/parameters/AlbumId'
      - $ref: '#/components/parameters/Source'
      - $ref: '#/components/parameters/PlaylistStatus'
      responses:
        '200':
          description: Playlists the album appears on for the given source and status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericObject'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    Album:
      type: object
      properties:
        id:
          type: integer
          description: Chartmetric album ID.
        name:
          type: string
        upc:
          type: string
        label:
          type: string
        release_date:
          type: string
          format: date
        artist_names:
          type: array
          items:
            type: string
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
        status:
          type: integer
          description: HTTP status code.
    StatResponse:
      type: object
      properties:
        obj:
          type: object
          description: Time-series stat values keyed by metric.
          additionalProperties: true
    AlbumResponse:
      type: object
      properties:
        obj:
          $ref: '#/components/schemas/Album'
    GenericObject:
      type: object
      properties:
        obj:
          description: Response payload, shape varies by endpoint.
          oneOf:
          - type: object
            additionalProperties: true
          - type: array
            items:
              type: object
              additionalProperties: true
  parameters:
    Source:
      name: source
      in: path
      required: true
      description: Data source / platform (for example spotify, applemusic, youtube, tiktok, instagram, deezer).
      schema:
        type: string
    PlaylistStatus:
      name: status
      in: path
      required: true
      description: Placement status (current or past).
      schema:
        type: string
        enum:
        - current
        - past
    AlbumId:
      name: id
      in: path
      required: true
      description: Chartmetric album ID.
      schema:
        type: integer
  responses:
    Unauthorized:
      description: Missing or invalid access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested entity was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer access token obtained from POST /token.