Skip to content

API

An API (application programming interface) is a set of rules that lets one program ask another for data or actions, like your script asking a store for its orders.

Select any words here to ask your Maestro about them.

You call a store's GET /orders once, with your API key and no other options. The store has 2,340 orders. How many come back?

An online store with an orders API. Example data.

How it works: you send a request to an address (an endpoint) with a key that says who you are, and the answer usually comes back as JSON. The service decides what you may ask for and how often.

Where you meet it: every time a script, a spreadsheet or an AI agent pulls data from another service. n8n wires APIs together without code, and MCP is how Claude uses your tools' APIs.

Where it breaks: when the key is written into the code and ends up in a public repository. Keep it in an environment variable.

How it's used

One call, one answer

Terminal

  1. $ curl https://api.example.com/v1/orders/1042 -H "Authorization: Bearer $SHOP_KEY"The address says what you want; the key says who you are.
  2. marked: {"id": 1042, "total": 86.50, "status": "paid"}The answer comes back as JSON, which your code can read field by field.
Change 1042 to 1043 in the address and another order comes back: the address is the question, and the key says who's asking.

When to look closer

Asking for everything at once

30 calls in the same second

  1. marked: The API's limit: 10 calls per second

A dashboard pulls 30 stores' data, one call each, and you send them all in the same second. The API allows 10 per second. What comes back?

Ask your Maestro about API

It answers from the free course page closest to this word, the way it answers while you study.

Example

You: What does "API" mean, in plain words?

Your Maestro: I'll explain it with a case of yours: it sticks better than a definition. Which service would you like to pull data from without copying it by hand?

Asking about: Answers from the page "Is this file on my computer or in the cloud?"

Only this browser keeps what you ask here. How it works

Learn more

  • JSON

    JSON is a text format for structured data: labels and values inside curly braces, lists inside square brackets. Programs use it to pass data to each other.

  • MCP (Model Context Protocol)

    An open standard for connecting AI agents to outside tools and data sources, such as databases, APIs or documents, through one kind of connector.

  • AI agent

    A program that pairs a language model with tools, such as terminal commands and files, to carry out a task in several steps: it reads its context, acts, looks at the result and repeats.

  • n8n

    n8n is a workflow automation tool: you connect apps, code and AI steps as nodes on a canvas, and a trigger, like a schedule or a new email, runs the workflow on its own.

The whole glossary