There was no freely available API for demographic units of Kenya when I needed one, so I took that personally😁 and made this: An API project for demographic units in Kenya
# Kenya Demographics API
Credits to njoguamos , this site and Wikipedia entries of Kenya's demographic units
## Important Note
The server hosting this project is not a highly efficient one, although I have cached some of the data try to cache it too.
## Getting Started
### Usage
The basic syntax of a URL request to the API is shown below:
api.elvisben.me.ke
api.elvisben.me.ke - *this is for more specific case
As an example to get all the counties present, the following url applies:
api.elvisben.me.ke and response will have the following structure
```json
{
"status_code": "200",
"status_message_short":"Success",
"status_message_description":"Success in fetching all counties",
"data":[{
**The county Data will be here **
}]
}
```
### Available Endpoints and their Respective Supported Methods
| Root path | `
api.elvisben.me.ke`|
### HTTP request and query methods
| Allowed Method | Endpoint | Description |
| :-- | :-- | :--
| `GET` | `/v1/constituencies` | Gets all constituencies present.|
| `GET` | `/v1/constituency/{id}` | Gets a specific constituency based on the id passed. |
| `GET` | `/v1/counties` | Gets all counties present. |
| `GET` | `/v1/county/{id}` | Gets a specific county based on id specified. |
| `GET` | `/v1/subcounties` | Gets all the subcounties present. |
| `GET` | `/v1/subcounty/{id}` | Gets a specific subcounty based on the id. |
| `GET` | `/v1/postalcodes` | Gets all the postalcodes present. |
| `GET` | `/v1/postalcode/{postalcode}` | Gets a specific postalcode based on the postalcode. |
| `GET` | `/v1/province/{id}` | Gets a specific province based on the id. |
| `GET` | `/v1/provinces` | Gets all the provinces present. |
| `GET` | `/v1/ward/{id}` | Gets a specific ward based on the id. |
| `GET` | `/v1/wards` | Gets all the wards present. |
## Future plans
I hav …