๐Introduction to APIs
Last updated
Last updated
APIs, or Application Programming Interfaces, are essential tools for any data hacker looking to access and manipulate data. In this lesson, we will introduce you to the world of APIs and how they can be used to retrieve and interact with data from various sources. You will learn the basics of how APIs work and how to make API requests to retrieve data.
One main use of APIs are to provide data to various applications. For fun, below you see the Dog CEO API that returns random dog images from the internet.
Follow the link below and hit "refresh" multiple times to see the different data coming back from this data API.
You should notice that data comes back in a format that looks like the following. This format is JSON (JavaScript Object Notation) and is one of the most popular data formats on the internet. It easily allows humans to read it as well as any other computer systems that need to exchange information.
A web browser can then take that JSON information and pull out the image reference and display the actual image as content in an application, on a web page, or in a mobile phone app. More information about this process can be found at https://dog.ceo/dog-api/
Beyond fun dog images, data APIs also allow software to retrieve, update, delete, and send new data to systems all around the world. We call these processes CRUD (create, retrieve, update, and delete) operations.
An app on your cell phone could update data on your personal website, then your iPhone will retrieve some data from an API to know it needs an iOS update, and then another app will delete an entry in a database on the other side of the planet!
APIs can be leveraged them to access a wide range of data sources. Understanding APIs is a fundamental skill for any data hacker.