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.
MD5 checksums for verifying file integrity.
Always verify downloaded files with the provided checksum before importing.
On Linux, if md5sum is not installed, first run:
sudo apt-get install coreutils
Then check the archive files against the checksum file with:
md5sum -c db-ip-country.md5
Example output:
db-country.csv.gz: OK
db-place.csv.gz: OK
db-ip-country.csv.gz: OK
README.md: OK
If 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 | First IP address in the range (supports both IPv4 and IPv6). | No | 176.212.46.59 |
end_ip | string | Last IP address in the range (supports both IPv4 and IPv6). | No | 176.212.46.59 |
country_id | integer | Foreign key linking to | No | 141 |
country_id
field links to db-country.id
, which provides standardized country metadata such as different names, codes, currency, and language information.Example Records
2.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 | integer | Unique identifier for the place. | No | 394 |
place_english | string | Place name in English. | Yes | New York |
place_german | string | Place name in German. | Yes | New York |
place_russian | string | Place name in Russian. | Yes | Нью-Йорк |
place_korean | string | Place name in Korean. | Yes | 뉴욕주 |
place_portuguese | string | Place name in Portuguese. | Yes | Nova Iorque |
place_japanese | string | Place name in Japanese. | Yes | ニューヨーク州 |
place_persian | string | Place name in Persian. | Yes | ﺎﯾﺎﻠﺗ ﻦﯾﻮﯾﻭﺮﮐ |
place_french | string | Place name in French. | Yes | New York |
place_chinese | string | Place name in Chinese (Simplified). | Yes | 纽约州 |
place_spanish | string | Place name in Spanish. | Yes | Nueva York |
place_czech | string | Place name in Czech. | Yes | New York (stát) |
place_italian | string | Place name in Italian. | Yes | New York |
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.Example Records
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 | integer | Unique internal identifier for each country record. | No | 1 |
continent_code | string | Standard two-letter code representing the continent. | No | EU |
continent_name_place_id | integer | Foreign key linking to | No | 7 |
country_code2 | string | ISO 3166-1 alpha-2 country code (two characters). | No | AD |
country_code3 | string | ISO 3166-1 alpha-3 country code (three characters). | No | AND |
country_code_ioc | string | International Olympic Committee code (three characters). | No | AND |
country_name_place_id | integer | Foreign key linking to | No | 174 |
country_name_official_place_id | integer | Foreign key linking to | No | 239877 |
country_capital_place_id | integer | Foreign key linking to | No | 963 |
currency_code | string | ISO 4217 three-letter currency code. | No | EUR |
currency_name | string | Full currency name. | No | Euro |
currency_symbol | string | Currency symbol (UTF-8 encoded). | No | € |
calling_code | string | International dialing prefix (including +). | No | +376 |
tld | string | The country’s internet top-level domain. | No | .ad |
languages | string | Comma-separated list of spoken languages using BCP-47/IETF tags. | No | ca |
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.Example Records
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.
Documentation for dataset contents, schema, usage, and support.
MD5 checksums for verifying file integrity.
Always verify downloaded files with the provided checksum before importing.
On Linux, if md5sum is not installed, first run:
sudo apt-get install coreutils
Then check the archive files against the checksum file with:
md5sum -c db-ip-country.md5
Example output:
db-ip-country.mmdb: OK
README.md: OK
If 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.
Example Records
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.