ip2location facebbook  ip2location twitter  ip2location google+ ip2location github

IP2Proxy Python Library

This Python library supports all IP2Proxy™ BIN database products to query proxy IP address and its country, region, city, ISP name and proxy types. It has been optimized for speed and memory utilization.

Download Download   Source Source


  1. Unzip the package.
  2. Execute python setup.py build
  3. Execute python setup.py install


Sample Codes
import os
import IP2Proxy

db = IP2Proxy.IP2Proxy()

# open IP2Proxy BIN database for proxy lookup

# get versioning information
print ('Module Version: ' + db.get_module_version())
print ('Package Version: ' + db.get_package_version())
print ('Database Version: ' + db.get_database_version())

# individual proxy data check
print ('Is Proxy: ' + str(db.is_proxy("")))
print ('Proxy Type: ' + db.get_proxy_type(""))
print ('Country Code: ' + db.get_country_short(""))
print ('Country Name: ' + db.get_country_long(""))
print ('Region Name: ' + db.get_region(""))
print ('City Name: ' + db.get_city(""))
print ('ISP: ' + db.get_isp(""))

# single function to get all proxy data returned in array
record = db.get_all("")
print ('Is Proxy: ' + str(record['is_proxy']))
print ('Proxy Type: ' + record['proxy_type'])
print ('Country Code: ' + record['country_short'])
print ('Country Name: ' + record['country_long'])
print ('Region Name: ' + record['region'])
print ('City Name: ' + record['city'])
print ('ISP: ' + record['isp'])

# close IP2Proxy BIN database


IP2Proxy LITE BIN Database

Developers may subscribe the free IP2Proxy LITE BIN database for testing and evaluation purpose. Please take note that the LITE database is limited to public proxies (PUB) IP address. Commercial databases consist of other proxy types such as Tor, VPN and etcs.