administrative-divisons-db
Enter a two-letter country code and get the list of that country's first-level administrative divisions, such as counties, states or provinces. Useful for building dropdowns, validating form input or checking the names used for a region.
The pre-filled example uses KE and returns the names of Kenya's counties.
What it's useful for
- Fill a state or county dropdown in a form for a given country.
- Check how the data spells a region's name before matching it against your own records.
- Count how many top-level divisions a country has for a school project or report.
Frequently asked questions
What do I type in the country box?
A two-letter country code, such as KE for Kenya. The code goes into the address the lookup uses, so a code the dataset does not have will return an error rather than a list.
What level of division is returned?
The result is a plain list of names for the country's main administrative divisions. For Kenya, the example, it returns the 47 counties. Lower levels such as towns or wards are not included.
Where does the data come from?
From the open administrative-divisions-db project on GitHub, which builds its lists from GeoNames data. The project is released under the Unlicense.
Why do some names look oddly capitalised?
The lists come from GeoNames as written, so you may see forms like Murang'A or Tharaka - Nithi. Clean the names yourself if you need your own style.
About this data
- Data comes from a free third-party service (rawcdn.githack.com). We pass your request through our server so your browser never contacts it directly.
- Service limit: none stated. If it's reached, this page tells you how long to wait.
- Terms: Unlicense (public domain); data from GeoNames (attribution advisable). Served via githack CDN.
- The service can change or go offline without notice, and we can't vouch for the accuracy of what it returns.
- Official documentation