Skip to main content

Soundcharts Module

A Python package for interacting with the Soundcharts API.

API Documentation

Full documentation of the API is available here: Soundcharts API Documentation

You will need a Soundcharts API subscription to use this package.

Features

  • Easily pull data from Soundcharts' API.
  • Every endpoint from the documentation is available as a Python function.
    • For example, the "get audience" endpoint in the "playlist" category is accessible via playlist.get_audience().
  • Synchronous and Asynchronous support.
  • Automatically loops through endpoints to get around API limitations, such as the limit of 100 items per request or cursors on premium endpoints.
  • Configurable error handling.

Installation

pip install soundcharts

Usage

Synchronous Client

Best for standard scripts, Jupyter notebooks, or scheduled cron jobs.

from soundcharts import SoundchartsClient

sc = SoundchartsClient(app_id="your_app_id", api_key="your_api_key")

# Example with Billie Eilish's UUID
billie_metadata = sc.artist.get_artist_metadata("11e81bcc-9c1c-ce38-b96b-a0369fe50396")
print(billie_metadata)

Asynchronous Client

Recommended for high-performance applications, FastAPI, or when integrating with other asyncio libraries. This avoids blocking the event loop and allows for faster execution in concurrent environments.

import asyncio
from soundcharts import SoundchartsClientAsync

async def main():
    sc = SoundchartsClientAsync(app_id="your_app_id", api_key="your_api_key")

    # Use 'await' for all API calls
    billie_uuid = "11e81bcc-9c1c-ce38-b96b-a0369fe50396"
    billie_metadata = await sc.artist.get_artist_metadata(billie_uuid)
    print(billie_metadata)

asyncio.run(main())

Error handling

You can set the severity of the console logs, file logs, and exceptions:

from soundcharts.client import SoundchartsClient
import logging

sc = SoundchartsClient( app_id="your_app_id",
                        api_key="your_api_key",
                        console_log_level=logging.INFO,
                        file_log_level=logging.WARNING,
                        exception_log_level=logging.ERROR)

Setting the level of the console or file log to logging.DEBUG will log each request send to the API.

Parallel processing

You can specify the number of requests to run in parallel. It's especially useful when looping through a lot of calls, like in this case fetching 3 months of Billie Eilish's radio airplay (about 3,000 calls):

from soundcharts.client import SoundchartsClient
import logging

sc = SoundchartsClient( app_id="your_app_id",
                        api_key="your_api_key",
                        parallel_requests=10)

billie = "11e81bcc-9c1c-ce38-b96b-a0369fe50396"

response = sc.artist.get_radio_spins(
    billie, start_date="2025-01-01", end_date="2025-03-31", limit=None
)

Other ways to access Soundcharts data

MCP

Soundcharts also provides an MCP (Model Context Protocol) server, allowing AI assistants such as ChatGPT, Claude Desktop, Cursor, VS Code, and other MCP-compatible clients to access Soundcharts data directly.

With the MCP server, you can query artists, tracks, playlists, charts, radio airplay, social metrics, and the rest of the Soundcharts API using natural language, without writing API calls manually.

See the MCP documentation for installation instructions and supported clients: Soundcharts MCP Documentation

Data feeds

If you need to ingest Soundcharts data at scale, we also provide datafeeds that deliver datasets directly to your infrastructure.

Datafeeds are ideal for data warehouses, BI platforms, analytics pipelines, and machine learning workflows, allowing you to receive continuously updated data without polling the API.

Learn more: Soundcharts Data feeds Documentation

Metadata

Release files for soundcharts 1.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for soundcharts 1.3.2
File Size Uploaded Provenance Actions
soundcharts-1.3.2.tar.gz 44.8 kB Without provenance Details for soundcharts-1.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for soundcharts 1.3.2
File Interpreter ABI Platform Actions
soundcharts-1.3.2-py3-none-any.whl Python 3 none any Details for soundcharts-1.3.2-py3-none-any.whl

Total release size: 99.5 kB

Release files / soundcharts-1.3.2.tar.gz

Download URL soundcharts-1.3.2.tar.gz
Size 44.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9ab14bcaf53a12f111ae0bde092f2a0c5262342832307a5cc8d9c42dcd76d8bf
BLAKE2b-256 checksum
How to use checksums
f4e34fb24c37a3b998719770a735d36df438df09b68185900233f461d5f8ae50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / soundcharts-1.3.2-py3-none-any.whl

Download URL soundcharts-1.3.2-py3-none-any.whl
Size 54.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
893ac3efe2b8c53928d158575ace89015b8c7a025b564cd950cf213632715224
BLAKE2b-256 checksum
How to use checksums
c79af3b9732d3bfcd1e84b2809ea6ada543eb2da6aef8a88979759c8508b23b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for soundcharts 1.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page