The Kenya Geographic Mapping API (KenyaGeoMapAPI) provides detailed information about Kenya's counties, constituencies, and wards, enabling developers to integrate precise location-based data into their applications for various use cases such as geographical analysis, service delivery, and resource allocation.
Note: These are Resources for Developers and/or anyone who needs all the Counties, Constituencies, and Wards in Kenya
- Retrieve detailed information about all Counties, Constituencies, and Wards in Kenya
- Search for administrative divisions by name or code
- Get hierarchical relationships between Counties, Constituencies, and Wards
- Support for pagination and filtering of results
- Easy integration with various frontend and backend technologies
- PHP 7.3 or higher
- Composer
- MySQL or any other supported database
-
Clone the repository:
git clone https://github.com/sosmongare/Kenya-Administrative-Boundaries-API-KenAdminAPI.git cd Kenya-Administrative-Boundaries-API-KenAdminAPI
-
Install the dependencies:
composer install
-
Copy the
.env.example
file to.env
and configure your environment variables:cp .env.example .env nano .env
Set your database connection details and other environment variables.
-
Generate the application key:
php artisan key:generate
-
Run the database migrations:
php artisan migrate
-
Seed the database with initial data (if available):
php artisan db:seed
-
Start the development server:
php artisan serve
The application will be available at
http://127.0.0.1:8000
.
The API documentation is generated using Swagger and can be accessed at http://127.0.0.1:8000/api/documentation
.
-
Get all counties
GET /api/counties
-
Get a county by ID
GET /api/counties/{id}
-
Create a new county
POST /api/counties
-
Update a county
PUT /api/counties/{id}
-
Delete a county
DELETE /api/counties/{id}
-
Search counties
GET /api/counties/search/{query}
-
Get all constituencies
GET /api/constituencies
-
Get a constituency by ID
GET /api/constituencies/{id}
-
Create a new constituency
POST /api/constituencies
-
Update a constituency
PUT /api/constituencies/{id}
-
Delete a constituency
DELETE /api/constituencies/{id}
-
Search constituencies
GET /api/constituencies/search/{query}
-
Get all wards
GET /api/wards
-
Get a ward by ID
GET /api/wards/{id}
-
Create a new ward
POST /api/wards
-
Update a ward
PUT /api/wards/{id}
-
Delete a ward
DELETE /api/wards/{id}
-
Search wards
GET /api/wards/search/{query}
Contributions are welcome! Please open an issue or submit a pull request.
For any questions or suggestions, please contact the developer: _ **
- Email: [email protected]
- Twitter: [email protected]
- Name: Sospeter Mongare