apyhub
Cover illustration for What Is an API Endpoint? Definition, Examples and How It Works
ApyHub

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

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

01Introduction

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.

02The parts of an API endpoint

PartExampleWhat it does
MethodGETSays what you want to do: read, create, update or delete
Base URLhttps://api.eu.apyhub.comThe address of the API server, shared by every endpoint
Path/callable-labs/ecb-exchange-rates/v1/latestPoints to one resource or action on that server
Path parameter/v1/historical/2026-11-01A value inside the path, such as an ID or a date
Query parameters?base=EUR&symbols=USD,GBPOptional filters after the ?
Headersapy-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.

03An API endpoint example, step by step

We called the Exchange Rates API 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.

04API endpoint vs API vs base URL vs route

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

TermWhat it isExample
APIThe whole interface, with all its endpointsThe Exchange Rates API
Base URLThe server address every endpoint starts withhttps://api.eu.apyhub.com
EndpointOne method plus one path, for one taskGET /v1/latest
RouteThe server-side code that handles an endpointA function mapped to /v1/latest in the API's code
ResourceThe thing an endpoint works onExchange 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). That's why the same path can do different things with GET and DELETE.

05How 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.

06How 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).

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

07Common API endpoint errors

ErrorUsual cause
404 Not FoundThe path is wrong: a typo, a missing version (/v1) or the wrong base URL
405 Method Not AllowedThe path exists, but not with that method. See 405 Method Not Allowed
400 Bad RequestA missing or badly formed parameter or body. See 400 Bad Request
401 UnauthorizedThe API key or token is missing or invalid. See bearer tokens
429 Too Many RequestsYou 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.

08API endpoints and AI agents

AI assistants call APIs one endpoint at a time too. Through ApyHub MCP, every endpoint in the ApyHub 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?

Browse API endpoints in the ApyHub catalog →

09Conclusion

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 →

10FAQ

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 returns the latest euro exchange rates from the Exchange Rates API.

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. 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, 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 to call it.

11About ApyHub

ApyHub 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 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.

12Sources