Skip to main content

Python client for the SonoVault music metadata API — ISRC, ISWC, genre, labels, release dates, and cross-platform IDs for 90M+ tracks.

Project description

sonovault

CI PyPI

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, resolved in a single call.

  • One key, no OAuth — a single x-api-key header, 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 → composition (ISWC), for royalty/publishing workflows
work = sv.tracks.iswc(isrc=track["isrc"])

Bulk resolve

Resolve up to 100 lines — track names, ISRCs, or platform IDs — in one request (great 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 (twice by default; configure 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, update, delete, test, deliveries

Some endpoints (audio identify, browse, charts, stream monitoring) need a paid tier — see pricing. Everything else works on the free tier.

Related

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sonovault-1.0.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sonovault-1.0.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file sonovault-1.0.0.tar.gz.

File metadata

  • Download URL: sonovault-1.0.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for sonovault-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2392d0bd097e5c4d7aa33fb80bbdb2896e6f9ca85e2db323017b8cc2ae8e34d5
MD5 2dd70c33fcd3a10831f1162886de543d
BLAKE2b-256 41585b12109b34e82ed33b002f6892302fe71d2e8e1578b708b05385054e65f9

See more details on using hashes here.

File details

Details for the file sonovault-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sonovault-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for sonovault-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 131c557350bf169415866c497f665d27457dbe332c1a904cf67f82bdf672b8d8
MD5 e530a4be7b3105be984df22ec1257b7b
BLAKE2b-256 746bdd925f163b4a1ed8ced96892fc2c680a69be4da9d20310e9c22052f3ec12

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page