Lesson 3 · Request and response

How do APIs work?

Most API interactions follow a simple round trip. Your software sends a request to an endpoint, the service processes it, and the response comes back carrying the requested data or status.

Request out, requested data back
💻
Your AppAsks for Chicago weather
API EndpointReceives the request
☁️
Weather ServiceGets the requested information
RequestGET /weather?city=Chicago
Response72°F · Sunny · 55% humidity
🎯

Endpoint

The specific API address for a capability, such as weather, company matching, or email verification.

📤

Request

The message your software sends. It usually includes an action, input values, and sometimes authentication.

📥

Response

The API’s answer. It can contain requested data, a confirmation, or an error explaining what happened.

Remember the pattern: endpoint → request → processing → response. The response is the return trip carrying back the result of the original request.

Quick check

What is an API endpoint?