Kenya Area Data API
Structured access to Kenyas counties, constituencies, and wards. Developer-friendly, reliable, and free to use.
Explore the Data
API Documentation
Overview
Access Kenyas administrative areas with a simple REST API. Use the public key keyPub1569gsvndc123kg9sjhg
for all requests.
Base URL
https://kenyaareadata.vercel.app/api/areas
Authentication
Add ?apiKey=keyPub1569gsvndc123kg9sjhg
to your queries.
Endpoints
- All areas:
GET /api/areas?apiKey=keyPub1569gsvndc123kg9sjhg
Full dataset.
- By county:
GET /api/areas?apiKey=keyPub1569gsvndc123kg9sjhg&county=Mombasa
Constituencies and wards for a county.
- By constituency:
GET /api/areas?apiKey=keyPub1569gsvndc123kg9sjhg&county=Mombasa&constituency=Changamwe
Wards for a specific constituency.
Example Requests
fetch('https://kenyaareadata.vercel.app/api/areas?apiKey=keyPub1569gsvndc123kg9sjhg&county=Mombasa') .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
Response Format
{ "Mombasa": { "Changamwe": ["Port Reitz", "Kipevu", "Airport", "Changamwe", "Chaani"], "Jomvu": ["Jomvu Kuu", "Miritini", "Mikindani"], ... } }
Error Responses
- 401 Unauthorized: Invalid API key.
{"error": "Invalid API key"}
- 404 Not Found: County or constituency not found.
{"error": "County not found"}
- 400 Bad Request: Invalid query parameters.
{"error": "Invalid query parameters"}
Rate Limits
Free access with fair usage. Avoid excessive requests.
Interactive Demo
Use the explorer above to see live data from the API.