NEW Geloky now works inside Claude, ChatGPT and Cursor. See how Geloky inside Claude & ChatGPT →
  1. Help
  2. US city database

How to use the US city database

Pick a version, download it, and open it in Excel or load it into your database, with the commands to copy. Then get every release for 12 months at the same link.

Updated

1

Pick a version

Free holds the 32,054 places the Census Bureau counts in the 50 states and DC: every city, town, village and borough, and every CDP, each with its centre point, county, population, time zone and ZIP codes. Pro adds Puerto Rico’s and the Island Areas’ places and 72,492 smaller communities USGS names, 105,117 in all, and more columns: every county, land area, metro area. Complete adds who lives there and the outline of every Census place.

  • Free is for any project, commercial ones too, with a link to the database’s page where people can see it.
  • Pro and Complete need no link: use them across your organisation, in your websites and apps too.
  • Free’s columns come first in Pro and Complete, in the same order, so a formula or a query keeps working when you move up.
  • Need ZIP codes and counties too? All three US databases, each in its Complete version, cost $199 together instead of $297.
Free · $032,054 places
Pro · $49105,117 places
Complete · $99Pro + demographics and outlines
2

Download your files

The free version downloads at once: a zip with the CSV, the Excel file and a README. For Pro or Complete, FastSpring’s checkout opens on the page. Once you have paid, the page turns into your download page, and a private link to it comes by email.

  • No Geloky account needed. Keep the email: its link is your download page for 12 months.
  • Each format downloads on its own, or take them all in one zip.
  • Lost the link? Find my downloads sends it again to the email you paid with.
CSVus-cities-pro.csv · 18.3 MB
Download
Excelus-cities-pro.xlsx · 11.7 MB
Download
SQLMySQL and PostgreSQL · 7.9 MB zip
Download
JSONus-cities-pro.json · 53.5 MB
Download
Download all formats (.zip)
3

Open it in Excel or Google Sheets

Open the Excel file as it is: its codes and ZIP codes are stored as text. To add each city’s county to your own list, put the database on a sheet named Cities and look each city up by its name and state (Excel 365):

=XLOOKUP(A2&B2, Cities!A:A&Cities!D:D, Cities!G:G, "not found")
  • Column G is county_name. Use K for the time zone, J for the population, or M for the ZIP codes.
  • In Google Sheets, upload the Excel file and wrap the same formula in ARRAYFORMULA( ).
  • Names typed without accents? Look them up in column B, city_ascii: Canon City finds Cañon City.
  • A few names repeat within a state: Chevy Chase, Maryland is both a town and a CDP. XLOOKUP returns the first, so check type when it matters.
fx=XLOOKUP(A2&B2, Cities!A:A&Cities!D:D, Cities!G:G, "not found")
CityStateCounty
SpringfieldILSangamon
PortlandORMultnomah
ColumbusOHFranklin
4

Load it into a database

The SQL zip holds one file for MySQL and MariaDB, and one for PostgreSQL. Each creates a table named us_cities, with USGS’s id as its key, and fills it:

mysql -u you -p yourdb < us-cities-pro-mysql.sql
psql -d yourdb -f us-cities-pro-postgresql.sql

Then ask it what you need, such as the places of 50,000 people or more within 50 miles of Denver, the biggest first (MySQL 8):

SELECT city, population, ROUND(ST_Distance_Sphere(
  POINT(lng, lat), POINT(-104.9903, 39.7392)) / 1609.344) AS miles
FROM us_cities WHERE population > 50000
HAVING miles <= 50 ORDER BY population DESC;
  • A column with several values separates them with |: a place’s ZIP codes in zip_codes, its counties in county_fips_all.
  • TRUE and FALSE load as booleans. A value the sources don’t have is NULL: a community has no population.
  • Loading a new release? Drop the old table first: DROP TABLE us_cities;
citypopulationmiles
Denver718,8776
Aurora394,43214
Lakewood156,5837
Thornton144,18713
Arvada122,63411
16 rows: the places of 50,000 people or more within 50 miles
5

Use the JSON or the place outlines

The JSON file is one array with an object for each place, under the same names as the CSV columns. Complete adds the outline of every Census place, as GeoJSON and KML, for maps in QGIS, Google Earth, Leaflet or MapLibre. The smaller communities have a point, not an outline.

  • In the JSON, numbers are numbers, codes and ZIP codes are strings, and a missing value is null.
  • Each outline carries gnis_id, place_fips, city and state_id, to join it to the table.
  • The outlines are detailed: about 47 MB as GeoJSON. For a web map, simplify them first, with mapshaper for example.
us-city-outlines.geojson · every Census place, with its gnis_id and place_fips
6

Get each update

For 12 months, every new release comes to the same link, and we email you when one is out. We aim to publish a release every quarter, with the ZIP codes of each place. The Census figures change once a year.

  • Your download page lists every release you can get, newest first.
  • Bought Pro? Upgrade to Complete on that page for the $50 difference. Your updates keep their end date.
  • After the 12 months, everything you downloaded stays yours; only new releases stop.
VersionPro
Newest release4 Dec 2026
Updates until4 Dec 2027
Upgrade to Complete · $50

FAQ

Common questions

Still stuck? Write to hello@geloky.com — a person answers within a day.

Free holds the places the Census Bureau counts in the 50 states and DC. Pro and Complete add Puerto Rico’s and the Island Areas’ places and the 72,492 smaller communities USGS names: towns too small for the Census Bureau to count, with their point, county, ZIP code and time zone, but no population.

Your first 100 rows are free. Every day.

Free plan, no credit card · See your results on a map before you pay