IPGeolocation Databases Portfolio

ipgeolocation provides seven databases:

This documentation provides complete details of features and available options in the above DB Plans. For information related to our IP Geolocation APIs, please goto APIs Documentation .

Database Archives

Our database archives include a comprehensive database api system that facilitates data retrieval and geolocation queries. To access the complete setup guide on how ot deploy the ipgeolocation-database-reader-2.0.0.war Java API , please follow the Database API System.

Additionally, The archives also include relational database files, like db-places and db-country, which facilitate effective management of geographic and cultural datasets, offering access to multilingual and reference information through unique identifiers.

Geo DB Relational Files

The db-country and db-places files are integral components of a relational database system designed to streamline geographic and cultural data management. These files are embedded within the full database to provide efficient access to multilingual and reference data through unique id values.

DB Places holds place names in various languages, allowing seamless multilingual support for geographic locations. The id in this file is referenced by other database files to retrieve place names across different languages while DB Country contains comprehensive country specific information.

Together, these relational files enable a highly efficient structure for referencing and managing geographic data, simplifying database queries through the use of ids and providing flexibility in handling multilingual and cross-referenced information across the entire system. For information related to our IP Geolocation API Database, please Contact our support.

I - DB Country File

The db-country file provides detailed information about countries, including continent codes, country codes, currency details, and languages. Each country is uniquely identified by an id, and fields such as place IDs for continent name, country name, and country capital reference the db-places file for multilingual support. This relational structure enables efficient access to country-specific data, enhancing geographic and cultural data representation across systems.

You need a valid 'ipgeolocation API key' to download and use this Database. Sign up here and get your free API key if you don’t have one.

Available DB Country Data Format

idcontinent_codecontinent_name_place_idcountry_code2country_code3country_name_place_idcountry_capital_place_idcurrency_codecurrency_namecurrency_symbolcalling_codetldlanguages
68EU7ESESP34358EUREuro+34.eses-ES,ca,gl,eu,oc
114AS5JPJPN13271JPYYen¥+81,.jpja
234NA6USUSA28400USDUS Dollar$+1.usen-US,es-US,haw,fr

Reference to DB Country Database File

FieldTypeDescriptionCan be empty?
idintegerA unique identifier for the record, representing the specific country or region in the database.No
continent_codestringThe code representing the continent to which the country belongs (e.g., "AF" for Africa, "EU" for Europe).No
continent_name_place_idintegerA reference to the db-places file, where the place ID corresponds to the continent's name in multiple languages.No
country_code2stringThe ISO-3166-1 alpha-2 two-letter country code (e.g., "US" for the United States).No
country_code3stringThe ISO-3166-1 alpha-3 three-letter country code (e.g., "USA" for the United States).No
country_name_place_idintegerA reference to the db-places file, where the place ID corresponds to the country name in multiple languages.No
country_capital_place_idintegerA reference to the db-places file for the place ID of the country's capital city in multiple languages.No
currency_codestringThe ISO-4217 code representing the currency of the country (e.g., "USD" for United States Dollar).No
currency_namestringThe full name of the currency used in the country (e.g., "United States Dollar").No
currency_symbolstringThe symbol used to represent the currency (e.g., "$" for USD).No
calling_codestringThe international dialing code for the country (e.g., "+1" for the United States).No
tldstringThe country’s top-level domain (e.g., ".us" for the United States).No
languagesstringA comma-separated list of the languages spoken in the country, represented by their ISO-639-1 language codes (e.g., "en" for English, "es" for Spanish).No

II - DB Places File

The db-places file serves as a relational database, providing place names translated into multiple languages. Each entry is uniquely identified by an id, which is referenced by other database files to retrieve place names in languages such as English, German, Russian, Japanese, French, Chinese, Spanish, Czech, and Italian. This file facilitates multilingual support and enhances the relational structure of geographic data across various systems.

You need a valid 'ipgeolocation API key' to download and use this Database. Sign up here and get your free API key if you don’t have one.

Available DB Places Data Format

