What Is Application Programming Interfaces (APIs)?

What are APIs?

  • “A Software to Software interface that gives the ability to exchange data”

  • Accessing Websites or Applications on Mobile Devices, we get access to Company Databases using APIs (To Write and/or Read Data)

  • Developers can write programs that easily access from and write Data to Databases


Why use APIs?

  • Allow Applications and Users to automate the exchange of Data and other actions

  • Transit Large Volumes of Data (Thousands to Millions of Events per Second or Minute)

  • Uses Hyper Text Transfer Protocol (HTTP) – Web Protocol

  • APIs are Everywhere – almost every major company, device, and application has an API(s) that allows for consumption of Data or use of Services


Interacting with Data through APIs

Social Media:

  • An application (e.g., Tik Tok, Facebook, Snapchat, Twitter, Instagram) gives a program an interface to retrieve information from its Database

  • The program must make a request to the application using HTTP for data transmission

  • Answers are returned in the form of a JSON object or an XML document

  • Essentially, an API is a web service plus an authentication protocol like OAuth

1. OAuth is an authentication mechanism that uses authorization tokens instead of passwords.


Web Services (URLs or Web Pages) can be used to retrieve Data

  • Simply Put: You ask something, you get something.

-> Example: Give me all the IG posts in the past 5 minutes – Result: 50 million posts with metadata

-> Example: Give me the last 50 tweets from Yara Shahidi – Result: 50 tweets with metadata.


GET or POST HTTP Requests Types



REST API Service

  • Representational State Transfer (REST) – software architectural standard for web services



Python Flask for developing REST APIs and Dashboards

  • Popular microframework for web applications

  • Included in Anaconda or pip install

  • Essential for building interactive web-based dashboards

  • Can run on top of Apache or Nginx

  • More at: http://flask.pocoo.org/


1 view0 comments