---
title: "What Is an API Endpoint? Definition, Examples and How It Works"
url: https://apyhub.com/blog/what-is-an-api-endpoint
author: ApyHub
published: 2026-11-05T13:16:37Z
---

# What Is an API Endpoint? Definition, Examples and How It Works

# What Is an API Endpoint? Definition, Examples and How It Works

## Introduction

**An API endpoint is the specific URL where an API accepts requests for one task.** You send a request to that URL with an HTTP method such as GET or POST, and the API sends back a response, usually JSON. One API can have many endpoints, one for each thing it does.

Here's a real one. This endpoint returns today's euro exchange rates:

```
GET https://api.eu.apyhub.com/callable-labs/ecb-exchange-rates/v1/latest
```

The rest of this post breaks that URL into its parts and shows a real request and response. It also covers how an endpoint differs from an API, a base URL and a route, and the errors you'll see when you call one wrong.

## The parts of an API endpoint

| Part             | Example                                     | What it does                                             |
| ---------------- | ------------------------------------------- | -------------------------------------------------------- |
| Method           | GET                                         | Says what you want to do: read, create, update or delete |
| Base URL         | https://api.eu.apyhub.com                   | The address of the API server, shared by every endpoint  |
| Path             | /callable-labs/ecb-exchange-rates/v1/latest | Points to one resource or action on that server          |
| Path parameter   | /v1/historical/2026-11-01                   | A value inside the path, such as an ID or a date         |
| Query parameters | ?base\=EUR\&symbols\=USD,GBP                | Optional filters after the ?                             |
| Headers          | apy-token: ...                              | Extra details, such as your API key                      |
| Body             | {"email": "..."}                            | Data you send with POST, PUT or PATCH                    |

The method and the path together identify the endpoint. `GET /users` and `POST /users` share a URL, but they're two endpoints, because one lists users and the other creates one.

## An API endpoint example, step by step

