Web APIs are tools for making information and application functionality accessible over the internet. In this lesson, you will:
- Use the requests library in Python to communicate with an API
- Explore returned data programatically
- Parse and clean returned data
This lesson has been adapted from Creating Web APIs with Python and Flask by Patrick Smyth, edited by Brandon Walsh, and reviewed by Ryan Deschamps and Megan Kudzia. This lesson was originally published on The Programming Historian.
Review: What is an API?
Why Use APIs as a Researcher?
An API Case Study: Sensationalism and Historical Fires
Making Requests Using Python
Parsing and Exploring Results
Cleaning and Transforming Data
Challenges