Intro to APIs

Emily Chao(elchao2), Berwin Xie(bxie6)

What is an API?

  • Application Programming Interface
  • Allows developers to integrate already-existing features into their application
  • Saves time, energy, allows for cool data analysis, etc.
  • Most often provided by companies or open-source communities

Example uses

  • Account creation, login, authentication (i.e. Google Login)
  • Social media posting capability (i.e. Tweet, Follow, Like)
  • Accessing data from different services (i.e. CUMTD,
  • Manipulate different data points between applications (i.e. Google Apps Script)
  • Incorporating other features (i.e. Google Maps)

Visual Components and Data Request Endpoints

How to gain access to an API

  • OAuth tokens
  • Register for API key through developer console
  • Maybe it's just an open API! Hooray!


  • Let's use JSFiddle
  • Tutorial based on CUMTD API
  • Challenge: Use the Open Movie Database API to create a search engine for movies

Ethics of using an API

  • Maintaining APIs is expensive
  • Many companies will rate-limit requests
  • For smaller or more open APIs, be aware of server downtime and other developers using the API - don't send too many requests!
  • Different cost models - # requests / day for free tier, capacity costs, etc.