IP to Geolocation Database Developer Resource

IP to Geolocation database provides geolocation information such as city, region/state, country, postal code, timezone, geographic coordinates (latitude & longitude) etc. identified from IP addresses.

Database Schema

IP Location database contains the following fields:

Field NameExampleData TypeDescription
network71.50.174.48/28TEXTCIDR or single Address of the IP address block
citySpring LakeTEXTCity of the IP address
regionNorth CarolinaTEXTRegion/State of the IP address
region_codeNCTEXTRegion code in two-letter format in ISO 3166
countryUnited StatesTEXTName of the country of the IP address
country_codeUSTEXTISO 3166 country code of the IP address
continentNorth AmericaTEXTName of the continent
continent_codeNATEXTContinent name code in two-letter format
latitude35.16794FLOATLatitude value of the IP address
longitude-78.97281FLOATLongitude value of the IP address
timezoneAmerica/New_YorkTEXTLocal timezone of the IP address location
postal_code28390TEXTPostal code or zip code of the IP address

A screen image showing the table provided by our IP Geolocation Database Download

Sample Database

Filename references:

File FormatFilename / SlugTerminal Command
CSVipinfo_location.csv.gzcurl -L https://ipinfo.io/data/ipinfo_location.csv.gz?token=$YOUR_TOKEN -o ipinfo_location.csv.gz
MMDBipinfo_location.mmdbcurl -L https://ipinfo.io/data/ipinfo_location.mmdb?token=$YOUR_TOKEN -o ipinfo_location.mmdb
JSONipinfo_location.json.gzcurl -L https://ipinfo.io/data/ipinfo_location.json.gz?token=$YOUR_TOKEN -o ipinfo_location.json.gz
Parquetipinfo_location.parquetcurl -L https://ipinfo.io/data/ipinfo_location.parquet?token=$YOUR_TOKEN -o ipinfo_location.parquet

Alternative Database Schema

standard_location

The standard_location data download is structured based on IP ranges (start_ip and end_ip). It includes the join_key column but does not include the columns region_code and country_code (as the country code is contained in the country column and it does not provide the name of the country). Additionally, it does not include the columns continent and continent_name.

Field NameExampleData TypeDescription
start_ip1.253.242.0TEXTStarting IP address of an IP address range
end_ip1.253.242.255TEXTEnding IP address of an IP address range
join_key1.253.0.0TEXTSpecial variable to facilitate database join operation
cityYangsanTEXTCity of the IP address
regionGyeongsangnam-doTEXTRegion of the IP address
countryKRTEXTISO 3166 country code of the IP address
latitude35.34199FLOATLatitude value of the IP address
longitude129.03358FLOATLongitude value of the IP address
postal_code50593TEXTPostal code or zip code of the IP address
timezoneAsia/SeoulTEXTLocal timezone of the IP address

Samples


standard_location_mmcompat

The standard_location_mmcompat database schema is a custom database that provides easier migration from alternative providers by offering the geonames_id field and other location data. Even though the migration process will not be plug and play from an alternative provider, we provide all the necessary information for users to account for only the schema.

Field NameExampleData TypeDescrption
Network50.62.0.0/15TEXTCIDR or IP network of the IP address block
CityTempeTEXTCity of the IP address
ContinentNATEXTContinent name code in two-letter format
CountryUSTEXTISO 3166 country code of the IP address
Country_nameUnited StatesTEXTName of the country of the IP address
Geoname_id5317058TEXTGeoname_id that corresponds to geonames.org database
Lat33.41477FLOATLatitude value of the location
Lng-111.90931FLOATLongitude value of the location
Postal85285TEXTPostal code or zip code of the IP address
RegionAZTEXTRegion code in two-letter format in ISO 3166
Region_nameArizonaTEXTRegion of the IP address
Subregion013INTEGERSubregion code
Subregion_nameMaricopa CountyTEXTSubregion name
TimezoneAmerica/PhoenixTEXTLocal timezone of the IP address location

Samples