Skip to main content
Every city record carries an optional type field describing what kind of place it is. The value is inherited from the upstream GeoNames feature classification.
Building against the API? Filter server-side with ?kind= on Get Cities by Country or Get Cities by State instead of applying a type exclusion list yourself. It is not a drop-in swap: ?kind=settlement is stricter than the exclusion list further down this page, and ?kind=settlement,section,unknown is the closest match. That manual filtering is for teams running their own copy of the raw database outside the API.
The type field mixes two ideas — what a place is (city, town, village) and what administrative role it fills (adm2, county, parish). The same place can be tagged either way. For example, Dallas is adm2 because it is the seat of Dallas County, and major Australian cities are adm1 because they are seats of state-level governments.

The kind Field

Get Cities by Country and Get Cities by State also return a derived kind field — a simplified classification computed server-side from type, so you don’t have to memorize which of the 35 raw values count as real places. Other endpoints that return city records do not include it. kind is one of four values:
The administrative vs. unknown split is this project’s own interpretation layered on top of the source data — the upstream countries-states-cities-database project (and the GeoNames classification it inherits from) does not define a 4-way split like this itself. We separate genuine administrative divisions (county, province, regency, and similar) from defunct or non-place entries (abandoned, historical, religious, and similar) so that administrative only contains types you’d reasonably call a governed area — not a ghost town or a place of worship.
null types and any type value not yet in our mapping default to kind: unknown. Read unknown as not classified, not as not a place — the bucket holds both defunct entries (abandoned, historical, destroyed, religious, historical_capital) and the 1,900 rows that carry no type at all.
Use ?kind=settlement (or any comma-separated combination, e.g. ?kind=settlement,section) on Get Cities by Country or Get Cities by State to filter server-side. kind is available on every plan, including Community and Starter — no tier upgrade required. Raw type filtering (?type=) is also available but requires a Supporter+ plan, matching the existing type field’s tier gate — on a lower plan the request is rejected with a 400 error rather than being ignored.

All Type Values

There are 35 distinct values. The counts below come from the upstream TYPE_FIELD.md reference, snapshotted on 2026-05-24, and add up to 156,025 rows. Treat them as approximate: they drift as the data changes, so they do not match the 153,765+ city total quoted elsewhere in these docs, which is the upstream project’s README figure counted at a different time. The Kind column shows the kind value derived from each type — see above for what each value means.

Filtering via Raw SQL/JS/Python (Self-Hosted Data)

Calling the API instead? Use ?kind= — see The kind Field above. It is not a drop-in swap for the exclusion list below. ?kind=settlement is stricter, because the list also keeps the 5,346 section rows and the 1,900 null-type rows. ?kind=settlement,section,unknown is the closest match; it differs only by also returning the ~30 defunct rows the list drops (abandoned, historical, destroyed, religious, historical_capital), which map to unknown too. This section is for teams running their own copy of the raw database outside the API, where no kind field exists.
For use cases like “find the nearest city to a location” or “populate a dropdown” against a self-hosted copy of the data, exclude admin-only and non-place types directly. Use an exclusion list rather than an inclusion list — any new settlement-style value added in the future is kept by default. Exclude these types:

SQL

type NOT IN (...) evaluates to UNKNOWN for rows where type is NULL, silently dropping them. The explicit type IS NULL OR ... keeps null-type rows. Remove the type IS NULL clause only if you want to exclude them.

JavaScript

Python

Records with No Type

About 1,900 rows have a null type. They are a mix of legitimate places and unclassified entries. For strict settlement queries, the safest signal is the presence of valid coordinates (latitude/longitude not null), and — where available — a non-null population. Via the API, these rows surface with kind: unknown, same as other unclassified entries.

Database Schema

Full cities table definition including the type field.

Multi-Level Territories

How overseas territories and dual-modeled entities affect city queries.

Get Cities by Country

Filter cities by kind or type directly via the API.