Extract label data from the API
|Posted: 25 May 2022 05:13|
I have searched through the API documentation and could not find a way to fetch record label data.
Will this option be added to the API?
|Posted: 21 Aug 2022 02:45|
|I'm not the API developer, just another user like you.|
From getting familiar with the results for queries, 2 fields exist for Label:
As far I know, there's no TADB API endpoint to query for these, but could be added down the road.
In the meantime, you could use the MusicBrainzAPI. The query endpoint for labels is:
The idLabel is specific to TADB and won't do you any good on M.B., but you could try to query the strLabel value.
I'm going to use the example label name "Nuclear Blast" as the strLabel value returned from a TADB artist lookup.
The label name needs to be URL-friendly, so format it with rawurlencode (PHP) or similar function for whatever language your coding in. Since it's more than one word, it needs to encased in double quotes (""). The result for that would be:
Then just append that to url query parameter:
That will give you a ton of info about the label, including the specific MBID for that label. In this example it's:
You may be able to get the info you're looking from that. BUT, If you want releases from that label, you can use the label MBID to query releases:
NOTE: MusicBrainz greatly limits the time a query can run, so a label may have 1,000+ releases, but you'll only get as many as it could process before the query times out. Your best bet is to know what you're looking for, and search specifically for that instead of a generic "give me all releases from this label".
Hope that helps set you in the right direction!