July 22nd, 2009 // 2:23 pm

Album Art with Amazon’s Product Advertising API

For my upcoming project, I need to download album art programatically for songs. Everywhere recommends using Amazon to do so, yet there are no working examples of how. So here’s how:

To use this script you must get an api key for Amazon Web Services and Amazon’s Product Advertising API.

To start with we do a search for “Album, Artist” (this I have found works better than searching for “song, artist” after all we are looking for “album” art), we take the ASIN for the top result. The ASIN is a unique identifier Amazon gives to every item in its catalog.

We then lookup the particular item that this ASIN refers to and ask for Amazon to give us the images for this product (lines 15-21).

Hope this explanation helps someone looking to do something similar.