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

# Postcode API

> Integrate Nigeria's national postcode system — search, lookup and assembly.

The **Postcode API** exposes Nigeria's national postcode system as simple HTTP endpoints:

* **Search** — segment-aware autocomplete and location (nearby) search.
* **Lookup** — resolve a full postcode to graded address & building details.
* **Assembly** — assemble/disassemble and validate postcode structure.

A Nigerian postcode is a 12-character, 5-segment code:

```
AA 99 H77 BB 55      e.g.  EK 01 A03 FK 01
│  │  │   │  └─ Building unit within the area   (2 numeric)
│  │  │   └──── Area within the district        (2 alpha)
│  │  └──────── District within the LGA         (3 alphanumeric)
│  └─────────── LGA within the state            (2 numeric)
└────────────── State                           (2 alpha)
```

<CardGroup cols={2}>
  <Card title="Quickstart" icon="bolt" href="/quickstart">
    Make your first request in under a minute.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    API keys, scopes and access levels.
  </Card>

  <Card title="Postcode format" icon="hashtag" href="/concepts/postcode-format">
    How the 5 segments map to administrative areas.
  </Card>

  <Card title="Lookup levels" icon="layer-group" href="/concepts/lookup-levels">
    What data each access level returns (L1–L5).
  </Card>
</CardGroup>

## Base URL

All requests go through the public API gateway:

```
https://api.postcode.gov.ng
```

<Note>For local development against the stack, use `http://localhost:8081`.</Note>

<Note>
  Search and Lookup **L1** are free. Lookup **L2–L5** require an API key with the `lookup`
  scope and a sufficient access level, and consume credits.
</Note>
