# Nigeria Locations API
A free, open Laravel API providing structured Nigerian geo-data for developers —
states, LGAs, coordinates, postal codes, geopolitical zones, geocoding, routing,
and proximity search. No API key. No cost. No nonsense.
**Live:**
nigeria.jamiuadewaleyusuf.c…
**Base URL:** `
nigeria.jamiuadewaleyusuf.c…`
---
## What this solves
Every Nigerian developer building a product eventually hits the same set of problems:
- Hardcoded state/LGA arrays copied between projects with inconsistent spelling
- No coordinates when map features land on the roadmap
- No NIPOST postal codes for KYC and courier integrations
- Google Maps bills draining the budget before the product reaches scale
- No structured geopolitical zone grouping for analytics and reporting
This API solves all of them once, correctly, and shares the solution.
---
## Stack
- **Laravel 12**
- **MySQL** (or SQLite for local dev)
- **Nominatim** (OpenStreetMap) — geocoding and address search, cached 24h
- **OSRM** (Open Source Routing Machine) — road routing and polylines, cached 30min
- All external calls have local DB fallbacks — the API never returns a 500 if they go down
---
## Data Coverage
| Data | Coverage |
|------|----------|
| States | All 36 + FCT (37 total) |
| LGAs | ~774 across all states |
| Coordinates (States) | ✅ All — centroid lat/lng |
| Coordinates (LGAs) | ✅ All — centroid of headquarters town |
| Postal Codes | ✅ All LGAs — NIPOST 6-digit format |
| Geopolitical Zones | ✅ All 6 — NC, NE, NW, SE, SS, SW |
| ISO Codes | ✅ ISO 3166-2:NG for all states |
| State Capitals | ✅ All |
**Data sources:**
- State/LGA names: Nigerian Federal Government official classification
- Coordinates: GeoNames + OpenStreetMap centroids
- Postal codes: NIPOST official 6-digit format
- ISO codes: ISO 3166-2:NG
- Geopolitical zones: Federal Government standard classification
---
## Setup
```bash
# 1. Clone
git clone
github.com …