Tunebat APItunebat.com ↗
Search Tunebat's track catalog and retrieve BPM, musical key, Camelot notation, energy, danceability, and 8+ audio features per track via a simple REST API.
What is the Tunebat API?
The Tunebat API exposes 2 endpoints that cover track search and detailed audio analysis from Tunebat.com. Use search_tracks to query the catalog by song name or artist and receive up to 50 results per call, then pass a track_id to get_track_details to retrieve 15+ fields including BPM, musical key, Camelot notation, energy, danceability, acousticness, and release date.
curl -X GET 'https://api.parse.bot/scraper/6d01197e-814d-4b41-9a7c-406491e35d34/search_tracks?query=classical' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace tunebat-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Tunebat SDK — search tracks, get details, inspect audio features."""
from parse_apis.Tunebat_Music_Data_API import Tunebat, TrackNotFound
client = Tunebat()
# Search for tracks by keyword — limit= caps total items fetched.
for summary in client.tracks.search(query="Blinding Lights", limit=3):
print(summary.name, summary.artist, summary.track_id)
# Drill down: take the first result and fetch full details.
first = client.tracks.search(query="Shape of You", limit=1).first()
if first:
track = first.details()
print(track.title, track.artist, track.bpm, track.key, track.camelot)
print(track.features.energy, track.features.danceability, track.features.happiness)
print(track.additional_info.album, track.additional_info.release_date)
# Use a track_id from a previous search result for direct lookup.
second = client.tracks.search(query="piano", limit=1).first()
if second:
detail = client.tracks.get(track_id=second.track_id)
print(detail.title, detail.artist, detail.duration)
# Typed error handling for a non-existent track.
try:
client.tracks.get(track_id="INVALID_ID")
except TrackNotFound as exc:
print(f"Track not found: {exc.track_id}")
print("exercised: tracks.search / TrackSummary.details / tracks.get / TrackNotFound")
Full-text search over Tunebat's track catalog by keyword (song name, artist, etc.). Returns up to 50 results per call with basic metadata (name, artist, track_id, url). The total_available field reports how many matches exist server-side. Each result's track_id can be passed to get_track_details for full audio features. Note: the upstream API may intermittently return 500 errors for some queries due to backend rate limiting.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Search keyword (e.g., 'classical', 'jazz', 'guitar', 'coldplay', 'ed sheeran') |
{
"type": "object",
"fields": {
"count": "integer — number of results returned in this response (max 50)",
"query": "string — the original search query echoed back",
"results": "array of track summary objects with name, artist, track_id, url",
"total_available": "integer — total number of matching tracks available server-side"
},
"sample": {
"data": {
"count": 50,
"query": "Shape of You",
"results": [
{
"url": "https://tunebat.com/Info/7qiZfU4dY1lWllzX7mPBI3",
"name": "Shape of You",
"artist": "Ed Sheeran",
"track_id": "7qiZfU4dY1lWllzX7mPBI3"
},
{
"url": "https://tunebat.com/Info/5BhCnMoTq4qI4vf37Ohlkm",
"name": "Shape of You",
"artist": "Ed Sheeran",
"track_id": "5BhCnMoTq4qI4vf37Ohlkm"
}
],
"total_available": 159
},
"status": "success"
}
}About the Tunebat API
Track Search
The search_tracks endpoint accepts a free-text query parameter (song title, artist name, or any keyword) and returns up to 50 matching track summaries per call. Each result includes name, artist, track_id, and a direct url to the Tunebat listing. The total_available field tells you how many server-side matches exist, so you can gauge coverage without paginating blindly. Search is case-insensitive.
Audio Feature Details
get_track_details takes either a track_id (the Spotify/Tunebat identifier, e.g. 7qiZfU4dY1lWllzX7mPBI3) or a full track_url — at least one is required. The response includes bpm, key (e.g. C♯ minor), camelot (e.g. 12A), and duration in mm:ss format. The features object carries eight numeric audio signals: energy, danceability, happiness, acousticness, instrumentalness, liveness, speechiness, and loudness. The additional_info object adds album and release_date in YYYY-MM-DD format.
Identifiers and Compatibility
Track IDs returned by search_tracks are the same Spotify track IDs used by the Spotify catalog, so any track ID you already have from a Spotify-based workflow can be passed directly to get_track_details without a prior search call. This makes it straightforward to enrich an existing playlist or track list with Tunebat's audio feature data.
The Tunebat API is a managed, monitored endpoint for tunebat.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when tunebat.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official tunebat.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a harmonic mixing tool that filters tracks by Camelot key and BPM range
- Enrich a playlist database with energy, danceability, and happiness scores for mood-based recommendations
- Verify BPM and musical key for a set of tracks before a DJ set
- Analyze acousticness and instrumentalness distributions across an album or artist catalog
- Flag high-speechiness tracks to separate podcast-style content from music in a mixed library
- Power a music production reference tool that maps audio features to genre or era
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Tunebat have an official developer API?+
What does `get_track_details` return in the `features` object?+
features object contains eight numeric values: energy, danceability, happiness, acousticness, instrumentalness, liveness, speechiness, and loudness. These are returned alongside top-level fields for bpm, key, camelot, and duration.Can `search_tracks` return more than 50 results in a single call?+
total_available field shows the full server-side match count. The API currently does not expose a pagination parameter (e.g. offset or page). You can fork this API on Parse and revise it to add a pagination input if you need to page through larger result sets.Does the API expose chart rankings, play counts, or streaming statistics for tracks?+
Can I look up an artist's full discography in one call?+
search_tracks endpoint accepts a free-text query and returns up to 50 matching tracks, which can include results for a given artist. There is no dedicated discography endpoint. You can fork this API on Parse and revise it to add an artist-scoped endpoint that pages through all tracks attributed to a specific artist.