ip2location facebbook  ip2location twitter  ip2location google+ ip2location github

IP2Location™ GeoNameID

IP2Location™ GeoNameID is a free data offered for your download. This data enables you to retrieve the ID of record in GeoNames database of a given city name, region name and country code.

The basic information download contains the data of country code, region name, city name and GeoNames ID. This information is available for download in CSV text file (comma delimited).

 

Product Features
Last Update 12/01/2018
Database Format CSV Text File (Comma Delimited)

 

Database Fields
Name Type Description
country_code CHAR(2) Two-character country code based on ISO 3166.
region_name VARCHAR(128) Region or state name.
city_name VARCHAR(128) City name.
geonameid INT(10) Integer ID of record in GeoNames database.

 

MySQL Statement

CREATE TABLE `ip2location_geonameid`(
	`country_code` CHAR(2),
	`region_name` VARCHAR(128),
	`city_name` VARCHAR(128),
	`geonameid` INT(10),
	INDEX `idx_country_code` (`country_code`),
	INDEX `idx_region_name` (`region_name`),
	INDEX `idx_city_name` (`city_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

LOAD DATA LOCAL
INFILE 'IP2LOCATION-GEONAMEID.CSV' INTO TABLE `ip2location_geonameid`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n' IGNORE 1 LINES;

 

License Information

IP2Location™ is a registered trademark of HEXASOFT. GeoNames is registered trademark of GeoNames. All other trademarks are the property of their respective owners.

 

Thank you for downloading

Sharing this great stuff to your friends!

Or share it on your blog or web page:

Free IP2Location geolocation resources available at <a href="https://www.ip2location.com">https://www.ip2location.com</a>
Copy & paste this text as HTML.