> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postcode.gov.ng/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> From zero to your first postcode lookup.

## 1. Get an API key

Create an account in the [developer dashboard](http://localhost:3002/register), then go to
**Settings → API Keys → Create key**. Copy the secret — it's shown once.

<Note>Search and Lookup L1 work without a key. You only need a key for Lookup L2+.</Note>

## 2. Make a request

Pass your key in the `X-API-Key` header.

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.postcode.gov.ng/v1/lookup?code=EK-01-A03-FK-01&level=1"
  ```

  ```bash With a key (L3) theme={null}
  curl "https://api.postcode.gov.ng/v1/lookup?code=EK-01-A03-FK-01&level=3" \
    -H "X-API-Key: nipost_live_xxx"
  ```

  ```js JavaScript theme={null}
  const res = await fetch(
    "https://api.postcode.gov.ng/v1/lookup?code=EK-01-A03-FK-01&level=3",
    { headers: { "X-API-Key": "nipost_live_xxx" } }
  );
  const { data } = await res.json();
  console.log(data);
  ```
</CodeGroup>

## 3. Response

```json theme={null}
{
  "data": {
    "postcode": "EK-01-A03-FK-01",
    "valid": true,
    "administrative_address": {
      "state_name": "EKITI",
      "lga_name": "ADO EKITI",
      "locality_name": "ADO EKITI",
      "zone": "SOUTH WEST"
    },
    "recent_house_address": { "recent": "NTA ROAD, BACK OF FABIAN HOTEL, ADO EKITI" },
    "building_use_status": "residential"
  }
}
```

The attributes returned depend on the `level` you request and your granted access level —
see [Lookup levels](/concepts/lookup-levels).

## Try autocomplete

Type-ahead suggestions are public (no key):

```bash theme={null}
curl "https://api.postcode.gov.ng/v1/search/autocomplete?q=EK01"
```
