Understand what an API is.

7 min · No prior experience · Tecnología

A 7-minute lesson: what an API is, the contract between programs, its 4 pieces with a real example, and a 3-question test.

What an API is and how to read a request, an endpoint, and a JSON response.

The case

Your weather app doesn't measure the temperature. It asks someone for it.

In 7 minutes you'll know what an API is, how a request and its response travel, and you'll read a real exchange like a conversation.

What you will learn

  • Explain what an API is in your own words
  • Locate the request, endpoint, response, and format in an example
  • Read a GET exchange with JSON without coding

The contract between programs

An API is an agreement: one program asks for something in a specific way and another answers in a specific way. If you understand the agreement, you understand the API.

  1. Request

    What one program asks for: where and what it wants.

  2. Endpoint

    The exact address that handles that request.

  3. Response

    What the other side returns, with a status.

  4. Format

    The agreed language of the response, usually JSON.

Frequently asked questions

What is an API?

An agreement so two programs can communicate: one asks in a specific way and the other answers in a specific way.

Do I need to know how to code?

No: this lesson teaches you to read exchanges, not to write code.

Test yourself: Lightning test: do you speak API?

What is an API?

Correct answer: A contract so two programs can ask for and return things.

The API is neither the app nor the data: it is the agreement that lets you request and receive them predictably.

Your weather app shows 21°. What happened behind the scenes?

Correct answer: The app asked an API for the data and showed its response.

The app measures nothing: it asks an endpoint and presents the response. It is the client, not the meteorologist.

You see GET /tiempo → {temp: 21}. What does it mean?

Correct answer: Someone asks for the weather and receives 21 in the agreed format.

GET is the verb (give me), /tiempo the address, and {temp: 21} the agreed response. Contract fulfilled.

The pocket rule — An API is a contract: who asks, to which address, what it returns, and in which format. If you can spot those four things, you understand it.

What you take away

Explain what an API is and read a request and its response.

Keep learning

Open the interactive lesson →