The Last.fm music website has an API under the https://ws.audioscrobbler.com/ domain that you can use to read the albums, artists, tracks, events, and more. The API allows you to either use the JSON or XML format. In this recipe, we will import the top tracks tagged indie using the JSON format.
Importing data from an external JSON file
Getting ready
Follow these steps to import data in the JSON format from Last.fm:
- Let's start with the music app that we created in the Importing data from a local CSV file recipe.
- To use Last.fm, you need to register and get an API key. The API key can be
created at https://www.last.fm/api/account/create. - The API key has to be set in the settings as LAST_FM_API_KEY. We recommend
providing...