Skip to main content
Colin Jaffe/2 min read

Unlocking Data Access: Navigating APIs with Python

Data Science Best Practices

0/4
Master Data Science at Noble Desktop

Noble Desktop's Data Science & AI Certificate covers Python, machine learning, and the modern data science stack.

This lesson is a preview from our Data Science & AI Certificate Online (includes software) and Python Certification Online (includes software & exam). Enroll in a course for detailed lessons, live instructor support, and project-based training.

Use APIs to access, explore, and analyze publicly available data efficiently. Watch this tutorial to learn the key concepts and techniques.

Let's sum up our way of accessing data using APIs. First, remember that an API is an interface to data. And many APIs are public.

We'll take a look at that link here in a second. With our understanding of this particular API—which required spending time researching and understanding it—we were able to use the correct URL to access the data we wanted, make a request to that URL, convert it from JSON, and then do anything we wanted with it: explore it, understand its structure, put it into a data frame, graph it, plot it, and extract useful information from it.

All the things you're used to doing with data—we're able to do with this data using relatively little code. The hard part isn’t the code.

It’s understanding the shape of the data, understanding which API is right for you, which API has the data you're looking for, and maybe even combining multiple APIs. The fact that APIs are so powerful and that the data is so publicly available means you have great power and great access to information. But you also have to put in the work to ensure you're doing it correctly and that you can actually find, in that sea of data, the data you truly need.

The existence of that sea of data—and our ability to access it—is amazing and has really changed the nature of working with data in Python as APIs have expanded over the last 20 years. If you want to get started with APIs and explore what data is out there, I recommend the link we showed you earlier—the GitHub-curated list of public APIs. It’s updated constantly and contains a massive amount of resources.

These are just categories—let alone the actual data itself. Even if we just look at the "Documents and Productivity" category, there's a long list of public APIs.

There's a lot more to be said about APIs, but it’s far outside the scope of this course. They are the first of the two main ways we're going to look at acquiring data using Python. I hope you got a lot out of this introduction to APIs and accessing data.

We'll move on to our next section.