We called the [Exchange Rates API](https://apyhub.com/callable-labs/service/ecb-exchange-rates) on ApyHub, asking for three currencies:

```bash
curl -X GET "https://api.eu.apyhub.com/callable-labs/ecb-exchange-rates/v1/latest?base=EUR&symbols=USD,GBP,JPY" \
  -H "apy-token: $APY_TOKEN"
```

The endpoint returned (the `notice` field is cut for space):

```json
{
  "base": "EUR",
  "date": "2026-11-04",
  "rates": { "USD": 1.1267, "GBP": 0.8346, "JPY": 178.3 },
  "source": "European Central Bank euro foreign exchange reference rates; fixed-parity currencies derived from their official pegs",
  "pegged": []
}
```

Here's what each part of the request did:

* **`GET`** asked to read data.
* **`/v1/latest`** chose the "latest rates" endpoint.
* **`?base=EUR&symbols=USD,GBP,JPY`** set the base currency and limited the answer to three currencies.
* **`apy-token`** identified who was calling.

The same API has a second endpoint for past dates. The date goes in the path:

```bash
curl -X GET "https://api.eu.apyhub.com/callable-labs/ecb-exchange-rates/v1/historical/2026-11-01?symbols=USD" \
  -H "apy-token: $APY_TOKEN"
```

```json
{
  "base": "EUR",
  "date": "2026-10-30",
  "requested_date": "2026-11-01",
  "rates": { "USD": 1.1172 }
}
```

November 1, 2026 was a Sunday, when the European Central Bank publishes no rates. The endpoint returned the Friday rates and kept the date we asked for in `requested_date`. A good endpoint explains its answer like this instead of failing silently.

## API endpoint vs API vs base URL vs route

These terms get mixed up, so here's how they differ:

| Term     | What it is                                    | Example                                           |
| -------- | --------------------------------------------- | ------------------------------------------------- |
| API      | The whole interface, with all its endpoints   | The Exchange Rates API                            |
| Base URL | The server address every endpoint starts with | https://api.eu.apyhub.com                         |
| Endpoint | One method plus one path, for one task        | GET /v1/latest                                    |
| Route    | The server-side code that handles an endpoint | A function mapped to /v1/latest in the API's code |
| Resource | The thing an endpoint works on                | Exchange rates for a date                         |

An API is the menu, and an endpoint is one dish on it. The route is how the kitchen makes that dish, which callers never see.

The HTTP standard calls the target of a request a "resource" and puts the meaning of the request in the method ([RFC 9110](https://datatracker.ietf.org/doc/html/rfc9110)). That's why the same path can do different things with GET and DELETE.

## How endpoints differ by API style

* **REST APIs** have many endpoints, usually one path per resource (`/users`, `/users/42`, `/orders`), with the method deciding the action.
* **GraphQL APIs** usually have a single endpoint, often `POST /graphql`. The query in the body decides what you get back.
* **gRPC APIs** call methods on a service instead of URL paths.

For a fuller comparison, see [REST vs GraphQL vs gRPC vs SOAP](https://apyhub.com/blog/rest-vs-graphql-vs-grpc-vs-soap).

## How API endpoints are documented

Most APIs describe their endpoints in an OpenAPI file. Its `paths` section "holds the relative paths to the individual endpoints and their operations", and each path is added to the server URL to make the full address ([OpenAPI Specification 3.1](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md)).

A good endpoint reference tells you:

* the method and path
* the required and optional parameters, with types and limits
* the headers, including how to authenticate
* an example request and response
* the error codes it can return

## Common API endpoint errors

| Error                  | Usual cause                                                              |
| ---------------------- | ------------------------------------------------------------------------ |
| 404 Not Found          | The path is wrong: a typo, a missing version (/v1) or the wrong base URL |
| 405 Method Not Allowed | The path exists, but not with that method. See 405 Method Not Allowed    |
| 400 Bad Request        | A missing or badly formed parameter or body. See 400 Bad Request         |
| 401 Unauthorized       | The API key or token is missing or invalid. See bearer tokens            |
| 429 Too Many Requests  | You called the endpoint too often. See 429 Too Many Requests             |

Most endpoint problems are one of these five. Check the method, the full URL and the auth header first.

## API endpoints and AI agents

AI assistants call APIs one endpoint at a time too. Through [ApyHub MCP](https://apyhub.com/mcp), every endpoint in the [ApyHub catalog](https://apyhub.com/catalog) is available as a ready-made tool. Claude, ChatGPT, Cursor and other assistants can find it, read what it expects, and call it without a hand-written wrapper.

Ask "what's the euro to dollar rate today?" and the assistant calls `GET /v1/latest` with the right parameters. Calling a tested endpoint gives consistent answers and uses fewer tokens than having the assistant write and debug its own code. To see how MCP works, read [What is MCP?](https://apyhub.com/blog/what-is-mcp-the-model-context-protocol-in-plain-english)

[**Browse API endpoints in the ApyHub catalog →**](https://apyhub.com/catalog)

## Conclusion

An API endpoint is one method plus one URL path, for one task. The base URL says which server to call, the path says what you want, parameters and the body add details, and headers say who you are. Once you can read those parts, any API reference becomes easier to follow, and most endpoint errors come down to one of them being wrong.

[**Start free on ApyHub, no card required →**](https://apyhub.com/)

## FAQ

### What is an API endpoint in simple terms?

It's the address you send a request to when you want an API to do one specific thing, such as return exchange rates or validate an email.

### What is an example of an API endpoint?

`GET `[`https://api.eu.apyhub.com/callable-labs/ecb-exchange-rates/v1/latest`](https://api.eu.apyhub.com/callable-labs/ecb-exchange-rates/v1/latest) returns the latest euro exchange rates from the [Exchange Rates API](https://apyhub.com/callable-labs/service/ecb-exchange-rates).

### Is an API endpoint just a URL?

Mostly. An endpoint is a URL plus an HTTP method. The same URL with GET and with DELETE counts as two endpoints, because they do different things.

### What is the difference between an API and an endpoint?

The API is the whole interface. An endpoint is one entry point into it. One API usually has many endpoints.

### How many endpoints should an API have?

As many as it has distinct tasks. Small APIs often have 1 to 5. Large platforms have hundreds, usually grouped by resource.

### What is an endpoint URL vs a base URL?

The base URL is the server address shared by all endpoints, such as [`https://api.eu.apyhub.com`.](https://api.eu.apyhub.com.) The endpoint URL adds the path for one task.

### How do I find an API's endpoints?

Read its documentation or OpenAPI file. On ApyHub, each API page lists its endpoints with the method, path, parameters and an example.

### How can I test an API endpoint?

Use the "Try it" panel on the API's page, run the request with curl, or save it in [Voiden](https://voiden.md), a free, open-source API client that keeps requests as files in your project. You can also ask an AI assistant connected to [ApyHub MCP](https://apyhub.com/mcp) to call it.

## About ApyHub

[ApyHub](https://apyhub.com/) runs a catalog of ready-made APIs and is the trusted operational layer between your application and the services it depends on. One subscription, billed in atoms, covers the whole [catalog](https://apyhub.com/catalog) of over 1,500 endpoints and capabilities, and it keeps growing. Every service is evaluated before it is listed and carries machine-readable certification covering GDPR, SOC 2 and ISO 27001. Every endpoint is MCP-ready by default. ApyHub runs dedicated EU and US regions and serves more than 65,000 developer workspaces every month. Start on the free tier with no card, or [publish your own API on ApyHub](https://apyhub.com/api-provider).

## Sources

* IETF, [RFC 9110: HTTP Semantics](https://datatracker.ietf.org/doc/html/rfc9110) (June 2022): resources and request methods
* OpenAPI Initiative, [OpenAPI Specification 3.1.0](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md): the Paths Object
* ApyHub, [Exchange Rates API](https://apyhub.com/callable-labs/service/ecb-exchange-rates): requests run November 5, 2026
