Nigeria Postcode API for Developers: Levels, Keys and the Widget
On this page
Short answer: NIPOST’s API is at api.postcode.gov.ng and documented at docs.postcode.gov.ng. Search, format tools and the basic L1 lookup (is this code valid?) are free and need no key. Richer lookups (the address and building details) need an API key, consume paid credits, and for live keys need your organisation to pass KYB. There’s also a drop-in widget for web and mobile apps.
This is our summary of the documentation as of 1 October 2026. The docs change, so always build against the current version.
What the API does
The docs group the endpoints into three families:
- Search: type-ahead autocomplete that understands the segments, plus a nearby-location search.
- Lookup: turn a full postcode into address and building details, graded by level.
- Assembly: build a code from its segments, split a code into segments, and validate its structure.
Lookup levels
Each level adds attributes on top of the one below it. The docs’ main table shows three levels:
| Attribute | L1 | L2 | L3 |
|---|---|---|---|
| Valid or not | ✓ | ✓ | ✓ |
| Administrative address (state, LGA, locality, zone) | ✓ | ✓ | |
| Recent house address | ✓ | ✓ | |
| Building use (e.g. residential) | ✓ |
L1 is free; L2 and L3 consume credits. The API reference itself is titled “levels 1–5”. It says L2–L4 are commercial and L5 is restricted, but the levels above L3 aren’t described anywhere yet. Treat L4 and L5 as not yet available unless NIPOST grants them to you.
Keys, KYB and limits
| Key prefix | Environment | Use |
|---|---|---|
nipost_test_… | Test | Secret, server-side only |
nipost_live_… | Live (needs verified KYB) | Secret, server-side only |
nipost_pk_test_… | Test | Publishable, can ship in client code |
nipost_pk_live_… | Live (needs verified KYB) | Publishable, can ship in client code |
- Header:
X-API-Key. - Scopes:
search,lookupand, for publishable keys,widget. Each key also has a maximum lookup level that can’t exceed what your organisation has been granted. - Publishable keys are capped at L3, locked to an origin allowlist in browsers, and can be revoked instantly.
- Rate limits are per key and are reported in
X-RateLimit-*headers. Going over returns429. Other errors:401(missing or invalid key),403(scope or level),402(out of credits). - Higher access is requested in the dashboard under Settings → KYB & Access.
The widget
The widget is a ready-made pop-up that lets your users choose their postcode from their saved places or from a map, then hands the result back to your app. It identifies the user by NIN or email, and runs on a publishable key.
| Platform | Package | Status in the docs |
|---|---|---|
| Web | @nipost/postcode-widget | Publication pending (not on npm yet) |
| Flutter | nipost_postcode_widget | Published |
| Android | ng.gov.postcode:postcode-widget | Published |
| iOS | NipostPostcodeWidget (Swift Package) | Published |
| React Native | @nipost/postcode-widget-react-native | Publication pending |
The docs list the web build at about 95 KB as an ES module (with the map library loaded separately) or about 850 KB as a single script tag. Plan for that on mobile-data-heavy audiences.
Format rules worth coding in
- Five segments: state (2 letters), LGA (2 digits), district (3 alphanumeric), area (2 letters), building (2 digits). See New postcode format decoded.
- The API accepts spaces, hyphens or no separators, in any case.
- A local format check doesn’t prove a code exists. Validate it against the API.
- The docs call the code “12 characters” but show an 11-character layout. Don’t hard-reject on length alone.
Rules on using the data
NIPOST’s terms and acceptable use policy forbid, without written authorisation:
- harvesting NDAPS data or making bulk requests beyond your limits with bots or scripts,
- reselling or redistributing API access or data, and
- building a competing or derivative postcode database from NDAPS data.
NIPOST’s integration guide also tells you to check the current terms before you cache any lookup results. Bulk and dataset access exist, but you apply for them through NIPOST’s integration team.
Getting started
- Create an organisation account on the Postcode dashboard.
- Make a test key, then try the free L1 lookup and autocomplete.
- Apply for KYB and a higher level when you need address details.
- Start with one user journey, such as checkout or onboarding, and measure it before rolling out further.
Nigeria Postcodes is independent and not affiliated with NIPOST. This summary is not NIPOST documentation. Always check docs.postcode.gov.ng.
Sources
- docs.postcode.gov.ng. Opened 1 Oct 2026.
- docs.postcode.gov.ng/quickstart. Opened 1 Oct 2026.
- docs.postcode.gov.ng/authentication. Opened 1 Oct 2026.
- docs.postcode.gov.ng/concepts/postcode-format. Opened 1 Oct 2026.
- docs.postcode.gov.ng/concepts/lookup-levels. Opened 1 Oct 2026.
- docs.postcode.gov.ng/api-reference/graded-postcode-lookup-levels-1%E2%80%935-cumulative. Opened 1 Oct 2026.
- docs.postcode.gov.ng/widget/overview. Opened 1 Oct 2026.
- docs.postcode.gov.ng/widget/web-embed. Opened 1 Oct 2026.
- docs.postcode.gov.ng/widget/publishable-keys. Opened 1 Oct 2026.
- postcode.gov.ng/blog/how-to-integrate-nigeria-digital-postcode-api. Opened 1 Oct 2026.
- postcode.gov.ng/integration. Opened 1 Oct 2026.
- postcode.gov.ng/acceptable-use. Opened 1 Oct 2026.
- postcode.gov.ng/terms. Opened 1 Oct 2026.