idplace_englishplace_germanplace_russianplace_japaneseplace_frenchplace_chineseplace_spanishplace_czechplace_italian
5AsiaAsienАзияアジアAsie亚洲AsiaAsieAsia
6North AmericaNordamerikaСеверная Америка北アメリカAmérique du Nord北美洲NorteaméricaSeverní AmerikaAmerica del Nord
7EuropeEuropaЕвропаヨーロッパEurope欧洲EuropaEvropaEuropa

Reference to DB Places Database File

FieldTypeDescriptionCan be empty?
idintegerA unique identifier for the place, representing a specific geographic location, such as a continent, country, or city.No
place_englishstringThe name of the place in English.No
place_germanstringThe name of the place in German (Deutsch).Yes
place_russianstringThe name of the place in Russian (Русский).Yes
place_japanesestringThe name of the place in Japanese (日本語).Yes
place_frenchstringThe name of the place in French (Français).Yes
place_chinesestringThe name of the place in Chinese (中文).Yes
place_spanishstringThe name of the place in Spanish (Español).Yes
place_czechstringThe name of the place in Czech (Čeština).Yes
place_italianstringThe name of the place in Italian (Italiano).Yes

Relational Database File Stats

Prefer data in a specific format? We support all the important ones

DB Country CSV

Filesize16 KB
Fields13
Last updatedToday
Entries227

DB Places CSV

Filesize53 KB
Fields10
Last updatedToday
Entries450

Utilize the power of our IP to location database to enhance your marketing strategies, improve location-based services, and gain deeper insights into your audience. Whether you're conducting demographic assessments or implementing city-level targeting for advertising, our database offers the accurate and detailed data you need to succeed.

IPGeolocation.io Database API System Guide

This is a step-by-step guide on how to deploy the  ipgeolocation-database-reader-2.0.0.war Java API and consume API responses.

Requirements

  • At least JDK 8 (built and tested using JDK 1.8).
  • For CSV databases, 4-8 GB RAM for smaller databases and up to 16 GB RAM for larger databases (e.g., DB-IV,  DB-VI, and DB-VII).
  • For MMDB databases, 2-4 GB RAM is sufficient.
  • The ipgeolocation-database-reader-2.0.0.war file provided in the archive.

Basic Usage

• For Linux

Follow the steps below to deploy and consume the IP to City+ISP+Proxy database:

  • Create ~/conf/ipgeolocation directory in the home directory:

    shell

    mkdir -p ~/conf/ipgeolocation
  • Create database-reader-config.yaml file in the directory:

    shell

    vi ~/conf/ipgeolocation/database-reader-config.yaml
  • Add the following configuration:

    Configs

    ipgeolocation:
      database:
        workingDirectory: "/etc/ipgeolocation"
        apiKey: "YOUR_API_KEY"
        version: "DB-VII"
        updateInterval: "week"
        type: "mmdb"
        autoFetchAndUpdate: false
    Replace the following values as needed:
    • workingDirectory: Replace /etc/ipgeolocation  value with the directory path where you want to place the database files.
    • apiKey: Your IPGeolocation database subscription key. In order to use the APIs, Sign up for a desired plan.
    • version: Replace DB-VII value with the database version that you've subscribed to. It can be DB-I, DB-II, DB-III, DB-IV, DB-V, DB-VI, or DB-VII.
    • updateInterval: Replace week  value with your database subscription update interval. It can be week, or month.
    • type: Replace mmdb value with your choice of database to query from. It can be csv , or mmdb. It's default value is mmdb and can be skipped from configuration.
    • autoFetchAndUpdate: Set to true to auto-update or false to disable.
      • If set to true, the database api system will download the latest database as soon as it is available and will restart to load the latest database in-memory.
      • If set to false, the database api system will not check for the updated database for you. You can send a POST request to /database/update endpoint to fetch and update the database in-memory if an update is available. For example, here is a cURL request: curl --location --request POST 'http://address-to-api:8080/database/update'
      • It's default value is true and can be skipped from configuration.
  • Run the WAR file:

    shell

    java -jar -Xms6G -Xmx10G /path/to/ipgeolocation-database-reader-2.0.0.war

    Use -Xms<ram_size1> for minimum RAM and -Xmx<ram_size2> for maximum RAM. You can also deploy the WAR file in an embedded container like Apache Tomcat.

