Is there a way to search recordings by license?


#1

I really want to be able to filter a search by free culture licenses, showing recordings that are CC0/public-domain / CC-BY / or CC-BY-SA. Is there any existing license field within the MusicBrainz DB? If not, how can we make this happen? It shouldn’t just be a tag.


#2

There is a license URL relationship, see https://musicbrainz.org/relationship/004bd0c3-8a45-4309-ba52-fa99f3aa3d50

See for example


#3

Just to add an example, the above mentioned relationship can be used to list everything marked with a specific license. E.g. the following link shows everything marked as CC by-nc-sa 3.0:

https://musicbrainz.org/url/d657ffec-d8d8-419e-9e0e-e585ad6c1499


#4

Thanks! I notice the URL contains the full http part. Creative Commons uses https and so that really ought to be the default. Is it possible to switch all CC entries to be https?

Also, is it possible to do a wildcard to see all the by-sa items regardless of 3.0 vs 4.0 etc?


#5

Note that while the stored URLs are standardised to use http:// we actually use protocol independent links—e.g., for the linked license URL we link to //creativecommons.org/licenses/by-nc-sa/3.0/ (which equals https://creativecommons.org/licenses/by-nc-sa/3.0/ for anyone seeing it on https://musicbrainz.org). We standardise a lot of the URL formats so that it’s easier to look them up from programs or scripts. One of the things we usually normalise is the protocol, to http: or to https: depending on a number of factors. I think Creative Commons use http://… themselves for their canonical URLs, which is why we store them that way (for now).

You can look up URLs and then query those URLs individually. There’s a community tool which allows something like this:
http://notlob.eu/urlsearch/?url=%2Fby-sa%2F&partial=on

However, I think MusicBrainz’s “internal” search also allows for URL searching now, even if it isn’t documented. I’m not 100% on the details though (since it isn’t documented). Once you have found the URL(s) somehow, you can use /ws/2/url browse requests to find entities linked to the license.


#6

So happy you made this post! :slight_smile:

Also thanks to the replies I now know how to find everything waived/licensed with CC0 1.0