# How to use your API Key

**Header:**\
`x-api-key: YOUR_API_KEY`

Replace `YOUR_API_KEY` with the API key you generated from the dashboard.

## Curl

```
curl -X GET "https://api-production.data.gov.sg/v2/public/api/collections" \
  -H "x-api-key: YOUR_API_KEY"

```

## Python

```
import requests

headers = {"x-api-key": "YOUR_API_KEY"}
response = requests.get("https://api-production.data.gov.sg/v2/public/api/collections", headers=headers)
print(response.json())

```

## [Google Colab Notebook](https://colab.research.google.com/github/datagovsg/dgs-exploration/blob/master/DataGovSG.ipynb)

> **Keep your API key secure. Do not share your key or expose it in client-side code.**

For details on obtaining your API key, see [How to request an API key.](https://guide.data.gov.sg/developer-guide/api-overview/how-to-request-an-api-key)
