Database
World Cities Database
World Major Cities Database
- World Major Cities
Add-On
Web Service
World Major Cities Database
Drop Down List Source Codes Inclusive
Latest release: December, 2024
GeoDataSource™ World Major Cities is a database of worldwide major cities that suitable for any applications requiring a comprehensive list of country code and name, region/state/province name, city name, latitude, longitude and ZIP code. Most major cities in the world are included in this database in TSV (tab separated values) format, and can be easily access or load into a relational database for lookup.
This database enables a web developer to easily implement drop down lists, or any other solutions, that requires the list of countries, states and cities. Sample codes written in ASP, .NET and PHP are provided in the package to generate city names drop down list by countries and states. The sample codes enable a developer to rapidly deploy and utilize this package. Developer can apply this data for other purposes such as data validation, auto form filling and etcs.
- Updated Monthly
- Most Accurate and Up-to-Date Source of Data
- Sample Codes of Drop Down List in Several Programming Languages
- Covers Major Cities to Simplify Data Processing
- Instant Download Upon Subscription
- Free Customer Support
- Many Happy Customers
- Internet connection capable of downloading 954.21 kB compressed ZIP data file
- 954.21 kB free disk space for compressed file
- 3.73 MB free disk space for uncompressed data files
- WinZIP or other similar archive extraction utility
- SQL Server, Oracle, MySQL, PostgreSQL or other database software application capable of importing database records from a standard tab-delimited ASCII text file and sufficient disk space to import the database
Field Name | Description | Type | Length |
---|---|---|---|
country_code | ISO 3166 Primary Country Code. A two alphabetic character ISO 3166 Primary Country Code uniquely identifying a geopolitical entity (countries, dependencies, and areas of special sovereignty). | character | 2 |
country_name | ISO 3166 Primary Country Name. The full name of ISO 3166 Primary Country Name uniquely identifying a geopolitical entity (countries, dependencies, and areas of special sovereignty). | character | 200 |
region_name | Region/State Full Name. The full name is a complete region name which identifies the first-order administrative division. It is comprised of the specific name, generic name, and any articles or prepositions. | character | 200 |
city_name | City Full Name. The full name is a complete city name which identifies the named feature. It is comprised of the specific name, generic name, and any articles or prepositions. | character | 200 |
latitude | Latitude in Decimal Degree. Latitude of the city in ± decimal degrees (WGS84). no sign (+) = North; negative sign (-) = South. |
float | 10 |
longitude | Longitude in Decimal Degree. Longitude of the city in ± decimal degrees (WGS84). no sign (+) = East; negative sign (-) = West. |
float | 10 |
zip_code | City ZIP Code. ZIP/Postal code of the city. | character | 50 |
Country Name | Number of Cities |
---|---|
Afghanistan | 55 |
Aland Islands | 24 |
Albania | 20 |
Algeria | 249 |
American Samoa | 2 |
Show More » | |
Andorra | 7 |
Angola | 29 |
Anguilla | 3 |
Antarctica | 1 |
Antigua and Barbuda | 8 |
Argentina | 206 |
Armenia | 20 |
Aruba | 1 |
Australia | 201 |
Austria | 36 |
Azerbaijan | 81 |
Bahamas | 9 |
Bahrain | 8 |
Bangladesh | 103 |
Barbados | 11 |
Belarus | 52 |
Belgium | 42 |
Belize | 7 |
Benin | 29 |
Bermuda | 3 |
Bhutan | 19 |
Bolivia (Plurinational State of) | 27 |
Bonaire, Sint Eustatius and Saba | 12 |
Bosnia And Herzegovina | 21 |
Botswana | 21 |
Brazil | 1203 |
British Indian Ocean Territory | 5 |
Brunei Darussalam | 5 |
Bulgaria | 55 |
Burkina Faso | 47 |
Burundi | 16 |
Cabo Verde | 22 |
Cambodia | 30 |
Cameroon | 64 |
Canada | 223 |
Cayman Islands | 2 |
Central African Republic | 23 |
Chad | 30 |
Chile | 97 |
China | 800 |
Christmas Island | 1 |
Cocos (Keeling) Islands | 2 |
Colombia | 222 |
Comoros | 3 |
Congo | 14 |
Congo (the Democratic Republic of the) | 66 |
Cook Islands | 4 |
Costa Rica | 42 |
Cote d'Ivoire | 57 |
Croatia | 29 |
Cuba | 126 |
Curacao | 7 |
Cyprus | 7 |
Czechia | 98 |
Denmark | 50 |
Djibouti | 7 |
Dominica | 10 |
Dominican Republic | 52 |
Ecuador | 70 |
Egypt | 100 |
El Salvador | 35 |
Equatorial Guinea | 7 |
Eritrea | 6 |
Estonia | 18 |
Eswatini | 5 |
Ethiopia | 76 |
Falkland Islands [Malvinas] | 3 |
Faroe Islands | 6 |
Fiji | 6 |
Finland | 49 |
France | 627 |
French Guiana | 5 |
French Polynesia | 9 |
French Southern Territories | 2 |
Gabon | 10 |
Gambia | 9 |
Georgia | 24 |
Germany | 1059 |
Ghana | 58 |
Gibraltar | 1 |
Greece | 58 |
Greenland | 5 |
Grenada | 7 |
Guadeloupe | 11 |
Guam | 20 |
Guatemala | 81 |
Guernsey | 3 |
Guinea | 44 |
Guinea-Bissau | 9 |
Guyana | 10 |
Haiti | 28 |
Holy See | 2 |
Honduras | 29 |
Hong Kong | 9 |
Hungary | 111 |
Iceland | 11 |
India | 2432 |
Indonesia | 390 |
Iran (Islamic Republic of) | 180 |
Iraq | 68 |
Ireland | 31 |
Isle Of Man | 1 |
Israel | 81 |
Italy | 576 |
Jamaica | 18 |
Japan | 736 |
Jersey | 1 |
Jordan | 27 |
Kazakhstan | 75 |
Kenya | 60 |
Kiribati | 2 |
Korea (the Democratic People's Republic of) | 60 |
Korea (the Republic of) | 122 |
Kuwait | 18 |
Kyrgyzstan | 23 |
Lao People's Democratic Republic | 17 |
Latvia | 72 |
Lebanon | 13 |
Lesotho | 11 |
Liberia | 16 |
Libya | 42 |
Liechtenstein | 11 |
Lithuania | 35 |
Luxembourg | 8 |
Macao | 1 |
Madagascar | 55 |
Malawi | 28 |
Malaysia | 138 |
Maldives | 17 |
Mali | 21 |
Malta | 67 |
Marshall Islands | 25 |
Martinique | 20 |
Mauritania | 14 |
Mauritius | 16 |
Mayotte | 17 |
Mexico | 557 |
Micronesia (Federated States of) | 4 |
Moldova (the Republic of) | 41 |
Monaco | 7 |
Mongolia | 23 |
Montenegro | 21 |
Montserrat | 2 |
Morocco | 42 |
Mozambique | 23 |
Myanmar | 63 |
Namibia | 17 |
Nauru | 11 |
Nepal | 42 |
Netherlands (Kingdom of the) | 224 |
New Caledonia | 5 |
New Zealand | 38 |
Nicaragua | 37 |
Niger | 25 |
Nigeria | 235 |
Niue | 11 |
Norfolk Island | 1 |
North Macedonia | 78 |
Northern Mariana Islands | 3 |
Norway | 36 |
Oman | 26 |
Pakistan | 312 |
Palau | 17 |
Palestine, State of | 43 |
Panama | 33 |
Papua New Guinea | 21 |
Paraguay | 30 |
Peru | 107 |
Philippines | 299 |
Pitcairn | 1 |
Poland | 327 |
Portugal | 112 |
Puerto Rico | 78 |
Qatar | 7 |
Reunion | 14 |
Romania | 135 |
Russian Federation | 1083 |
Rwanda | 11 |
Saint Barthelemy | 1 |
Saint Helena, Ascension and Tristan da Cunha | 3 |
Saint Kitts and Nevis | 14 |
Saint Lucia | 9 |
Saint Martin (French part) | 2 |
Saint Pierre and Miquelon | 2 |
Saint Vincent and the Grenadines | 6 |
Samoa | 10 |
San Marino | 9 |
Sao Tome and Principe | 2 |
Saudi Arabia | 59 |
Senegal | 30 |
Serbia | 50 |
Seychelles | 13 |
Sierra Leone | 10 |
Singapore | 1 |
Sint Maarten (Dutch part) | 4 |
Slovakia | 52 |
Slovenia | 190 |
Solomon Islands | 9 |
Somalia | 28 |
South Africa | 164 |
South Georgia and the South Sandwich Islands | 1 |
South Sudan | 28 |
Spain | 619 |
Sri Lanka | 56 |
Sudan | 60 |
Suriname | 10 |
Svalbard and Jan Mayen | 2 |
Sweden | 104 |
Switzerland | 92 |
Syrian Arab Republic | 75 |
Taiwan (Province of China) | 22 |
Tajikistan | 20 |
Tanzania, the United Republic of | 186 |
Thailand | 220 |
Timor-Leste | 16 |
Togo | 17 |
Tokelau | 3 |
Tonga | 5 |
Trinidad and Tobago | 18 |
Tunisia | 72 |
Turkiye | 390 |
Turkmenistan | 23 |
Turks and Caicos Islands | 2 |
Tuvalu | 8 |
Uganda | 115 |
Ukraine | 257 |
United Arab Emirates | 14 |
United Kingdom of Great Britain and Northern Ireland | 757 |
United States Minor Outlying Islands | 4 |
United States of America | 32366 |
Uruguay | 30 |
Uzbekistan | 93 |
Vanuatu | 6 |
Venezuela (Bolivarian Republic of) | 106 |
Viet Nam | 83 |
Virgin Islands (British) | 1 |
Virgin Islands (U.S.) | 2 |
Wallis and Futuna | 22 |
Western Sahara | 3 |
Yemen | 31 |
Zambia | 29 |
Zimbabwe | 26 |
DROP DATABASE IF EXISTS `world_major_city_db`;
CREATE DATABASE `world_major_city_db`;
DROP TABLE IF EXISTS `world_major_city_db`.`countrystatecity`;
-- Create table "countrystatecity"
CREATE TABLE `countrystatecity` (
`country_code` varchar(2),
`country_name` varchar(64),
`region_name` varchar(128),
`city_name` varchar(128),
`latitude` float,
`longitude` float,
`zip_code` varchar(50),
PRIMARY KEY (`country_code`,`region_name`,`city_name`)
) CHARSET=utf8 COLLATE=utf8_bin;
-- Load data into table
LOAD DATA LOCAL INFILE 'C:\\[your folder path to the data file]\\GEODATASOURCE-WORLD-MAJOR-CITIES.TXT'
INTO TABLE `world_major_city_db`.`countrystatecity`
CHARACTER SET utf8
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\r\n';
CREATE DATABASE [world_major_city_db]
GO
USE [world_major_city_db]
GO
-- Create table "countrystatecity"
CREATE TABLE [world_major_city_db].[dbo].[countrystatecity](
[country_code] nvarchar(2) NOT NULL,
[country_name] nvarchar(200) NOT NULL,
[region_name] nvarchar(200) NOT NULL,
[city_name] nvarchar(200) NOT NULL,
[latitude] float NOT NULL,
[longitude] float NOT NULL,
[zip_code] nvarchar(200) NOT NULL
) ON [PRIMARY]
GO
-- Load data into table
BULK INSERT [world_major_city_db].[dbo].[countrystatecity]
FROM 'C:\[your folder path to the data file]\GEODATASOURCE-WORLD-MAJOR-CITIES.TXT'
WITH
(
CODEPAGE = '65001',
FIELDTERMINATOR = '\t',
ROWTERMINATOR = '\n'
)
GO
Free dropdown menu javascript allowing you to implement the country and region dropdown selection with ease. Learn more at Country-Region Dropdown Menu (Free)