# API Key

*noun*

say it: **“AY-PEE-EYE KEE”** **/ˌeɪ piː ˈaɪ kiː/**

A secret code a service gives you that your program sends with each request, so the service knows who is asking.

## What is **API Key**?

An **API key** is a secret string that identifies the calling program. It is sent in a header on every request. Keep it out of code and browsers.

```bash
curl https://api.weather.example.com/today -H "X-Api-Key: <your key>"
```

## In a sentence

- “The weather service gave me an **API key**, and I keep it on the server, never in the page's JavaScript.”
- “Someone found the **API key** in my public code, so I canceled it and made a new one.”

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

Updated: November 9, 2026

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