Written and maintained by CASRAI Editorial Board
Published · Last updated
On this page
GeoNames is a free geographical database and gazetteer: a lookup table that links place names to coordinates, country and administrative codes, feature types, population, elevation and time zone. Researchers use it to geocode place names in survey, archival or text data, to attach a country or region to records, and to link datasets by a stable place identifier (the geonameid). This page covers what the database holds, its table fields, feature classes, download files, web services, licence and how to cite it reproducibly. Facts below were read from the GeoNames site and export readme on 2026-11-12.
What is GeoNames?
GeoNames describes itself as a geographical database that is available for download free of charge under a Creative Commons Attribution licence. Its about page (read 2026-11-12) reports over 32 million geographical names, over 13 million unique features (including about 5.2 million populated places) and about 19 million alternate names. Every feature is classified into one of nine feature classes and one of 684 feature codes. Coordinates are in WGS84. Data is compiled from official and community sources, including the US National Geospatial-Intelligence Agency, the US Geological Survey GNIS, Ordnance Survey OpenData (UK) and GeoBase (Canada), and elevation is derived from gtopo30. The database is edited wiki-style, with anonymous editing restricted.
Because counts change as the database is edited, treat these figures as a snapshot dated 2026-11-12 rather than fixed values.
What does the GeoNames data contain?
The main geoname table is a tab-delimited UTF-8 text file with 19 columns, with coordinates in WGS84 decimal degrees (GeoNames export readme, read 2026-11-12).
| # | Column | Content |
|---|---|---|
| 1 | geonameid | Integer identifier of the record |
| 2 | name | Name of the place (UTF-8) |
| 3 | asciiname | Name in plain ASCII characters |
| 4 | alternatenames | Alternate names |
| 5-6 | latitude, longitude | Decimal degrees, WGS84 |
| 7 | feature class | One character (see table below) |
| 8 | feature code | Up to 10 characters |
| 9 | country code | ISO-3166 two-letter code |
| 10 | cc2 | Alternate country codes |
| 11-14 | admin1 to admin4 | Administrative division codes |
| 15 | population | Integer (bigint) |
| 16 | elevation | Metres |
| 17 | dem | Digital elevation model value, metres |
| 18 | timezone | IANA time zone identifier |
| 19 | modification date | yyyy-MM-dd |
Feature classes
| Class | Meaning |
|---|---|
| A | Country, state, region |
| H | Stream, lake |
| L | Parks, areas |
| P | City, village |
| R | Road, railroad |
| S | Spot, building, farm |
| T | Mountain, hill, rock |
| U | Undersea |
| V | Forest, heath |
Which GeoNames download files are available?
The export directory (download.geonames.org/export/dump, readme read 2026-11-12) offers these files:
allCountries.zip: all countries in one file; per-country files named by country code (XX.zip).cities500.zip,cities1000.zip,cities5000.zip,cities15000.zip: places above a population threshold.alternateNamesV2.zip: alternate names, withadmin1CodesASCII.txt,admin2Codes.txt,featureCodes.txt,countryInfo.txt,timeZones.txtandhierarchy.zipas lookup files.- Daily
modifications-<date>.txtanddeletes-<date>.txtchange files.
How do the GeoNames web services work?
GeoNames provides free web services (page read 2026-11-12), including postal code search, find nearby, time zone and country info. Every request needs a username parameter, and the shared “demo” account should not be used in your own applications. Output is XML by default, with JSON available through a separate endpoint and some services offering TXT or CSV. The free service has lower limits than the premium service: for example, nearby postal codes are limited to 30 km and 500 rows on the free service versus 160 km and 2,500 rows on premium, and elevation lists are limited to 20 points versus 2,000.
What licence does GeoNames use, and how do I cite it?
The data is released under a Creative Commons Attribution licence, so reuse requires attribution to GeoNames (www.geonames.org). Check the licence statement on the GeoNames site for the exact terms before redistributing a derived dataset.
Editorial guidance for reproducibility (this is our recommendation, not a GeoNames requirement): because the database is edited continuously and publishes daily change files, record in your methods and data documentation (a) which file or web service you used, (b) the date you downloaded or queried it, and (c) the geonameid of every place you matched. Storing the geonameid alongside your own place labels gives later users a stable key. See FAIR data principles and metadata for the documentation context, and data management plans for where to record third-party datasets.
Example reference pattern (adapt to your journal’s style): GeoNames. (2026). GeoNames geographical database [Data set]. https://www.geonames.org/ (accessed 2026-11-12).
How do I load the GeoNames data in Python?
The main file has no header row, so supply the 19 column names from the table above.
import pandas as pd
cols = ["geonameid","name","asciiname","alternatenames","latitude","longitude",
"feature_class","feature_code","country_code","cc2","admin1","admin2",
"admin3","admin4","population","elevation","dem","timezone","modification_date"]
df = pd.read_csv("cities15000.txt", sep="\t", quoting=3, header=None, names=cols,
dtype={"admin1": str, "admin2": str}, keep_default_na=False)
print(df[df["name"] == "Paris"][["geonameid","country_code","population"]])
Reading keep_default_na=False stops codes such as “NA” (Namibia) being parsed as missing values. In R, read.delim("cities15000.txt", header = FALSE, quote = "", col.names = cols) does the same job with the same column vector.
Limitations to consider in research use
- Crowd-edited content. The database is edited wiki-style and merges several national sources, so coverage and positional quality can vary by country and feature type. Spot-check a sample of your matches.
- Ambiguous names. Many places share a name. Match on name plus country code and feature class (for example class P for populated places), not name alone.
- Elevation. The
elevationfield and thedemfield are separate columns; document which you used. - Change over time. Daily modifications and deletes mean a lookup repeated later may return different records.
FAQ
Is GeoNames free?
Yes. The data is available for download free of charge under a Creative Commons Attribution licence, and the web services have a free tier with lower caps than the premium service.
What is a geonameid?
It is the integer identifier in the first column of the geoname table that identifies a single place record.
What coordinate system does GeoNames use?
WGS84 decimal degrees.
What is the difference between GeoNames and a geospatial standards body?
GeoNames is a dataset and gazetteer. Standards for geospatial data exchange are set by bodies such as the Open Geospatial Consortium.
Sources
- GeoNames. About GeoNames. https://www.geonames.org/about.html (read 2026-11-12).
- GeoNames. Export dump readme. https://download.geonames.org/export/dump/readme.txt (read 2026-11-12).
- GeoNames. Web services overview. https://www.geonames.org/export/web-services.html (read 2026-11-12).







