# API

> The menu of things one program lets another program ask for.

- Level: Basic
- Topics: Software
- URL: https://tidbit.legios.com.ar/api/
- In Spanish: [API](https://tidbit.legios.com.ar/es/api/)

An **API** (Application Programming Interface) is a set of rules for how two programs talk. One side publishes what you can ask for and in what format; the other side sends requests and gets answers. You never see the kitchen, only the menu and the dishes.

On the web, most APIs work over HTTP: your app sends a request to a URL like `/weather?city=Rosario` and receives data back, usually as JSON. Maps in a food delivery app, the login with Google button, a chatbot inside a website: all APIs.

APIs are how companies sell software to other software. AWS, Stripe, and Anthropic are, at their core, collections of APIs with a bill attached.

## An analogy

A restaurant counter. You do not walk into the kitchen; you order from the menu, in the restaurant's language, and your plate comes out the window.

## Keep in mind

- An API defines what you can ask, how to ask it, and what you get back.
- Web APIs usually use HTTP and return JSON.
- An API key is the credential that says who is asking (and who pays).

## Go deeper

- [What is an API? (MDN)](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Client-side_APIs/Introduction)
- [Example: the Claude API reference](https://docs.anthropic.com/en/api/messages)

## Related terms

- [HTTP](https://tidbit.legios.com.ar/http/): The request-and-response language browsers and websites speak.
- [URL](https://tidbit.legios.com.ar/url/): The full address of something on the web: protocol, site and path.
- [JSON](https://tidbit.legios.com.ar/json/): The plain-text format programs use to hand each other structured data.
- [Google](https://tidbit.legios.com.ar/google/): The search company that gives most products away and makes its money on ads.
- [Chatbot](https://tidbit.legios.com.ar/chatbot/): A program you talk to by typing or speaking, as if it were a person.
- [Stripe](https://tidbit.legios.com.ar/stripe/): A company that lets websites and apps accept online payments with a few lines of code.
- [Anthropic](https://tidbit.legios.com.ar/anthropic/): The AI company behind Claude, built around making models safe and useful.
- [API key](https://tidbit.legios.com.ar/api-key/): A secret string that identifies your app when it calls someone else's API.
