Hack with Data
  • Welcome to Hack with Data
  • Overview
    • โœจCourse Overview
  • Data Intro
    • ๐Ÿ—„๏ธImportance of Data in Today's World
    • ๐ŸขWhere Data Lives
    • ๐Ÿ”นWays to Logically Store Data
    • ๐Ÿ”Security Measures for Protecting Data
    • ๐ŸงนData Cleaning and Preprocessing
  • WORKING WITH DATA
    • โ‰๏ธQuerying Databases with SQL
    • ๐Ÿ“ฑExample of Querying Data from Python
    • ๐Ÿ”Introduction to APIs
  • DATA ANALYSIS AND VISUALIZATION
    • ๐Ÿ”ขIntroduction to Data Analysis
    • ๐Ÿ“ŠData Visualization Tools (Excel, Tableau, PowerBI)
    • ๐ŸŒณVisualization and Data for Environmental Initiatives
  • REAL-WORLD APPLICATIONS
    • ๐Ÿ”Data in Cybersecurity
    • ๐Ÿง‘โ€๐Ÿ’ปCareer Paths in Data
  • CONCLUSION
    • ๐ŸฅณCourse Recap
    • ๐Ÿ“Quiz
    • ๐Ÿ“„Keep on Learning
  • SouthHills Info Request
Powered by GitBook
On this page
  1. WORKING WITH DATA

Introduction to APIs

PreviousExample of Querying Data from PythonNextIntroduction to Data Analysis

Last updated 7 months ago

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.

{
    "message": "https://images.dog.ceo/breeds/retriever-chesapeake/n02099849_1449.jpg",
    "status": "success"
}

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.

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

The Chesapeake Retriever referenced in the JSON data above
๐Ÿ”
https://dog.ceo/dog-api/
https://dog.ceo/api/breeds/image/randomdog.ceo
A Dog Photo API