OpenAPI Specification
openapi: 3.0.1
info:
title: Chartmetric Albums Search 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: Search
description: Unified entity search.
paths:
/search:
get:
operationId: search
tags:
- Search
summary: Search entities
description: Free-text search across artists, tracks, albums, playlists, curators, and other entity types, returning Chartmetric IDs for follow-on lookups.
parameters:
- name: q
in: query
required: true
description: Search query string.
schema:
type: string
- name: type
in: query
required: false
description: Comma-separated entity types to restrict the search to (for example artists, tracks, albums, playlists, curators).
schema:
type: string
- name: limit
in: query
required: false
schema:
type: integer
default: 10
- name: offset
in: query
required: false
schema:
type: integer
default: 0
responses:
'200':
description: Search results grouped by entity type.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchResponse'
'401':
$ref: '#/components/responses/Unauthorized'
components:
schemas:
SearchResponse:
type: object
properties:
obj:
type: object
description: Search results grouped by entity type (artists, tracks, albums, playlists, curators).
additionalProperties: true
Error:
type: object
properties:
error:
type: string
description: Human-readable error message.
status:
type: integer
description: HTTP status code.
responses:
Unauthorized:
description: Missing or invalid access token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: Bearer access token obtained from POST /token.