IP Country Database
Overview
Ever wonder what country a specific IP address comes from? Our IP to Country Database which is a part of our standard tier, helps you figure that out for any IPv4 or IPv6 address. We've packed it with all the details you'd want, not just the country name, but ISO codes, the continent, capital, dialing codes, currencies, languages, and TLDs. It even supports multiple languages, so you can get localized results right away, no extra steps needed.
We're pretty committed to having the most up-to-date information, which is why our databases are updated daily so that you're always working with the latest changes. We also make sure that the files are super light and easy to use. You can literally just drop them into your systems without a fuss.
You'll find everything you need to know in our documentation. We walk you through what's in the archives, the file structure, how to verify your downloads before you import them, just to be safe, and we’ve also included a few examples.
Available Database Formats
CSV Database Documentation
1.Overview
The CSV version is delivered as a ZIP archive that includes Gzip-compressed files with IP ranges, location details, and multilingual place names. It’s well-suited for bulk imports and easy integration into relational databases.
2.Archive Content
After downloading and extracting the IP to Country CSV database archive, you’ll find the following files (with their types noted):
Standardized country and continent metadata with codes, currency, calling codes, TLDs, and languages.
Multilingual place names for cities, districts, states, countries, and continents.
IP ranges mapping to country IDs for linking each address block with standardized country details and metadata.
Documentation for dataset contents, schema, usage, and support.
SHA-256 checksums for verifying file integrity.
Always verify downloaded files with the provided checksum before importing.
On Linux, if sha256sum is not installed, first run:
sudo apt-get install coreutilsThen check the archive files against the checksum file with:
sha256sum -c checksum.txtExample output:
db-country.csv.gz: OK
db-place.csv.gz: OK
db-ip-country.csv.gz: OK
README.md: OKIf a file’s checksum does not match, FAILED will be shown instead of OK . If verification fails, first confirm that the download completed correctly; if the issue persists, please contact our support team.
Schema
This section describes the schema of each file included in the IP to Country Database archive. For every file, you’ll find its purpose, field definitions, and examples to help with integration.
1.db-ip-country.csv.gz
This file contains standardized country and continent details and metadata. It includes various codes (ISO-2/ISO-3/IOC), place IDs for names and capitals, currency details, international calling codes, top-level domains (TLDs), and language tags.
| Field | Type | Description | Can be empty? | Example |
|---|---|---|---|---|
| start_ip | string | The starting IP address of the range in IPv4 or IPv6 format. | No | 192.168.0.1 |
| end_ip | string | The ending IP address of the range in IPv4 or IPv6 format. | No | 192.168.0.255 |
| country_id | number | The unique identifier for the country associated with the IP range. | No | 192 |
country_id field links to db-country.id , which provides standardized country metadata such as different names, codes, currency, and language information.a.Example Records
start_ip,end_ip,country_id
5.9.14.0,5.9.14.20,41
2.82.244.5,2.82.244.5,136
4.37.42.146,4.37.42.146,172
2.78.248.23,2.78.248.23,91
4.1.141.26,4.1.141.26,172
5.135.173.255,5.135.173.255,56
2.80.37.34,2.80.37.34,136
4.36.133.234,4.36.133.234,172
2.76.194.247,2.76.194.247,91
5.212.86.27,5.212.86.27,782.db-place.csv.gz
This file contains multilingual names for countries, continents, states, districts, and cities worldwide. It serves as the reference dictionary for the IP Location Database, allowing you to resolve place IDs into multilingual responses across different regions and languages.
| Field | Type | Description | Can be empty? | Example |
|---|---|---|---|---|
| id | number | The unique identifier for the place. | No | 5375480 |
| place_english | string | The name of the place in English. | No | Mountain View |
| place_german | string | The name of the place in German. | Yes | Mountain View |
| place_russian | string | The name of the place in Russian. | Yes | Маунтин-Вью |
| place_korean | string | The name of the place in Korean. | Yes | 마운틴 뷰 |
| place_portuguese | string | The name of the place in Portuguese. | Yes | Mountain View |
| place_japanese | string | The name of the place in Japanese. | Yes | マウンテンビュー |
| place_persian | string | The name of the place in Farsi. | Yes | ماونتین ویو |
| place_french | string | The name of the place in French. | Yes | Mountain View |
| place_chinese | string | The name of the place in Chinese. | Yes | 山景城 |
| place_spanish | string | The name of the place in Spanish. | Yes | Mountain View |
| place_czech | string | The name of the place in Czech. | Yes | Mountain View |
| place_italian | string | The name of the place in Italian. | Yes | Mountain View |
id field in db-place.csv.gz is used as a reference key to resolve place names. It joins with the placeid fields in db-ip-location.csv.gz (such as state_place_id, district_place_id, and city_place_id) and also with placeid fields in db-country.csv.gz (such as country_name_place_id and country_capital_place_id). These joins ensure that every IP range or country record can be enriched with multilingual place names from the reference table, making it possible to deliver consistent, localized responses across different regions and languages.a.Example Records
id,place_english,place_german,place_russian,place_korean,place_portuguese,place_japanese,place_persian,place_french,place_chinese,place_spanish,place_czech,place_italian
221824,Nur-Sultan,Nur-Sultan,Нур-Султан,,,ヌル・スルタン,,Nur-Sultan,努尔苏丹,Nur-Sultán,sultánu,Nur-Sultano
1884,Aveiro,Aveiro,Авейру,Aveiro,Aveiro,アヴェイロ,,Aveiro,阿威罗,Aveiro,Aveiro,Aveiro
33709,Lady Lake,Lady Lake,Леди-Лейк,,,レーク郡,لیدی لیک، فلوریدا,Lac Lady,圣母湖,Jezero,Jezero,Lago di Lady
54790,Sao Joao da Madeira,São João da Madeira,Сан-Жуан-да-Мадейра,,,サンジョアンダマデイラ,,Sao Joao da Madère,圣若昂达马德拉,Sao Joao da Madeira,Sao Joao da Madeira,Sao Joao da Madeira
7,Europe,Europa,Европа,Europa,Europa,ヨーロッパ, اروپا,Europe,欧洲,Europa,Evropa,Europa
5,Asia,Asien,Азия,Ásia,Ásia,アジア, آسیا,Asie,亚洲,Asia,Asie,Asia
6,North America,Nordamerika,Северная Америка,América do Norte,América Do Norte,北アメリカ, امریکای شمالی,Amérique du Nord,北美洲,Norteamérica,Severní Amerika,America del Nord
9254,San Miguel County,San Miguel,Сан-Мигель,,Condado de San Miguel,サンミゲル郡,شهرستان سن میگل، کلرادو,Comté de San Miguel,聖米格爾縣,Сан-Мигель,San Miguel County,Contea di San Miguel
526,Tehran,Teheran,Тегеран,Teerão,,テヘラン,Tehrān,Téhéran,德黑兰,Teherán,Teherán,Teheran
240018,United States of America,,,,,,,,,,,
240019,"Washington, D.C.",,,,,,,,,,,
612,New Mexico,New Mexico,Нью-Мехико,Novo México,Novo México,ニューメキシコ州,نیومکزیکو,Nouveau-Mexique,新墨西哥州,Nuevo México,Nové Mexiko,New Mexico
24096,Strasbourg,Straßburg,Страсбург,Estrasburgo,Estrasburgo,ストラスブール,استراسبورگ,Strasbourg,斯特拉斯堡,Estrasburgo,Štrasburk,Strasburgo
28,United States,USA,США,Estados Unidos,Estados Unidos,アメリカ合衆国,ایالات متحدهٔ امریکا,États-Unis,美国,Estados Unidos,Spojené státy americké,Stati Uniti d'America
31,France,Frankreich,Франция,França,França,フランス共和国,فرانسه,France,法国,Francia,Francie,Francia
33,Germany,Deutschland,Германия,Alemanha,Alemanha,ドイツ連邦共和国,آلمان,Allemagne,德国,Alemania,Německo,Germania
240079,Baikonur District,,,,,,,,,,,
365,Lisbon,Lissabon,Лиссабон,Lisboa,Lisboa,リスボン県,ناحیه لیسبون,Lisbonne,里斯本區,Lisboa,Lisabon,Lisbona
239906,Federal Republic of Germany,,,,,,,,,,,
20153,Vogtlandkreis,Vogtlandkreis,Вогтландкрейс,,,ヴォクトランドクリース,,Vogtlandkreis,沃格兰克雷斯,Vogtlandkreis,Vogtlandkreis,Vogtlandkreis
39,Portugal,Portugal,Португалия,Portugal,Portugal,ポルトガル共和国,پرتغال,Portugal,葡萄牙,Portugal,Portugalsko,Portogallo
28315,Irving,Irving,Ирвинг,,,アービング,,Irving,欧文,Irving,Irving,Irving
240077,Sobral de Monte Agraco,,,,,,,,,,,
28755,Falkenstein,Falkenstein,Фалькенштайн,,,ファルケンシュタインだ,,Falkenstein,法尔肯斯坦,Falkenstein,Falkenstein,Falkenstein
3630,Paris,Paris,Париж,,,パリだ,,Paris,巴黎,París,Paříž,Parigi
239920,Republic of France,,,,,,,,,,,
4556,Dallas County,Dallas,Даллас,,Condado de Dallas,ダラス郡,شهرستان دالاس، تگزاس,Comté de Dallas,達拉斯縣,Даллас,Dallasu,Contea di Dallas
562,Berlin,Berlin,Берлин,베를린,Berlim,ベルリン,برلین,Berlin,柏林,Berlín,Berlín,Berlino
529,Saxony,Sachsen,Саксония,작센 자유주,,ザクセン州,,Saxe,萨克森,Sachsen,Sasko,Sassonia
59,Kazakhstan,Kasachstan,Казахстан,Cazaquistão,Casaquistão,カザフスタン共和国,قزاقستان,Kazakhstan,哈萨克斯坦,Kazajstán,Kazachstán,Kazakistan
62,Iran,Iran (Islamische Republik),Иран,Irã,Irã,イラン・イスラム共和国,ایران,Iran,伊朗伊斯兰共和国,Irán,Írán,Iran
239937,Islamic Republic of Iran,,,,,,,,,,,
24131,Astana,Astana,Астана,Astana,Astana,アスタナ,آستانه,Astana,阿斯塔纳,Astaná,Astana,Astana
28020,Aktobe,Aqtöbe,Актобе,Aqtöbe,Aqtöbe,アクトベ,آقتپه، قزاقستان,Aktioubé,阿克托比,Aktobe,Aktobe,Aktobe
351,Grand Est,Grand Est,Гранд Эст,그랑테스트,,グランドエスト,,Grand Est,大东部州,Grand Est,Grand Est,Gran Est
3948,Bas-Rhin,Bas-Rhin,Бас-Рин,Baixo Reno,Baixo Reno,バラン県,,Bas-Rhin,下莱茵省,Bajo Rin,Bas-Rhin,Basso Reno
239947,Republic of Kazakhstan,,,,,,,,,,,
505,Aqtobe,Aktobe,Актюбинская область,,,アクトベ,,Aqtobe,阿克托托,Aqtobe,Aqtobe,Aqtobe
5939,Lake County,Lake County,Лейк,,Condado de Lake,レイク郡,شهرستان لیک، ایندیانا,Comté de Lake,萊克縣,Comté de Lake,Jezero County (Texas),Contea di Lake
396,Florida,Florida,Флорида,Flórida,Flórida,フロリダだ,فلوریدا,Floride,佛罗里达,Florida,Florida,Florida
6611,Pecos,Pecos,Пекос,,Condado de Pecos,ペコス郡,شهرستان پیکس، تگزاس,Comté de Pecos,貝可斯縣,Pecos,Pecos,Pecos
373,Texas,Texas,Техас,텍사스 주,,テキサス州,تگزاس,Texas,德克萨斯州,Texas,Texas,Texas
365,Lisbon,Lissabon,Лиссабон,Lisboa,Lisboa,リスボン県,ناحیه لیسبون,Lisbonne,里斯本區,Lisboa,Lisabon,Lisbona
532,Qom,Qom,Кум,,,コム,Ostān-e Qom,Qom,库姆,Qom,Qom,- Ok
239987,Republic of Portugal,,,,,,,,,,,
240078,Aqtoebe,,,,,,,,,,,3.db-country.csv.gz
This file contains standardized country metadata for the IP Location Database. It includes continent codes and names, ISO-2/ISO-3/IOC country codes, country and official names (as place IDs), capital (place ID), currency (code, name, symbol), international calling codes, top-level domains (TLDs), and supported language tags.
| Field | Type | Description | Can be empty? | Example |
|---|---|---|---|---|
| id | number | The unique identifier for the country. | No | 192 |
| continent_code | string | The continent code associated with the country. | No | NA |
| continent_name_place_id | number | The unique identifier for the continent place. | No | 6255148 |
| country_code2 | string | The ISO 3166-1 alpha-2 code of the country. | No | US |
| country_code3 | string | The ISO 3166-1 alpha-3 code of the country. | No | USA |
| country_code_ioc | string | The IOC country code. | No | USA |
| country_name_place_id | number | The unique identifier for the country place. | No | 6252001 |
| country_name_official_place_id | number | The unique identifier for the official country place. | No | 6252001 |
| country_capital_place_id | number | The unique identifier for the capital place. | No | 5375480 |
| currency_code | string | The ISO 4217 currency code of the country. | No | USD |
| currency_name | string | The name of the currency used in the country. | No | United States Dollar |
| currency_symbol | string | The symbol of the currency used in the country. | No | $ |
| calling_code | string | The international calling code of the country. | No | +1 |
| tld | string | The top-level domain (TLD) of the country. | No | .us |
| languages | string | The official languages spoken in the country, represented as a comma-separated list of ISO 639-1 codes. | No | en,es |
id field in db-country.csv.gz serves as the reference key for country metadata. It is used by the country_id field in db-ip-location.csv.gz to link each IP range to standardized country details such as ISO codes, continent, capital, currency, calling codes, and languages. In addition, *_place_id fields within db-country.csv.gz (e.g., country_name_place_id, country_capital_place_id) join to db-place.csv.gz to resolve multilingual names for countries and capitals. Together, these joins ensure that country-level information can be consistently linked, enriched, and localized.a.Example Records
id,continent_code,continent_name_place_id,country_code2,country_code3,country_code_ioc,country_name_place_id,country_name_official_place_id,country_capital_place_id,currency_code,currency_name,currency_symbol,calling_code,tld,languages
56,EU,7,FR,FRA,FRA,31,239920,3630,EUR,Euro,€,+33,.fr,"fr-FR,frp,br,co,ca,eu,oc"
91,AS,5,KZ,KAZ,KAZ,59,239947,221824,KZT,Tenge,₸,+7,.kz,"kk,ru"
172,NA,6,US,USA,USA,28,240018,240019,USD,US Dollar,$,+1,.us,"en-US,es-US,haw,fr"
136,EU,7,PT,PRT,POR,39,239987,365,EUR,Euro,€,+351,.pt,"pt-PT,mwl"
78,AS,5,IR,IRN,IRI,62,239937,526,IRR,Iranian Rial,﷼,+98,.ir,"fa-IR,ku"
41,EU,7,DE,DEU,GER,33,239906,562,EUR,Euro,€,+49,.de,de4.File Relationship Diagram
The diagram below illustrates the relationships between the various files included in the CSV database package. It shows how the main CSV file connects to reference tables for countries, states, districts, and cities, ensuring consistent and accurate geolocation data across different regions and languages.
File Format & Encoding
All IP to Country CSV datasets are provided in UTF-8 encoding, comma-separated, and compressed with Gzip (.csv.gz). Each file includes a header row listing the field names for clarity and consistency.
Field values are unquoted by default, with quotes applied only in the following cases:
- Line breaks within text fields.
- Commas inside a value (e.g., addresses).
- Lists of values (e.g., languages).
- Spaces that may be auto-quoted by export tools.
MMDB Database Documentation
1.Overview
The MMDB version of our IP to Country is delivered as a ZIP archive that includes a single MMDB file with all geolocation data (including multilingual place fields), a README file, and a checksum file. It’s optimized for fast lookups in applications and services, making it ideal for real-time queries and direct integration into your systems.
2.Archive Content
After downloading and extracting the IP to Country MMDB database archive, you’ll find the following files (with their types noted):
Country-level geolocation database with IP ranges, multilingual country names, codes, capital, currency, languages, and related metadata.
Documentation for dataset contents, schema, usage, and support.
SHA-256 checksums for verifying file integrity.
Always verify downloaded files with the provided checksum before importing.
On Linux, if sha256sum is not installed, first run:
sudo apt-get install coreutilsThen check the archive files against the checksum file with:
sha256sum -c checksum.txtExample output:
db-ip-country.mmdb: OK
README.md: OKIf a file’s checksum does not match, FAILED will be shown instead of OK . If verification fails, first confirm that the download completed correctly; if the issue persists, please contact our support team.
Response Schema
This section describes the structure of the data returned from the IP to Country MMDB file. Each field is detailed with its type, meaning, and example values to help you interpret responses and integrate them into your applications.
1.db-ip-country.mmdb
This file contains standardized country and continent details. It includes multilingual country and capital names, ISO codes (ISO-2/ISO-3/IOC), currency details, international calling codes, top-level domains (TLDs), and language tags.
2.Field Reference
The following reference lists all fields available in the MMDB response. Each entry includes the field path, its description, data type, and example value to help you understand how to parse and integrate the data.
a.Example Records
{
"location": {
"country": {
"capital": {
"cs": "Berlín",
"de": "Berlin",
"en": "Berlin",
"es": "Berlín",
"fa": "برلین",
"fr": "Berlin",
"it": "Berlino",
"ja": "ベルリン",
"ko": "베를린",
"pt": "Berlim",
"ru": "Берлин",
"zh": "柏林"
},
"code2": "DE",
"code3": "DEU",
"code_ioc": "GER",
"continent": {
"code": "EU",
"name": {
"cs": "Evropa",
"de": "Europa",
"en": "Europe",
"es": "Europa",
"fa": " اروپا",
"fr": "Europe",
"it": "Europa",
"ja": "ヨーロッパ",
"ko": "Europa",
"pt": "Europa",
"ru": "Европа",
"zh": "欧洲"
}
},
"currency": {
"code": "EUR",
"name": {
"en": "Euro"
},
"symbol": "€"
},
"metadata": {
"calling_code": "+49",
"languages": "de",
"tld": ".de"
},
"name": {
"cs": "Německo",
"de": "Deutschland",
"en": "Germany",
"es": "Alemania",
"fa": "آلمان",
"fr": "Allemagne",
"it": "Germania",
"ja": "ドイツ連邦共和国",
"ko": "Alemanha",
"pt": "Alemanha",
"ru": "Германия",
"zh": "德国"
},
"name_official": {
"cs": "",
"de": "",
"en": "Federal Republic of Germany",
"es": "",
"fa": "",
"fr": "",
"it": "",
"ja": "",
"ko": "",
"pt": "",
"ru": "",
"zh": ""
}
}
}
}Data Format & Constraints
- All fields defined in the schema are always present in the IP to Country MMDB response.
- Fields may contain empty strings (""), but never null, so null checks are not required.
- Place names such as countries, states, districts, and cities are available in multiple translations.
- All text values are encoded in UTF-8.
- Field names and response structure remain stable across updates for backward compatibility.
Database Updates & Delivery
When you subscribe to our IP to Country database, we’ll send you static download links for the archive in your chosen formats. These links never change, so you can use them both for your initial download and for all future updates.
Our databases are refreshed daily and weekly, ensuring you always have access to the most current data. Each time your subscribed dataset is updated, you’ll also receive an email notification so you don’t miss a release.
For automated workflows, you can check our status endpoint to see the last update timestamp. When the date changes, simply re-fetch the archive using your static download URL to pull the latest version into your system.