ip2location facebbook  ip2location twitter  ip2location google+ ip2location github

IP2Location™ Download Client

This is a command line script to download IP2Location™ database from the server. Subscribers can use this script to automate the download process without visiting the download area through browser.

We update IP2Location databases on the first day of the calendar month. Please download the database once a month during a random day from the first week of calendar month to avoid network congestion.

NOTE: Windows users can also use our Windows Service application to automate the download if you don't want to use a command line script.


package Database package. (DB1, DB2...DB24, DB1BIN, DB2BIN...DB24BIN, or PX1)
You may login to your account area and get the package code (or, download code) at Download page.
token Download token. You can get your token at your IP2Location Account Area under download page.
output Output file name. (Optional)
help Display help file.

Syntax (Linux):

./download.pl -package DB1 -token DOWNLOAD_TOKEN

Syntax (Windows):
download.exe -package DB1 -token DOWNLOAD_TOKEN



Linux Setup

First save the download.pl to your installation directory. Make the script executable and run the script under the installation directory:

chmod 755 download.pl


Windows Setup

First save the download.pl to your installation directory. Open a command line prompt and change directory to your installation directory.

perl download.pl ...

Note: For Windows users, you can use the download.exe to replace the download.pl to skip the Perl interpreter installation requirements.


Other Applications

You can also automate the download process using the common HTTP applications such as wget or curl.


wget "https://www.ip2location.com/download?token=<DOWNLOAD_TOKEN>&file=<DATABASE_CODE> --output-document=<local_file_name>



curl -o <local_file_name> "https://www.ip2location.com/download?token=<DOWNLOAD_TOKEN>&file=<DATABASE_CODE>"


Automate the data downloading and database loading using script

You can also automate the entire download, unzipping and loading of IP2Location data into database using bash or shell script.