{"openapi":"3.1.0","info":{"title":"Selin Vinyl API","version":"1.0.0","summary":"Music metadata: artists, albums, tracklists, ISRCs, credits, cover art and matching.","description":"Open music metadata from MusicBrainz and Wikidata (CC0) plus Selin's own listening data, served fast, with matching tools built for apps.\n\n## Authentication\nSend your key in the `x-api-key` header (or `?key=` for quick tests). Get a free key at https://selin-ai.com/vinyl-api.\n\n## Plans and limits\nEvery response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-Quota-Limit` and `X-Quota-Used`. Over the limit you get `429`; per-minute limits come with `Retry-After`.\n\n## Data licences\nCore catalogue: MusicBrainz and Wikidata, CC0. Biographies: Wikipedia, CC BY-SA 4.0 (credit and link back, as given in the response). Cover art: Cover Art Archive links; images belong to their rights holders. Artist photos: Wikimedia Commons; check each file page. Include the `attribution` string where you display the data.\n\n## Ids\nAll ids are MusicBrainz UUIDs, so you can cross-reference anything with other MusicBrainz-based tools.","contact":{"name":"Selin","email":"denderle@selin-ai.com","url":"https://selin-ai.com/vinyl-api"}},"servers":[{"url":"https://vinyl-api.selin-ai.com"}],"security":[{"ApiKey":[]}],"tags":[{"name":"Artists"},{"name":"Albums","description":"Release groups: an album, EP or single across all its editions."},{"name":"Tracks"},{"name":"Matching","description":"Turn messy title/artist/duration, ISRCs or barcodes into clean catalogue records."},{"name":"Credits","description":"Who produced, engineered, mixed or played on a recording."},{"name":"Charts"},{"name":"Account","description":"Plans, signup, checkout and usage."}],"paths":{"/v1/search":{"get":{"tags":["Artists"],"summary":"Search everything at once","description":"One search box for artists, albums and tracks. When the words open or close with a well-known artist's name (\"dua lipa levitating\", \"levitating dua lipa\") the albums and tracks are searched within that artist and the artist leads the results; a bare artist name leads with that artist's newest studio albums. `interpretation` says what was assumed.","parameters":[{"name":"q","in":"query","description":"What was typed (2+ characters).","schema":{"type":"string","minLength":2},"required":true,"example":"dua lipa levitating"},{"name":"limit","in":"query","description":"How many results to return (1-25).","schema":{"type":"integer","minimum":1,"maximum":25,"default":10}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"artists":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Artist"},{"type":"object","properties":{"spotifyId":{"type":["string","null"],"description":"Spotify artist id, when known."},"releaseGroups":{"type":"integer","description":"How many releases we hold."}},"required":["spotifyId","releaseGroups"]}]}},"releaseGroups":{"type":"array","items":{"$ref":"#/components/schemas/ReleaseGroupItem"}},"tracks":{"type":"array","items":{"$ref":"#/components/schemas/TrackHit"}},"interpretation":{"oneOf":[{"type":"object","properties":{"artist":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Lower-cased artist name."}},"required":["id","name"]},"rest":{"type":["string","null"],"description":"The rest of the words (the song or album part), or null when the whole query was the artist."}},"required":["artist","rest"]},{"type":"null"}]},"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["artists","releaseGroups","tracks","interpretation"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"search"}},"/v1/artists/search":{"get":{"tags":["Artists"],"summary":"Search artists","description":"Best match first: exact name, then prefix, then fuzzy, preferring artists with more releases.","parameters":[{"name":"q","in":"query","description":"Artist name (2+ characters).","schema":{"type":"string","minLength":2},"required":true,"example":"prince"},{"name":"limit","in":"query","description":"How many results to return (1-25).","schema":{"type":"integer","minimum":1,"maximum":25,"default":10}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"artists":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Artist"},{"type":"object","properties":{"spotifyId":{"type":["string","null"],"description":"Spotify artist id, when known."},"releaseGroups":{"type":"integer","description":"How many releases we hold."}},"required":["spotifyId","releaseGroups"]}]}},"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["artists"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"searchArtists"}},"/v1/artists/{id}":{"get":{"tags":["Artists"],"summary":"Get an artist","description":"Profile, members, release counts, genres, listening stats and Wikipedia/Wikidata enrichment.","parameters":[{"name":"id","in":"path","description":"The artist's MusicBrainz id (UUID).","schema":{"type":"string","format":"uuid"},"required":true,"example":"8538e728-ca0b-4321-b7e5-cff6565dd4c0"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtistDetail"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"No such artist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"getArtist"}},"/v1/artists/{id}/releases":{"get":{"tags":["Artists"],"summary":"List an artist's releases","description":"Albums, EPs and singles, newest first.","parameters":[{"name":"id","in":"path","description":"The artist's MusicBrainz id (UUID).","schema":{"type":"string","format":"uuid"},"required":true,"example":"8538e728-ca0b-4321-b7e5-cff6565dd4c0"},{"name":"type","in":"query","description":"Album, EP or single (default: all).","schema":{"type":"string","enum":["album","ep","single"]}},{"name":"studio","in":"query","description":"Hide live, compilation, remix and other secondary types (`studio=true`; `1` also works).","schema":{"type":"boolean"}},{"name":"official","in":"query","description":"Only releases with an official edition on record: leaves out bootlegs, promos and cancelled releases (`official=true`).","schema":{"type":"boolean"}},{"name":"limit","in":"query","description":"How many results to return (1-200).","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","description":"How many results to skip, for paging.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"releases":{"type":"array","items":{"$ref":"#/components/schemas/ReleaseGroupItem"}},"limit":{"type":"integer","description":"Page size used."},"offset":{"type":"integer","description":"Offset used."},"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["releases","attribution"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"listArtistReleases"}},"/v1/artists/{id}/credits":{"get":{"tags":["Credits"],"summary":"Recordings an artist is credited on","description":"Producer, engineer, mix, mastering, arranger, remixer, performer and other credited roles.","parameters":[{"name":"id","in":"path","description":"The artist's MusicBrainz id (UUID).","schema":{"type":"string","format":"uuid"},"required":true,"example":"8538e728-ca0b-4321-b7e5-cff6565dd4c0"},{"name":"role","in":"query","description":"Only this role.","schema":{"type":"string","example":"producer"}},{"name":"limit","in":"query","description":"How many results to return (1-100).","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","description":"How many results to skip, for paging.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","description":"Role."},"count":{"type":"integer","description":"Recordings in this role."}},"required":["role","count"]}},"credits":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","description":"Role."},"detail":{"type":"string","description":"Extra detail."},"recording":{"$ref":"#/components/schemas/Recording"},"album":{"type":"object","properties":{"releaseGroupId":{"type":"string","format":"uuid"},"title":{"type":"string","description":"Album title."},"date":{"type":["string","null"],"description":"Release date."}},"required":["releaseGroupId","title","date"]}},"required":["role","recording","album"]}},"limit":{"type":"integer","description":"Page size used."},"offset":{"type":"integer","description":"Offset used."},"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["roles","credits","attribution"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"listArtistCredits"}},"/v1/lookup/artist":{"get":{"tags":["Artists"],"summary":"Find an artist by another service's id","description":"Cross-reference from a Spotify, Apple Music or Deezer artist id to the MusicBrainz artist.","parameters":[{"name":"spotify","in":"query","description":"Spotify artist id.","schema":{"type":"string"}},{"name":"apple","in":"query","description":"Apple Music artist id.","schema":{"type":"string"}},{"name":"deezer","in":"query","description":"Deezer artist id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"artist":{"$ref":"#/components/schemas/Artist"},"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["artist","attribution"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"lookupArtist"}},"/v1/release-groups/search":{"get":{"tags":["Albums"],"summary":"Search albums, EPs and singles","description":"Ranks exact titles, studio releases and releases with a tracklist first, then popularity.","parameters":[{"name":"q","in":"query","description":"Title (2+ characters).","schema":{"type":"string","minLength":2},"required":true,"example":"purple rain"},{"name":"artist","in":"query","description":"Narrow to an artist: a MusicBrainz id or part of the name.","schema":{"type":"string"}},{"name":"type","in":"query","description":"Only this kind of release.","schema":{"type":"string","enum":["album","ep","single"]}},{"name":"limit","in":"query","description":"How many results to return (1-25).","schema":{"type":"integer","minimum":1,"maximum":25,"default":10}},{"name":"offset","in":"query","description":"How many results to skip, for paging.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"releaseGroups":{"type":"array","items":{"$ref":"#/components/schemas/ReleaseGroupItem"}},"limit":{"type":"integer","description":"Page size used."},"offset":{"type":"integer","description":"Offset used."},"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["releaseGroups"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"searchAlbums"}},"/v1/release-groups/{id}":{"get":{"tags":["Albums"],"summary":"Get a release group","description":"One album, EP or single with its credited artists.","parameters":[{"name":"id","in":"path","description":"The release group's MusicBrainz id (UUID).","schema":{"type":"string","format":"uuid"},"required":true,"example":"8538e728-ca0b-4321-b7e5-cff6565dd4c0"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"releaseGroup":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","description":"Title."},"type":{"type":["string","null"],"description":"Album, EP or Single."},"secondaryTypes":{"type":"array","items":{"type":"string"}},"firstReleaseDate":{"type":["string","null"],"description":"Earliest release date."},"year":{"type":["integer","null"]},"artistCredit":{"type":"string","description":"Credited artist(s)."},"artists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Artist."}},"required":["id","name"]}}},"required":["id","title","type","secondaryTypes","firstReleaseDate","year","artistCredit","artists"]},"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["releaseGroup","attribution"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"getAlbum"}},"/v1/release-groups/{id}/tracks":{"get":{"tags":["Albums"],"summary":"Get an album's tracklist","description":"The tracklist of the representative release (the earliest official edition), with recording ids and ISRCs.","parameters":[{"name":"id","in":"path","description":"The release group's MusicBrainz id (UUID).","schema":{"type":"string","format":"uuid"},"required":true,"example":"8538e728-ca0b-4321-b7e5-cff6565dd4c0"},{"name":"credits","in":"query","description":"Attach credits to every track (`credits=true`; `1` also works).","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"release":{"$ref":"#/components/schemas/Release"},"tracks":{"type":"array","items":{"$ref":"#/components/schemas/Track"}},"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["release","tracks","attribution"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"No tracklist yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"getAlbumTracks"}},"/v1/release-groups/{id}/artwork":{"get":{"tags":["Albums"],"summary":"Get cover art","description":"Cover art links from the Cover Art Archive. Verifies the image exists (cached 30 days).","parameters":[{"name":"id","in":"path","description":"The release group's MusicBrainz id (UUID).","schema":{"type":"string","format":"uuid"},"required":true,"example":"8538e728-ca0b-4321-b7e5-cff6565dd4c0"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"releaseGroupId":{"type":"string","format":"uuid"},"artwork":{"$ref":"#/components/schemas/Artwork"}},"required":["releaseGroupId","artwork"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"No artwork.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"The Cover Art Archive could not be reached; try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getAlbumArtwork"}},"/v1/artwork/check":{"post":{"tags":["Albums"],"summary":"Check which albums have cover art","description":"Pass up to 50 release group ids and learn which really have front cover art on the Cover Art Archive, so you can hide broken images. Results are cached for 30 days. Each id counts as one request.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":50,"description":"Release group ids."},"cachedOnly":{"type":"boolean","description":"Answer only from what is already known (instant); ids not known yet are left out."}},"required":["ids"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"object","description":"Release group id to true (has art), false (none) or null (the Cover Art Archive could not be reached).","additionalProperties":{"type":["boolean","null"]}}},"required":["results"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"checkArtwork"}},"/v1/artists/{id}/lookup-tracks":{"post":{"tags":["Matching"],"summary":"Find an artist's recordings by title","description":"Turns a list of song names (a chart, a playlist) into catalogue records for one artist: the recording, its ISRCs and the album it is best known from. Exact title match, case-insensitive. Counts as one request.","parameters":[{"name":"id","in":"path","description":"The artist's MusicBrainz id (UUID).","schema":{"type":"string","format":"uuid"},"required":true,"example":"8538e728-ca0b-4321-b7e5-cff6565dd4c0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"titles":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":50,"description":"Song titles."}},"required":["titles"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"The title as sent, lower-cased."},"match":{"oneOf":[{"$ref":"#/components/schemas/TrackHit"},{"type":"null"}]}},"required":["title","match"]}},"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["results"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"lookupArtistTracks"}},"/v1/lookup/album":{"get":{"tags":["Albums"],"summary":"Find an artist's album by title","description":"Punctuation and case insensitive; deluxe/remaster suffixes ignored; prefers the year given. Only groups with a tracklist.","parameters":[{"name":"artist","in":"query","description":"The artist's MusicBrainz id.","schema":{"type":"string","format":"uuid"},"required":true},{"name":"title","in":"query","description":"Album title.","schema":{"type":"string"},"required":true},{"name":"year","in":"query","description":"Preferred release year.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"releaseGroup":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","description":"Title."},"type":{"type":"string","description":"Album, EP or Single."},"year":{"type":["integer","null"]}},"required":["id","title","type","year"]},"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["releaseGroup","attribution"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"lookupAlbum"}},"/v1/releases/new":{"get":{"tags":["Albums"],"summary":"New releases","description":"The latest albums, EPs and singles in the catalogue, newest first.","parameters":[{"name":"days","in":"query","description":"Look back this many days (1-90).","schema":{"type":"integer","minimum":1,"maximum":90,"default":14}},{"name":"type","in":"query","description":"Only this kind of release.","schema":{"type":"string","enum":["album","ep","single"]}},{"name":"all","in":"query","description":"Include live, compilation, remix and other secondary types (`all=true`; `1` also works).","schema":{"type":"boolean"}},{"name":"limit","in":"query","description":"How many results to return (1-100).","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","description":"How many results to skip, for paging.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"integer","description":"Window used."},"releases":{"type":"array","items":{"$ref":"#/components/schemas/ReleaseGroupItem"}},"limit":{"type":"integer","description":"Page size used."},"offset":{"type":"integer","description":"Offset used."},"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["days","releases","attribution"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"listNewReleases"}},"/v1/lookup/upc/{code}":{"get":{"tags":["Albums"],"summary":"Look up a release by barcode","description":"UPC-A, EAN-13 and GTIN-14 spellings of the same barcode all work.","parameters":[{"name":"code","in":"path","description":"The barcode (8-14 digits).","schema":{"type":"string"},"required":true,"example":"602547924139"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/UpcResult"},{"type":"object","properties":{"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["attribution"]}]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"lookupUpc"}},"/v1/tracks/search":{"get":{"tags":["Tracks"],"summary":"Search tracks","description":"Find recordings by title, optionally narrowed by artist. Common titles are ranked by artist popularity.","parameters":[{"name":"q","in":"query","description":"Title (2+ characters).","schema":{"type":"string","minLength":2},"required":true,"example":"purple rain"},{"name":"artist","in":"query","description":"Artist name to narrow the search.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"How many results to return (1-25).","schema":{"type":"integer","minimum":1,"maximum":25,"default":10}},{"name":"offset","in":"query","description":"How many results to skip, for paging.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"tracks":{"type":"array","items":{"$ref":"#/components/schemas/TrackHit"}},"limit":{"type":"integer","description":"Page size used."},"offset":{"type":"integer","description":"Offset used."},"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["tracks"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"searchTracks"}},"/v1/tracks/isrc/{isrc}":{"get":{"tags":["Tracks"],"summary":"Look up a track by ISRC","description":"The recording and every album, EP or single we hold it on.","parameters":[{"name":"isrc","in":"path","description":"A 12-character ISRC (hyphens ignored).","schema":{"type":"string"},"required":true,"example":"USWB11602075"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IsrcResult"},{"type":"object","properties":{"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["attribution"]}]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"lookupIsrc"}},"/v1/recordings/{id}":{"get":{"tags":["Credits"],"summary":"Get a recording","description":"A recording with its ISRCs, the releases it appears on and its credits.","parameters":[{"name":"id","in":"path","description":"The recording's MusicBrainz id (UUID).","schema":{"type":"string","format":"uuid"},"required":true,"example":"8538e728-ca0b-4321-b7e5-cff6565dd4c0"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"recording":{"$ref":"#/components/schemas/Recording"},"appearsOn":{"type":"array","items":{"$ref":"#/components/schemas/AppearsOn"}},"credits":{"type":"array","items":{"$ref":"#/components/schemas/Credit"}},"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["recording","appearsOn","credits","attribution"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"getRecording"}},"/v1/match":{"get":{"tags":["Matching"],"summary":"Match a track","description":"Identify the recording behind a title, artist, album and duration: the matching tool for library imports and playlists. \"(Remastered)\" style suffixes are ignored. Weights: title 55%, artist 30%, album 10%, duration 5%.","parameters":[{"name":"title","in":"query","description":"Track title.","schema":{"type":"string"},"required":true},{"name":"artist","in":"query","description":"Artist name.","schema":{"type":"string"}},{"name":"album","in":"query","description":"Album name.","schema":{"type":"string"}},{"name":"durationMs","in":"query","description":"Duration in milliseconds.","schema":{"type":"integer"}},{"name":"duration","in":"query","description":"Duration in seconds (alternative).","schema":{"type":"number"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/MatchResult"},{"type":"object","properties":{"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["attribution"]}]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"matchTrack"}},"/v1/batch":{"post":{"tags":["Matching"],"summary":"Batch lookups","description":"Up to 50 ISRC, UPC, match and artist-lookup requests in one call. Each lookup counts as one request against your plan. Results come back in request order; a lookup that fails has an `error` instead of a `result`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRequest"},"example":{"requests":[{"id":"a","type":"isrc","value":"USWB11602075"},{"id":"b","type":"match","title":"Purple Rain","artist":"Prince","durationMs":521000}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"batch"}},"/v1/charts/artists":{"get":{"tags":["Charts"],"summary":"Artist chart","description":"Artists ranked by distinct listeners on Selin (then plays) over the last N days.","parameters":[{"name":"days","in":"query","description":"Window in days (1-90).","schema":{"type":"integer","minimum":1,"maximum":90,"default":7}},{"name":"limit","in":"query","description":"How many results to return (1-100).","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"integer","description":"Window used."},"artists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Artist."},"listeners":{"type":"integer","description":"Distinct listeners."},"plays":{"type":"integer","description":"Qualified plays."}},"required":["id","name","listeners","plays"]}}},"required":["days","artists"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"getArtistChart"}},"/v1/usage":{"get":{"tags":["Account"],"summary":"Your usage","description":"This month's request count and the last 30 days by endpoint, for the key making the call.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"month":{"type":"integer","description":"Requests so far this calendar month."},"daily":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","description":"Date."},"endpoint":{"type":"string","description":"Endpoint group."},"count":{"type":"integer","description":"Requests."}},"required":["day","endpoint","count"]}},"internal":{"type":"boolean","description":"true for Selin's own unmetered keys, which have no usage to report."}},"required":[]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"operationId":"getUsage"}},"/portal/config":{"get":{"tags":["Account"],"summary":"Plans and prices","description":"No key needed.","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"billing":{"type":"boolean","description":"Whether paid plans can be bought."},"plans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"free, starter, pro or scale."},"ratePerMin":{"type":"integer","description":"Requests per minute."},"monthlyQuota":{"type":"integer","description":"Requests per month."},"priceUsd":{"type":"integer","description":"Monthly price in US dollars."}},"required":["id","ratePerMin","monthlyQuota","priceUsd"]}}},"required":["billing","plans"]}}}}},"operationId":"getPlans"}},"/portal/signup":{"post":{"tags":["Account"],"summary":"Get a free key","description":"Creates a free key (one per email, a few per network per day). The key is shown once.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Your name or company."},"email":{"type":"string","description":"Your email.","format":"email"}},"required":["name","email"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Your API key. Store it now."},"tier":{"type":"string","description":"\"free\"."},"ratePerMin":{"type":"integer","description":"Requests per minute."},"monthlyQuota":{"type":"integer","description":"Requests per month."}},"required":["key","tier","ratePerMin","monthlyQuota"]}}}},"400":{"description":"Name or email invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"That email already has a key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many signups from this network today.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"signup"}},"/portal/checkout":{"post":{"tags":["Account"],"summary":"Upgrade your plan","description":"Starts a Stripe Checkout for a paid plan; authenticated with your own key. Your key upgrades automatically once payment completes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tier":{"type":"string","description":"The plan to buy.","enum":["starter","pro","scale"]}},"required":["tier"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Open this Stripe Checkout URL.","format":"uri"}},"required":["url"]}}}},"400":{"description":"Pick a paid plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Paid plans are not open yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"startCheckout"}}},"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Selin Vinyl API key (starts with `vk_`)."}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit or monthly quota exceeded. Per-minute limits include `Retry-After` (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute on your plan.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}},"X-Quota-Limit":{"description":"Requests allowed per calendar month on your plan.","schema":{"type":"integer"}},"X-Quota-Used":{"description":"Requests used so far this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A short machine-friendly code or a sentence explaining what went wrong."}},"required":["error"]},"Artwork":{"description":"Cover art for a release group, served by the Cover Art Archive. Images belong to their rights holders.","type":"object","properties":{"front":{"type":"string","description":"Full-size front cover.","format":"uri"},"thumb250":{"type":"string","description":"250 px thumbnail.","format":"uri"},"thumb500":{"type":"string","description":"500 px thumbnail.","format":"uri"},"thumb1200":{"type":"string","description":"1200 px version.","format":"uri"},"verified":{"type":["boolean","null"],"description":"true when we have confirmed the image exists, null when not checked yet. Releases known to have no art have `artwork: null`."},"source":{"type":"string","description":"Always \"Cover Art Archive\"."},"note":{"type":"string","description":"Reminder to check the image licence before reuse."}},"required":["front","thumb250","thumb500","thumb1200","verified","source","note"]},"ArtistImage":{"description":"Artist photo from Wikimedia Commons (taken from the artist's Wikidata entry). Licence and credit are on the file page.","type":"object","properties":{"url":{"type":"string","description":"800 px wide.","format":"uri"},"thumb":{"type":"string","description":"300 px wide.","format":"uri"},"page":{"type":"string","description":"The Commons file page with licence and credit.","format":"uri"},"source":{"type":"string","description":"Always \"Wikimedia Commons\"."},"note":{"type":"string","description":"Licence reminder."}},"required":["url","thumb","page","source","note"]},"Artist":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"MusicBrainz artist id."},"name":{"type":"string","description":"Artist or group name."},"sortName":{"type":"string","description":"Name for sorting, e.g. \"Beatles, The\"."},"type":{"type":["string","null"],"description":"Person, Group, Orchestra, Character, Choir or Other."},"gender":{"type":["string","null"],"description":"For people, where recorded."},"country":{"type":["string","null"],"description":"ISO 3166-1 country code."},"area":{"type":["string","null"],"description":"Area the artist is from."},"beginArea":{"type":["string","null"],"description":"Area where the artist began."},"begin":{"type":["string","null"],"description":"Birth, formation or first-release date (partial dates like \"1962\" occur)."},"end":{"type":["string","null"],"description":"Death or break-up date."},"ended":{"type":["boolean","null"]},"disambiguation":{"type":["string","null"],"description":"Short note telling apart artists with the same name."},"wikidataId":{"type":["string","null"],"description":"Wikidata Q-id.","examples":["Q1299"]},"links":{"type":["object","null"],"description":"Official sites and profiles by kind, each a list of URLs.","additionalProperties":{"type":"array","items":{"type":"string"}}},"image":{"oneOf":[{"$ref":"#/components/schemas/ArtistImage"},{"type":"null"}]},"aliases":{"type":["array","null"],"items":{"type":"string"}},"bio":{"oneOf":[{"type":"object","properties":{"text":{"type":"string","description":"Introduction text."},"source":{"type":"string","description":"Where the text came from."}},"required":["text","source"]},{"type":"null"}]}},"required":["id","name","sortName","type","gender","country","area","beginArea","begin","end","ended","disambiguation","wikidataId","links","image","aliases","bio"]},"ReleaseGroupItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"MusicBrainz release-group id: one album, EP or single across all its editions."},"title":{"type":"string","description":"Title."},"type":{"type":["string","null"],"description":"Album, EP or Single."},"secondaryTypes":{"type":"array","items":{"type":"string"},"description":"Live, Compilation, Remix, Soundtrack and so on. Empty for a plain studio release."},"year":{"type":["integer","null"]},"firstReleaseDate":{"type":["string","null"],"description":"Earliest release date (YYYY, YYYY-MM or YYYY-MM-DD)."},"releaseDate":{"type":["string","null"],"description":"Same as firstReleaseDate, on /releases/new."},"artistCredit":{"type":"string","description":"Credited artist(s) as printed."},"hasTracklist":{"type":"boolean","description":"Whether we hold the tracklist (see /release-groups/{id}/tracks)."},"score":{"type":"number","description":"Search relevance 0-1 (search results only)."},"artwork":{"oneOf":[{"$ref":"#/components/schemas/Artwork"},{"type":"null"}]}},"required":["id","title","type","artistCredit","artwork"]},"Track":{"type":"object","properties":{"disc":{"type":"integer","description":"Disc number."},"number":{"type":"integer","description":"Position on the disc."},"title":{"type":"string","description":"Track title."},"durationMs":{"type":["integer","null"]},"recordingId":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"MusicBrainz recording id."},"artistCredit":{"type":"string","description":"Credited artist(s)."},"isrcs":{"type":"array","items":{"type":"string"},"description":"ISRC codes for this recording."},"credits":{"type":"array","items":{"$ref":"#/components/schemas/Credit"},"description":"Present only with `credits=1`."}},"required":["disc","number","title","durationMs","recordingId","artistCredit","isrcs"]},"Release":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","description":"Edition title."},"date":{"type":["string","null"],"description":"Release date."},"country":{"type":["string","null"],"description":"Release country."},"upc":{"type":["string","null"],"description":"Barcode (UPC/EAN)."},"trackCount":{"type":"integer","description":"Number of tracks."}},"required":["id","title","date","country","upc","trackCount"]},"Credit":{"type":"object","properties":{"role":{"type":"string","description":"producer, engineer, mix, mastering, arranger, remixer, performer, etc."},"detail":{"type":"string","description":"Extra detail such as the instrument."},"artist":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Name."}},"required":["id","name"]}},"required":["role","artist"]},"AppearsOn":{"type":"object","properties":{"releaseGroupId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"title":{"type":"string","description":"Release title."},"date":{"type":["string","null"],"description":"Release date."},"type":{"type":"string","description":"Album, EP or Single (on /recordings only)."}},"required":["releaseGroupId","title","date"]},"Recording":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","description":"Title."},"artistCredit":{"type":"string","description":"Credited artist(s)."},"durationMs":{"type":["integer","null"]},"isrcs":{"type":"array","items":{"type":"string"},"description":"ISRC codes (not on every endpoint)."}},"required":["id","title","artistCredit","durationMs"]},"TrackHit":{"type":"object","properties":{"recordingId":{"type":"string","format":"uuid"},"title":{"type":"string","description":"Title."},"artistCredit":{"type":"string","description":"Credited artist(s)."},"durationMs":{"type":["integer","null"]},"isrcs":{"type":"array","items":{"type":"string"}},"album":{"type":"object","properties":{"releaseGroupId":{"type":"string","format":"uuid"},"title":{"type":"string","description":"Album title."},"date":{"type":["string","null"],"description":"Release date."}},"required":["releaseGroupId","title","date"]},"score":{"type":"number","description":"Relevance 0-1."},"artwork":{"oneOf":[{"$ref":"#/components/schemas/Artwork"},{"type":"null"}]}},"required":["recordingId","title","artistCredit","durationMs","isrcs","album","score","artwork"]},"MatchCandidate":{"type":"object","properties":{"confidence":{"type":"number","minimum":0,"maximum":1,"description":"How sure we are that this is the track you described (0-1)."},"recordingId":{"type":"string","format":"uuid"},"title":{"type":"string","description":"Title."},"artistCredit":{"type":"string","description":"Credited artist(s)."},"durationMs":{"type":["integer","null"]},"isrcs":{"type":"array","items":{"type":"string"}},"album":{"type":"object","properties":{"releaseGroupId":{"type":"string","format":"uuid"},"title":{"type":"string","description":"Album title."},"date":{"type":["string","null"],"description":"Release date."}},"required":["releaseGroupId","title","date"]},"artwork":{"oneOf":[{"$ref":"#/components/schemas/Artwork"},{"type":"null"}]},"ambiguous":{"type":"boolean","description":"Set on `match` when two near-identical editions tie."}},"required":["confidence","recordingId","title","artistCredit","durationMs","isrcs","album","artwork"]},"MatchResult":{"type":"object","properties":{"match":{"oneOf":[{"$ref":"#/components/schemas/MatchCandidate"},{"type":"null"}],"description":"The best candidate when it scores at least 0.75 and is clearly ahead of the runner-up, otherwise null."},"candidates":{"type":"array","items":{"$ref":"#/components/schemas/MatchCandidate"},"description":"Up to five best candidates, best first."}},"required":["match","candidates"]},"UpcResult":{"type":"object","properties":{"releaseGroup":{"$ref":"#/components/schemas/ReleaseGroupItem"},"release":{"$ref":"#/components/schemas/Release"}},"required":["releaseGroup","release"]},"IsrcResult":{"type":"object","properties":{"isrc":{"type":"string","description":"The normalised ISRC."},"recording":{"$ref":"#/components/schemas/Recording"},"appearsOn":{"type":"array","items":{"$ref":"#/components/schemas/AppearsOn"}}},"required":["isrc","recording","appearsOn"]},"Stats":{"description":"Listening on Selin over the trailing 28 days (our own plays).","type":"object","properties":{"monthlyListeners":{"type":"integer","description":"Distinct listeners, last 28 days."},"plays28d":{"type":"integer","description":"Qualified plays, last 28 days."},"playsAllTime":{"type":"integer","description":"All qualified plays."},"source":{"type":"string","description":"Always \"selin\"."}},"required":["monthlyListeners","plays28d","playsAllTime","source"]},"Enrichment":{"type":"object","properties":{"bio":{"oneOf":[{"type":"object","properties":{"text":{"type":"string","description":"Introduction text."},"source":{"type":"string","description":"\"Wikipedia\"."},"url":{"type":"string","description":"The article.","format":"uri"},"license":{"type":"string","description":"\"CC BY-SA 4.0\": credit and link back when you show it."}},"required":["text","source","url","license"]},{"type":"null"}]},"websites":{"type":["array","null"],"items":{"type":"string"}},"wikipediaTitle":{"type":["string","null"],"description":"English Wikipedia article title."},"awards":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Award."},"year":{"type":["integer","null"]}},"required":["name","year"]}},"labels":{"type":"array","items":{"type":"string"}}},"required":["bio","websites","wikipediaTitle","awards","labels"]},"Member":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Member name."},"begin":{"type":["string","null"],"description":"Joined."},"end":{"type":["string","null"],"description":"Left."},"ended":{"type":["boolean","null"]},"roles":{"type":["array","null"],"items":{"type":"string"}}},"required":["id","name","begin","end","ended","roles"]},"ArtistDetail":{"type":"object","properties":{"artist":{"allOf":[{"$ref":"#/components/schemas/Artist"},{"type":"object","properties":{"externalIds":{"type":"object","description":"Ids on other services by name (spotify, apple, deezer, ...), each a list.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["externalIds"]}]},"members":{"type":"array","items":{"$ref":"#/components/schemas/Member"},"description":"Band members, for groups (up to 40)."},"counts":{"type":"object","properties":{"studioAlbums":{"type":"integer","description":"Albums with no secondary type."},"albums":{"type":"integer","description":"All albums."},"eps":{"type":"integer","description":"EPs."},"singles":{"type":"integer","description":"Singles."}},"required":["studioAlbums","albums","eps","singles"]},"genres":{"type":"array","items":{"type":"string"},"description":"Genres from Wikidata (may be empty)."},"stats":{"oneOf":[{"$ref":"#/components/schemas/Stats"},{"type":"null"}]},"enrichment":{"oneOf":[{"$ref":"#/components/schemas/Enrichment"},{"type":"null"}],"description":"Bio, awards, labels and sites; null for artists not enriched yet."},"attribution":{"type":"string","description":"Data credit to show alongside the data."}},"required":["artist","members","counts","genres","stats","enrichment","attribution"]},"BatchRequest":{"type":"object","properties":{"requests":{"type":"array","minItems":1,"maxItems":50,"description":"Up to 50 lookups. Each counts as one request against your plan.","items":{"type":"object","required":["type"],"properties":{"id":{"description":"Your own reference, echoed back. Defaults to the position in the list.","type":["string","integer"]},"type":{"type":"string","enum":["isrc","upc","match","artist-lookup"]},"value":{"type":"string","description":"The ISRC or UPC (types isrc and upc), or the other service's id (type artist-lookup)."},"source":{"type":"string","description":"For artist-lookup: spotify, apple or deezer.","enum":["spotify","apple","deezer"]},"title":{"type":"string","description":"For match."},"artist":{"type":"string","description":"For match."},"album":{"type":"string","description":"For match."},"durationMs":{"type":"integer","description":"For match."},"duration":{"type":"number","description":"For match, in seconds (alternative to durationMs)."}}}}},"required":["requests"]},"BatchResponse":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","integer"]},"result":{"description":"The lookup result, shaped like the matching single endpoint."},"error":{"type":"string","enum":["not_found","unknown_type","server_error"]}},"required":["id"]}},"attribution":{"type":"string","description":"Data credit."}},"required":["results","attribution"]}}}}