# API Client

*noun*

say it: **“AY-PEE-EYE KLY-ent”** **/ˌeɪ piː ˈaɪ ˈklaɪənt/**

A class that wraps a web API's endpoints in ordinary methods, so other code never handles URLs or JSON.

## What is **API Client**?

**API Client** — A class that wraps a web API's endpoints in ordinary methods, such as `GetProductsAsync()`. The rest of the program calls methods and gets objects back, and never sees the URLs, status codes or JSON.

```csharp
class ProductsApi(HttpClient client)
{
    public Task<List<Product>?> GetAllAsync() =>
        client.GetFromJsonAsync<List<Product>>("api/products");
}
```

## In a sentence

- “The ProductsApi **API client** gives the rest of the app plain methods like GetAllAsync().”

Level: Journeyman · [More REST API terms at this level](https://www.ask-codey.com/glossary?category=rest-api&level=3)

Updated: October 28, 2026

Source: https://www.ask-codey.com/glossary/api-client
