Python client for the SonoVault music metadata API — ISRC, ISWC, genre, labels, release dates, and cross-platform IDs for 90M+ tracks.
Project description
sonovault
Python client for the SonoVault music metadata API. 90M+ tracks with ISRC, ISWC, genre, record label, canonical release dates, and cross-platform IDs for Spotify, Apple Music, Tidal, Beatport, Discogs, and MusicBrainz. One call resolves them all.
- One key, no OAuth. A single
x-api-keyheader, no approval queue. - Free tier. 1,000 requests/month, no credit card: get an API key.
- Docs. Full API reference at sonovault.now/docs.
Install
pip install sonovault
Python 3.9+.
Quickstart
from sonovault import SonoVault
sv = SonoVault(api_key="YOUR_API_KEY")
# Find a track's ISRC from artist + title
page = sv.tracks.search(artist="Daft Punk", title="One More Time")
track = page["results"][0]
print(track["isrc"]) # "GBDUW0000053"
print(track["genre"], track["releases"][0]["label"]["name"])
# Resolve that ISRC to its ID on every platform
links = sv.tracks.links(isrc=track["isrc"])
for link in links["links"]:
print(link["source"], link["url"]) # spotify https://open.spotify.com/track/...
# Recording to composition (ISWC), for royalty and publishing workflows
work = sv.tracks.iswc(isrc=track["isrc"])
Bulk resolve
Resolve up to 100 lines in one request: track names, ISRCs, or platform IDs. Useful for enriching play logs and library exports.
batch = sv.tracks.resolve(
input_type="track_name",
items=[
{"artist": "Daft Punk", "title": "Harder, Better, Faster, Stronger"},
{"artist": "Daft Punk", "title": "Around the World"},
],
)
for row in batch["results"]:
print(row["status"], row["track"] and row["track"]["isrc"])
Pagination
List endpoints return {"results": [...], "next_cursor": ...}. Pass the cursor back for the next page. next_cursor is None on the last page.
cursor = None
while True:
page = sv.artists.releases(42, cursor=cursor)
# ...use page["results"]
cursor = page.get("next_cursor")
if not cursor:
break
Error handling
Non-2xx responses raise SonoVaultError:
from sonovault import SonoVaultError
try:
sv.tracks.browse(genre="House") # paid-tier endpoint
except SonoVaultError as err:
print(err.status, err.is_forbidden, err)
Rate-limited responses that carry a Retry-After header are retried automatically. The default is 2 retries, configurable with max_retries.
API coverage
| Namespace | Methods |
|---|---|
sv.tracks |
search, get, by_isrc, iswc, by_iswc, links, resolve, identify, identify_audio, browse |
sv.artists |
search, get, releases |
sv.labels |
search, get, releases, artists |
sv.releases |
search, get, latest |
sv.genres |
list |
sv.suggestions |
submit, list |
sv.streams |
create, list, get, update, history, report, live, stop |
sv.webhooks |
create, list, get, update, delete, test, deliveries |
Some endpoints (audio identify, browse, stream monitoring) need a paid tier. See pricing. Everything else works on the free tier.
Related
- SonoVault API docs. Full endpoint reference with examples in 8 languages.
- sonovault-js. The TypeScript/Node client.
- Free ISRC lookup and ISWC lookup. Browser tools built on the same API.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sonovault-1.1.0.tar.gz.
File metadata
- Download URL: sonovault-1.1.0.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83260764bd64424eb836287fc047a075251b2b8a860ab36b6835be21b28eb80a
|
|
| MD5 |
6077fb73e8bf175756e70496930fcce1
|
|
| BLAKE2b-256 |
e9a8d0e2fc81382de1e4f3363f14aa162678d99a59039739866fdf90b2b5ac24
|
File details
Details for the file sonovault-1.1.0-py3-none-any.whl.
File metadata
- Download URL: sonovault-1.1.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2284e33f2c984ac42dbf9ef8e78e1a1d9e91c5c896a51b08e197202b2392f93
|
|
| MD5 |
a043d92310deadc4e13a22a2fd16c30f
|
|
| BLAKE2b-256 |
e91b3108a93a6fdd19ea7cfe90afef63ba2ae59716c79353bfa666ac512234f0
|