APIs: your gateway to data from Google, Facebook, Twitter, Reddit, etc.

An Application Programming Interface, or API, is a way that your own program can interact with data from another piece of software. That software might be something provided by Google, Facebook, Twitter, Reddit, etc.

API keys and Rate Limits

Some APIs are open APIs, which means you can use them without having to register first. These are typically rate limited meaning that you can only access the API a certain number of times per minute, or per hour. These limits are usually pretty low. They are find for initial testing, but for anything beyond that, you typically need to get an API key.

The API key is something you should NOT hard code in your Python code and then store in github. Instead, you should use the same techniques used for the OAuth GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET that are documented elsewhere on this website, namely storig the value in environment variable (TODO: Link to description of that technique). That involves:

Direct, or via a library

There are two main ways to work with an API from Python code

I highly recommend using a library whenever one is available.

A few APIs