Discogs.com has an API. The interface is small, lightweight, and RESTful. There are 4 methods: get release, get artist, get label, and search. They rate limit requests to 5000 in 24 hours, which is generous. Even better, each response tells you how many requests you’ve used.
Best of all, data retrieved is in the Public Domain. Do with it what you will.