APIs allow us to make requests from servers to retrieve data. APIs are useful for many things, but one is to be able to create a unique dataset for a data science project. In this tutorial, we’re going to learn some advanced techniques for working with the Last.fm API.

In our beginner Python API tutorial, we worked with a simple API that was ideal for teaching the basics:

It had a few, easy to understand end points.
Because it didn’t require authentication, we didn’t have to worry about how to tell the API that we had permission to use it.
The data that each end point responded with was small and had an easy-to-understand structure.
In reality, most APIs are more complex than this, and so to work with them you need to understand some more advanced concepts. Specifically, we’re going to learn:

  • How to authenticate yourself with an API key.
  • How to use rate limiting and other techniques to work within the guidelines of an API.
  • How to use pagination to work with large responses.

#api #last.fm #python

Getting Music Data with the Last.fm API using Python
13.30 GEEK