Skip to main content

Districts

This endpoint allows you to retrieve a list of all districts in Uganda.

Get All Districts

Fetches a list of all districts in Uganda.

Endpoint


### Headers

| Header | Required | Description |
|--------|----------|-------------|
| x-api-key | Yes | Your API key for authentication |

### Example Request

```bash
curl -X GET \
'https://api.opendataug.org/v1/districts' \
-H 'x-api-key: your_api_key_here'

Response

{
"status": "success",
"data": [
{
"id": "1",
"name": "Kampala",
"region": "Central"
},
{
"id": "2",
"name": "Wakiso",
"region": "Central"
}
]
}

Response Fields

FieldTypeDescription
statusstringThe status of the request ("success" or "error")
dataarrayArray of district objects
data[].idstringUnique identifier for the district
data[].namestringName of the district
data[].regionstringRegion where the district is located

Error Responses

Status CodeDescription
401Invalid or missing API key
429Too many requests - Rate limit exceeded
500Internal server error

Rate Limiting

This endpoint is subject to rate limiting. Please refer to our rate limiting documentation for more details.

Notes

  • The list of districts is regularly updated to reflect administrative changes
  • Districts are sorted alphabetically by name
  • The API response is paginated with 100 districts per page