countries-states-cities-database

The cities.type field

Every city record carries an optional type field describing what kind of place it is. This page explains where the values come from, what each one means, and how to filter the dataset down to genuine settlements.

Why this exists: type is inherited from the upstream GeoNames feature classification. It mixes two different 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 depending on whether it is also the seat of an administrative division. 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. Cleanup of this inconsistency is tracked in #1303.

All values

There are 35 distinct values across 156,025 city rows. Counts are a snapshot (2026-05-24) and drift as the data evolves β€” treat them as approximate.

type Count Settlement? Meaning
city 96,098 βœ… Actual settlements
adm2 20,796 βœ… 2nd-order admin division β€” usually a real city that is also a county/district seat (e.g. Dallas)
adm3 15,774 βœ… Mostly real municipalities/communes (small towns) tagged with their admin role
section 5,346 βœ… Suburbs and districts of larger cities
county 4,409 ❌ County-level admin unit β€” not a settlement
adm4 3,909 βœ… Similar mix to adm3
adm1 3,505 βœ… 1st-order admin division β€” usually a state/region seat (e.g. major AU cities)
district 2,381 βœ… District-level populated place
(null) 1,900 ⚠️ No type assigned β€” see Records with no type
regency 390 ❌ Indonesian kabupaten β€” admin division
prefecture 369 ❌ Prefecture-level admin division
locality 319 βœ… Named populated place
capital 281 βœ… National/regional capital
municipality 209 βœ… Municipality
parish 80 ❌ Louisiana-style parish (= county)
banner 52 ❌ Inner Mongolia banner β€” admin division
town 48 βœ… Town
province 36 ❌ Province-level admin division
adm5 16 βœ… 5th-order admin division (populated)
abandoned 15 ❌ Abandoned place β€” not a live settlement
cities 13 βœ… Data artifact of city
area 12 ❌ Generic administrative area
village 10 βœ… Village
historical 9 ❌ Historical place β€” not a live settlement
settlement 9 βœ… Settlement
oblast 8 ❌ Oblast β€” admin division
gov_seat 6 βœ… Government seat (populated)
special municipality 6 βœ… Special municipality
administrative zone 5 ❌ Administrative zone
region 4 ❌ Region-level admin division
destroyed 3 ❌ Destroyed place β€” not a live settlement
township 3 βœ… Township
religious 2 ❌ Religious site β€” not a settlement
subdistrict 1 βœ… Subdistrict (populated)
historical_capital 1 ❌ Former capital β€” not a live settlement

Filtering to genuine settlements

For use cases like β€œfind the nearest city, town, or village to a location”, exclude the admin-only and non-place types. An exclusion list is more robust than an include list, because any new settlement-style value added in future is kept by default.

Exclude these types:

county, regency, prefecture, parish, banner, province, area, oblast,
administrative zone, region, abandoned, historical, destroyed, religious,
historical_capital

SQL

SELECT *
FROM cities
WHERE (
  type IS NULL          -- keep null-type rows (see "Records with no type")
  OR type NOT IN (
    'county', 'regency', 'prefecture', 'parish', 'banner', 'province',
    'area', 'oblast', 'administrative zone', 'region',
    'abandoned', 'historical', 'destroyed', 'religious', 'historical_capital'
  )
)
AND latitude IS NOT NULL
AND longitude IS NOT NULL;

Note on NULL: type NOT IN (...) evaluates to UNKNOWN (not TRUE) for rows where type is NULL, so it would silently drop them. The explicit type IS NULL OR ... keeps null-type rows, matching the JavaScript filter below. Drop the type IS NULL clause if you’d rather exclude them.

JavaScript

const EXCLUDED_TYPES = new Set([
  'county', 'regency', 'prefecture', 'parish', 'banner', 'province',
  'area', 'oblast', 'administrative zone', 'region',
  'abandoned', 'historical', 'destroyed', 'religious', 'historical_capital',
]);

const settlements = cities.filter(
  (c) => !EXCLUDED_TYPES.has(c.type) && c.latitude != null && c.longitude != null
);

This keeps all city/adm*/town/village/section/locality-style rows (including admin seats like Dallas and Sydney) while dropping pure administrative units and defunct places.

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.