The database api system will download the latest database and load it in-memory while bootstrapping and will update the database as soon as the new update is available, if  autoFetchAndUpdate is set to true.

Note: database api system needs to restart after fetching the latest database to cache the updated database in-memory because caching the database without restarting will require as much as double of the required RAM which is a very costly choice.

Other Ways to Provide Configurations (Linux)

By default, the database api system will look at ~/conf/ipgeolocation/database-reader-config.yaml path for the YAML file.

You can provide the YAML configurations from your custom location as well. Let's assume that you've created the YAML configurations at /etc/ipgeolocation/ipgeo-db-reader-conf.yaml.

Here is how you can pass it to the database api system:

shell

java -Dspring.config.import=file:/etc/ipgeolocation/ipgeo-db-reader-conf.yaml -jar -Xms6G -Xmx10G /path/to/ipgeolocation-database-reader-2.0.0.war

• For Windows

  • Create C:\conf\ipgeolocation folders in the 'C' or any other drive of your choice.

    shell

    C:
    mkdir conf\ipgeolocation
  • Create 'database-reader-config.yaml' file in the C:\conf\ipgeolocation directory.

    shell

    cd conf\ipgeolocation copy NULL database-reader-config.yml
  • Add the following configuration:

    Configs

    ipgeolocation: 
      database: 
        workingDirectory: "C:\\conf\\ipgeolocation" 
        apiKey: "YOUR_API_KEY" 
        version: "DB-VII" 
        updateInterval: "week" 
        type: "mmdb" 
        autoFetchAndUpdate: false
    Replace the following values as needed:
    • workingDirectory: Replace C:\\conf\\ipgeolocation  value with the directory path where you want to place the database files.
    • apiKey: Your IPGeolocation database subscription key. In order to use the APIs, Sign up for a desired plan.
    • version: Replace DB-VII value with the database version that you've subscribed to. It can be DB-I, DB-II, DB-III, DB-IV, DB-V, DB-VI, or DB-VII.
    • updateInterval: Replace week  value with your database subscription update interval. It can be week, or month.
    • type: Replace mmdb value with your choice of database to query from. It can be csv , or mmdb. It's default value is mmdb and can be skipped from configuration.
    • autoFetchAndUpdate: Set to true to auto-update or false to disable.
      • If set to true, the database api system will download the latest database as soon as it is available and will restart to load the latest database in-memory.
      • If set to false, the database api system will not check for the updated database for you. You can send a POST request to /database/update endpoint to fetch and update the database in-memory if an update is available. For example, here is a cURL request: curl --location --request POST 'http://address-to-api:8080/database/update'
      • It's default value is true and can be skipped from configuration.
  • Run the WAR file:

    shell

    java -jar -Xms4G -Xmx4G -Dspring.config.import=file:C:\\conf\\ipgeolocation\\database-reader-config.yml C:\path\	o\ipgeolocation-database-reader-2.0.0.war

    Use -Xms<ram_size1> for minimum RAM and -Xmx<ram_size2> for maximum RAM. You can also deploy the WAR file in an embedded container like Apache Tomcat.

The database api system will download the latest database and load it in-memory while bootstrapping and will update the database as soon as the new update is available, if  autoFetchAndUpdate is set to true.

Note: database api system needs to restart after fetching the latest database to cache the updated database in-memory because caching the database without restarting will require as much as double of the required RAM which is a very costly choice.

Other Ways to Provide Configurations (Windows)

Another way is not create a YAML file and provide the configurations as the command-line arguments to the war file. Here is how you can do that: :

shell

java -Dipgeolocation.database.workingDirectory=/etc/ipgeolocation -Dipgeolocation.database.api=YOUR_API_KEY -Dipgeolocation.database.version=DB-VII -Dipgeolocation.database.updateInterval=week -Dipgeolocation.database.type=week -Dipgeolocation.database.autoFetchAndUpdate=false -jar -Xms6G -Xmx10G /path/to/ipgeolocation-database-reader-2.0.0.war

API SDKs

To facilitate the developers, we have added some SDKs for various programming languages. The detailed documentation on how to use these SDKs is available in the respective SDK's documentation page linked below.

Our SDKs are also available on Github. Feel free to help us improve them. SDKs. Following are the available SDKs: