WhoSampled APIwhosampled.com ↗
Access WhoSampled data via API: search tracks and artists, retrieve sample connections, artist profiles, track details, and trending Hot Samples chart.
What is the WhoSampled API?
The WhoSampled API exposes 5 endpoints covering music sample connections, artist profiles, track metadata, and trending charts. The get_track_detail endpoint returns a full connections_summary array with sample, cover, and remix relationships — including the sampled track's name, artist, year, and tag. Use get_trending_samples to pull the current 24-hour Hot Samples chart without any input parameters.
curl -X GET 'https://api.parse.bot/scraper/ce66773d-6622-4c56-a9ae-64dc0a37df1f/search?query=Daft+Punk' \ -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 whosampled-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.
from parse_apis.whosampled_api import WhoSampled, Artist, SearchResult, SearchHit, SampledTrack, Track, TrendingSample
client = WhoSampled()
# Search for an artist
result = client.searchresults.search(query="Daft Punk")
print(result.top_hit.name, result.top_hit.url)
for artist_hit in result.artists:
print(artist_hit.name, artist_hit.url)
for track_hit in result.tracks:
print(track_hit.name, track_hit.url)
# Fetch full artist profile via constructible
artist = client.artist(name="Daft-Punk")
print(artist.name, artist.stats_summary)
# Browse tracks that use samples (paginated)
for track in artist.samples_used(limit=5):
print(track.name, track.url)
for conn in track.connections:
print(conn.action, conn.name, conn.artist, conn.year, conn.tag)
# Get a specific track detail via sub-resource
detail = artist.tracks.get(track_slug="Harder,-Better,-Faster,-Stronger")
print(detail.title, detail.artist, detail.album, detail.year)
for conn in detail.connections_summary:
print(conn.section, conn.name, conn.artist, conn.year, conn.tag)
# Browse trending samples
for sample in client.trendingsamples.list(limit=10):
print(sample.name, sample.url)
Full-text search across artists and tracks on WhoSampled. Returns a top hit (the single best match), a list of matching artists, and a list of matching tracks. Results are ranked by relevance; no pagination.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Search keyword (artist or track name) |
{
"type": "object",
"fields": {
"tracks": "array of matching tracks, each with name and url",
"artists": "array of matching artists, each with name and url",
"top_hit": "object or null containing name and url of the top search result"
},
"sample": {
"data": {
"tracks": [
{
"url": "https://www.whosampled.com/Daft-Punk/Harder,-Better,-Faster,-Stronger/",
"name": "Harder, Better, Faster, Stronger"
}
],
"artists": [
{
"url": "https://www.whosampled.com/Indo-Silver-Club-(Daft-Punk-Alias)/",
"name": "Indo Silver Club (Daft Punk Alias)"
}
],
"top_hit": {
"url": "https://www.whosampled.com/Daft-Punk/",
"name": "Daft Punk"
}
},
"status": "success"
}
}About the WhoSampled API
Search and Artist Profiles
The search endpoint accepts a query string and returns three distinct result sets: a top_hit object (or null), an artists array, and a tracks array — each entry containing a name and url. The get_artist endpoint takes an artist_slug (e.g. 'Daft-Punk') and returns the artist's real_name, aliases, groups, and a stats_summary string summarizing their sample, cover, and remix counts on WhoSampled.
Track Details and Sample Connections
get_track_detail requires both an artist_slug and a track_slug that exactly matches the URL path on WhoSampled, including comma-encoded punctuation (e.g. 'Harder,-Better,-Faster,-Stronger'). It returns title, artist, album, year, and a connections_summary array. Each connection object carries section, name, artist, year, tag, and url fields — giving a complete picture of what a track sampled, what sampled it, and any cover or remix relationships.
Samples Used and Trending Charts
get_artist_samples_used returns a paginated list of tracks by an artist that incorporate samples. Each result includes a connections array with action, name, url, artist, year, and tag. An optional tag parameter filters connections by tag text, and a page parameter handles pagination. The get_trending_samples endpoint takes no inputs and returns the current Hot Samples chart as an array of objects with name and url fields reflecting the most-viewed sample connections in the last 24 hours.
Slug Format and Redirect Behavior
Both get_artist and get_track_detail depend on slugs that mirror WhoSampled's URL structure exactly. If a track_slug is malformed or incorrect, the source redirects to the artist page rather than a track page, which the API surfaces as an input_not_found-style error. Use the search endpoint first to retrieve correct url values, then extract slugs from those URLs to ensure accuracy.
The WhoSampled API is a managed, monitored endpoint for whosampled.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when whosampled.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 whosampled.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 music discovery tool that traces the sample lineage of any track using
connections_summaryfields - Populate an artist database with real name, aliases, group memberships, and sample stats from
get_artist - Monitor daily trending sample connections via
get_trending_samplesfor a music news or chart feed - Filter an artist's sampled works by genre or type using the
tagparameter inget_artist_samples_used - Construct a knowledge graph of producer influences by linking
connectionsacross multiple artist slugs - Validate or enrich a music metadata catalog with album name and release year from
get_track_detail - Power a 'Did you know this song sampled...' widget on a streaming or music blog platform
| 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 WhoSampled have an official developer API?+
What does `get_track_detail` return, and how is the `track_slug` formatted?+
title, artist, album, year, and a connections_summary array. Each connection includes section (e.g. 'Contains Samples Of'), name, artist, year, tag, and url. The track_slug must exactly replicate the URL path on WhoSampled, with punctuation preserved as commas — for example, 'Harder,-Better,-Faster,-Stronger'. An incorrect slug causes a redirect to the artist page rather than returning track data.Can I filter `get_artist_samples_used` by sample type?+
tag parameter filters the returned connections array by matching against tag text (e.g. filtering to only drum breaks or vocal samples). The page parameter handles pagination for artists with large catalogs.