What is an API?

An API is a way for one app or website to ask another app or website for information.

Think of it like this

An API is like a waiter โ€” you ask for food, the kitchen makes it, and the waiter brings it back.

What's happening

Diagram showing an app sending a request to an API and receiving data back

Summary

APIs let software talk to other software.

A Closer Look

An API is a messenger that lets different apps and services talk to each other and share information. When you use an app that shows the weather, maps, or lets you log in with your Google account, that app is using APIs to get data from other services without you seeing what's happening behind the scenes.

Common Misconceptions

  • An API isn't a physical thing or a programming language โ€” it's just an agreed-upon way for two systems to communicate.
  • APIs aren't only for developers โ€” every time you log in with Google or see a map embedded in a site, you're using one.
  • "API" doesn't always mean a web API โ€” there are APIs built into operating systems, apps, and hardware too.

How it connects

APIs are how the modern web shares data:

Try it yourself

Open a new tab and go to api.github.com/users/github โ€” you'll see raw JSON data returned directly from GitHub's API, exactly what apps receive when they make a request.