Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

ยฉ 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

Tomilola-ng/nigeria-locations-api

Domain:

geospatial

Record type:

dataset
Creator:
Tom
Host:
A comprehensive JSON dataset of all Nigerian states, capital, and their corresponding local government areas (LGAs). # Nigeria Locations A comprehensive JSON dataset of all Nigerian states and their corresponding local government areas (LGAs). This repository aims to simplify the work of developers by providing accurate and structured location data for Nigeria. ## ๐Ÿš€ Features - **Easy-to-Use JSON Format:** Ready-to-use for web and mobile applications. - **Complete Data:** Includes all 36 states and the Federal Capital Territory (FCT), along with their LGAs. - **Extensible:** Can be expanded to include additional metadata such as state capitals, coordinates, or population data. ## ๐Ÿš€ New API Features ### REST API Endpoints The project now includes a RESTful API for accessing Nigerian location data: #### Get All States ```bash GET /api/states ``` Returns a list of all Nigerian states. #### Get LGAs by State ```bash GET /api/states/:state/lgas ``` Returns all Local Government Areas in a specific state. Example: `/api/states/lagos/lgas` #### Search LGAs ```bash GET /api/search?q=:searchterm ``` Search for LGAs across all states. Example: `/api/search?q=north` #### Validate Location ```bash GET /api/validate?state=:state&lga=:lga ``` Validate state and LGA combinations. Examples: - Validate state: `/api/validate?state=lagos` - Validate LGA: `/api/validate?state=lagos&lga=ikeja` ### ๐Ÿ› ๏ธ API Setup 1. Install dependencies: ```bash npm install ``` 2. Start the development server: ```bash npm start ``` 3. Access the API at `localhost` ### ๐Ÿ”’ CORS Support The API includes CORS support, allowing it to be accessed from different domains. ### ๐Ÿงช Error Handling - Invalid state names return 404 error - Missing search queries return 400 error - Server errors return 500 error with appropriate messages ## ๐Ÿงฑ Structure The JSON data is organized in the following format: ```json [ { "state": "lagos", "localGovt": ["Alimosho", "Agege", ...] }, ... ] ``` ## ๐Ÿงฐ Usage 1. Give this Repository a Star: 2. Download and Import the : - LATEST JSON - LATEST YA โ€ฆ

Visit

github.com

Licenses

GPL-3.0

Similar

HackEAC/locations-APIemekaokoye/NG-States-APIemekaokoye/NG-LGA-APIthisudoriguy/ng-healthcare-apiapi-evangelist/okra-ngTomilola-Joy/Maternal-Mortality-Data-Analysis

HackEAC/locations-API

Live Tanzania ๐Ÿ‡น๐Ÿ‡ฟ locations API ๐Ÿ”ฅ # Location Data API Compatibility-first REST API for Tanzania loc

emekaokoye/NG-States-API

API for listing all the States in Nigeria from the web of data using Linked Data and PHP NG-States-

emekaokoye/NG-LGA-API

API for listing all Local Government Areas in Nigeria from the web of data using Linked Data and PHP

thisudoriguy/ng-healthcare-api

healthcare api: delivers the locations of all hospitals in Nigeria and contact details # ng-healthc

api-evangelist/okra-ng

Okra was an African open-finance / open-banking infrastructure company based in Lagos, Nigeria. Its

Tomilola-Joy/Maternal-Mortality-Data-Analysis

The goal of this analysis is to: Understand maternal mortality trends across regions in Africa Inve