In order to work with APIs in Python, we need tools that will make those requests. For instance, when you visited this blog post, your web browser made a request to the Dataquest web server, which responded with the content of this web page.ĪPI requests work in exactly the same way – you make a request to an API server for data, and it responds to your request. When we want to receive data from an API, we need to make a request. APIs are most commonly used to retrieve data, and that will be the focus of this beginner tutorial. ![]() What is an API?Īn API, or Application Programming Interface, is a server that you can use to retrieve and send data to using code. ![]() If you’re looking for something more advanced, check out our Intermediate API tutorial. If you don’t, you might like to try our free Python Fundamentals course. This tutorial is based on part of our interactive course on APIs and Webscraping in Python, which you can start for free.įor this tutorial, we assume that you know some of the fundamentals of working with data in Python. In this blog post, we’ll be querying a simple API to retrieve data about the International Space Station (ISS). In cases like the ones above, an API is the right solution. You could theoretically create your own classifier, and use it to compute music categories, but you’ll never have as much data as Spotify does. Spotify has an API that can tell you the genre of a piece of music.
0 Comments
Leave a Reply. |