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.
- File Size: 9.67 KB
- Entries: 254
- Fields: 15
Multilingual place names for cities, districts, states, countries, and continents.
- File Size: 32.36 KB
- Entries: 690
- Fields: 13
IP ranges mapping to country IDs for linking each address block with standardized country details and metadata.
- File Size: 182.30 MB
- Entries: 30.2M
- Fields: 3
Documentation for dataset contents, schema, usage, and support.
- File Size: 8.00 KB
SHA-256 checksums for verifying file integrity.
- File Size: 329 Bytes
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 |
I. Example Records
start_ip,end_ip,country_id
64.147.201.3,64.147.201.3,172
193.80.88.14,193.80.88.14,9
161.230.27.4,161.230.27.4,136
210.4.113.66,210.4.113.66,133
143.178.204.80,143.178.204.80,124
102.98.41.91,102.98.41.91,102
37.213.156.7,37.213.156.7,27
68.238.202.165,68.238.202.165,172
107.3.5.101,107.3.5.101,172
193.27.15.213,193.27.15.214,1402. 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 |
I. 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
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
7,Europe,Europa,Европа,Europa,Europa,ヨーロッパ, اروپا,Europe,欧洲,Europa,Evropa,Europa
383,Vienna,Wien,Вена,,Viana,ウィーンだ,,Vienne,维也纳,Vídeň,Vídeň,Vienna
9,Africa,Afrika,Африка,África,África,アフリカ,افریقا,Afrique,非洲,África,Afrika,Africa
239883,Republic of Austria,,,,,,,,,,,
1618,Mogilev,Mogilew,Могилевская область,,,マヒリョフ,,Mahiliow,莫吉廖夫,Mogilev,Mogilev,Mogilev
240080,Mahilyow District,,,,,,,,,,,
2122,Cagayan Valley,Cagayan-Tal,Уолли Кагаян,카가얀밸리 지방,,カガヤン・バレー地方,,Vallée de Cagayan,卡加延河谷,Valle del Cagayán,Cagayan,Valle di Cagayan
4751,Rabat,Rabat,Рабат,,,ラバト,,Rabat,拉巴特,Rabat,Rabat,Rabat
240018,United States of America,,,,,,,,,,,
381,Pennsylvania,Pennsylvania,Пенсильвания,Pensilvânia,Pensilvânia,ペンシルベニア州,پنسیلوانیا,Pennsylvanie,宾夕法尼亚州,Pensilvania,Pensylvánie,Pennsylvania
240019,"Washington, D.C.",,,,,,,,,,,
609,Delaware,Delaware,Делавэр,델라웨어 주,Delauare,デラウェア州,دلاویر,Delaware,特拉华州,Delaware,Delaware,Delaware
28692,Bucharest,Bukarest,Бухарест,Bucareste,Bucareste,ブカレスト,بخارست,Bucarest,布加勒斯特,Bucarest,Bukurešť,Bucarest
239898,Republic of Belarus,,,,,,,,,,,
3970,Gemeente Enschede,Gemeente Enschede,Гементе Энсхеде,,,FCゲメンテエンスヘーデ,,Gemeente Enschede,格米恩特·恩斯赫德,Gemeente Enschede,Gemeente Enschede,Gemeente Enschede
28,United States,USA,США,Estados Unidos,Estados Unidos,アメリカ合衆国,ایالات متحدهٔ امریکا,États-Unis,美国,Estados Unidos,Spojené státy americké,Stati Uniti d'America
24093,Amsterdam,Amsterdam,Амстердам,암스테르담,Amesterdão,アムステルダム,آمستردام,Amsterdam,阿姆斯特丹,Amsterdam,Amsterdam,Amsterdam
29,Philippines,Philippinen,Филиппины,Filipinas,Filipinas,フィリピン共和国,فیلیپین,Philippines,菲律宾,Filipinas,Filipíny,Filippine
32,Netherlands,Niederlande,Нидерланды,Holanda,Holanda,オランダ王国,هلند,Pays-Bas,荷兰,Holanda,Nizozemsko,Olanda
39,Portugal,Portugal,Португалия,Portugal,Portugal,ポルトガル共和国,پرتغال,Portugal,葡萄牙,Portugal,Portugalsko,Portogallo
1884,Aveiro,Aveiro,Авейру,Aveiro,Aveiro,アヴェイロ,,Aveiro,阿威罗,Aveiro,Aveiro,Aveiro
397,Overijssel,Overijssel,Оверайссел,오버레이설 주,Overissel,オーファーアイセルだ,,Overijssel,Overijssel,Overijssel,Overijssel,Overijssel
28692,Bucharest,Bukarest,Бухарест,Bucareste,Bucareste,ブカレスト,بخارست,Bucarest,布加勒斯特,Bucarest,Bukurešť,Bucarest
47,Austria,Österreich,Австрия,Áustria,Áustria,オーストリア共和国,اتریش,Autriche,奥地利,Austria,Rakousko,Austria
24106,Enschede,Enschede,Энсхеде,엔스헤더,,エンスヘーデ,انسخده,Enschede,恩斯赫德,Enschede,Enschede,Enschede
5422,New Castle County,New Castle County,Нью-Касл,,Condado de New Castle,ニューキャッスル郡,شهرستان نیو کستل، دلاویر,Comté de New Castle,紐卡斯爾縣,Нью-Касл,New Castle,Contea di New Castle
240082,Little Mahanoy Township,,,,,,,,,,,
6102,Kalamazoo County,Kalamazoo,Каламазу,,Condado de Kalamazoo,カラマズー郡,شهرستان کالامازو، میشیگان,Comté de Kalamazoo,卡拉馬祖縣,Каламазу,Kalamazoo,Contea di Kalamazoo
240079,Dumabato,,,,,,,,,,,
77,Romania,Rumänien,Румыния,Romênia,Romênia,ルーマニア,رومانی,Roumanie,罗马尼亚,Rumanía,Rumunsko,Romania
54703,Eixo,Eixo,Эйшо,,,エイコ,,Eixo,艾克索,Eixo,Eixo,Eixo
84,Morocco,Marokko,Марокко,Marrocos,Marrocos,モロッコ王国,مراکش,Maroc,摩洛哥,Marruecos,Maroko,Marocco
239956,Kingdom of Morocco,,,,,,,,,,,
7085,Portage,Portage,Портидж,,Condado de Portage,ポーテージ郡,شهرستان پورتیج، ویسکانسین,Comté de Portage,波蒂奇縣,Portál,Portál,Portage
88,Belarus,Weißrussland,Беларусь,Bielo-Rússia,Bielorrússia,ベラルーシ共和国,بیلوروسی,Biélorussie,白俄罗斯,Bielorrusia,Bělorusko,Bielorussia
10286,Mahilyow,Mahilyow,Могилёв,,,マヒリョウ,,Mahilyow,马希约夫,Mohylev,Mohylev,Mahilëŭ
240081,Marshallton,,,,,,,,,,,
239976,Kingdom of the Netherlands,,,,,,,,,,,
240077,Wien Stadt,,,,,,,,,,,
365,Lisbon,Lissabon,Лиссабон,Lisboa,Lisboa,リスボン県,ناحیه لیسبون,Lisbonne,里斯本區,Lisboa,Lisabon,Lisbona
3054,Manila,Manila,Манила,,,マニラ,,Manille,马尼拉,Manila,Manila,Manila
240078,Province of Quirino,,,,,,,,,,,
239984,Republic of the Philippines,,,,,,,,,,,
240083,Dornsife,,,,,,,,,,,
383,Vienna,Wien,Вена,,Viana,ウィーンだ,,Vienne,维也纳,Vídeň,Vídeň,Vienna
239987,Republic of Portugal,,,,,,,,,,,
2673,Minsk,Minsk,Минская Область,,,ミンスク,,Minsk,明斯克,Minsk,Minsk,Minsk
725,Casablanca-Settat,Casablanca-Settat,Касабланка-Сеттат,,,カサブランカセッタ,,Casablanca-Settat,卡萨布兰卡-塞塔特,Casablanca-Settat,Casablanca-Settat,Casablanca-Settat
591,Michigan,Michigan,Мичиган,Michigão,Michigão,ミシガン州,میشیگان,Michigan,密歇根州,Michigan,Michigan,Michigan
4740,Casablanca,Casablanca,Касабланка,,,カサブランカ,,Casablanca,卡萨布兰卡,Casablanca,Casablanca,Casablanca3. 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 |
I. 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
172,NA,6,US,USA,USA,28,240018,240019,USD,US Dollar,$,+1,.us,"en-US,es-US,haw,fr"
102,AF,9,MA,MAR,MAR,84,239956,4751,MAD,Moroccan Dirham,MAD,+212,.ma,"ar-MA,ber,fr"
140,EU,7,RO,ROU,ROU,77,77,28692,RON,Romanian Leu,lei,+40,.ro,"ro,hu,rom"
124,EU,7,NL,NLD,NED,32,239976,24093,EUR,Euro,€,+31,.nl,"nl-NL,fy-NL"
136,EU,7,PT,PRT,POR,39,239987,365,EUR,Euro,€,+351,.pt,"pt-PT,mwl"
9,EU,7,AT,AUT,AUT,47,239883,383,EUR,Euro,€,+43,.at,"de-AT,hr,hu,sl"
27,EU,7,BY,BLR,BLR,88,239898,2673,BYR,Belarusian Ruble,p.,+375,.by,"be,ru"
133,AS,5,PH,PHL,PHI,29,239984,3054,PHP,Philippine Piso,₱,+63,.ph,"tl,en-PH,fil"4. 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.
- File Size: 20.65 MB
- Entries: 30.2M
Documentation for dataset contents, schema, usage, and support.
- File Size: 8.48 KB
SHA-256 checksums for verifying file integrity.
- File Size: 161 Bytes
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.
I. Example Records
{
"location": {
"country": {
"capital": {
"cs": "",
"de": "",
"en": "Washington, D.C.",
"es": "",
"fa": "",
"fr": "",
"it": "",
"ja": "",
"ko": "",
"pt": "",
"ru": "",
"zh": ""
},
"code2": "US",
"code3": "USA",
"code_ioc": "USA",
"continent": {
"code": "NA",
"name": {
"cs": "Severní Amerika",
"de": "Nordamerika",
"en": "North America",
"es": "Norteamérica",
"fa": " امریکای شمالی",
"fr": "Amérique du Nord",
"it": "America del Nord",
"ja": "北アメリカ",
"ko": "América do Norte",
"pt": "América Do Norte",
"ru": "Северная Америка",
"zh": "北美洲"
}
},
"currency": {
"code": "USD",
"name": {
"en": "US Dollar"
},
"symbol": "$"
},
"metadata": {
"calling_code": "+1",
"languages": "en-US,es-US,haw,fr",
"tld": ".us"
},
"name": {
"cs": "Spojené státy americké",
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fa": "ایالات متحدهٔ امریکا",
"fr": "États-Unis",
"it": "Stati Uniti d'America",
"ja": "アメリカ合衆国",
"ko": "Estados Unidos",
"pt": "Estados Unidos",
"ru": "США",
"zh": "美国"
},
"name_official": {
"cs": "",
"de": "",
"en": "United States of America",
"es": "",
"fa": "",
"fr": "",
"it": "",
"ja": "",
"ko": "",
"pt": "",
"ru": "",
"zh": ""
}
}
}
}Database Integrity & Authenticity Verification
There are two methods of verifying the integrity and authenticity of our Database:
1. Using the Signature File (Recommended)
IPGeolocation.io signs every database release to ensure its authenticity and integrity. This allows customers to verify that a downloaded IP to Country database file originates directly from IPGeolocation.io and has not been altered, corrupted, or tampered with during transfer or storage.
Each database update includes a corresponding signature file, generated using our private signing key. Customers can validate the database using the provided public verification key. To verify a database file, you need:
- Database file (the downloaded archive)
- Signature file (the matching signature for that archive)
- Public key (public-key.pem)
These files are available via official IPGeolocation.io download endpoints and are also shared in database update notifications.
2. Using the Checksum File (Legacy)
Each database archive includes a checksum.txt file containing the SHA-256 checksums for the files packaged in the archive. You can use this file to validate that the extracted contents are complete and unchanged.
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. These links never change, so you can use them both for your initial download and for all future updates. You will receive:
- Database Archive URL : downloads the latest release of your subscribed database (CSV, MMDB or requested formats).
- Signature File URL : downloads the matching signature file for the latest release (used for authenticity verification).
- Public Key URL : downloads the public verification key (used with the signature file).
- Status Endpoint URL : returns the database's most recent update timestamp.
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.