IP2Location™ Web Service

USD $49.00 / 100,000 Credits * For 1 year

IP2Location™ web service is providing a service to do a reverse lookup of an IP address to an ISO3166 country code, region name, city name, latitude, longitude, ZIP code, ISP, and domain. To search, submit a query string and a set of parameters to the IP2Location™ Web APIs service and you will receive a search result. Search results are derived from IP2Location™ index of over 4 billion unique IP addresses.

IPv4 and IPv6 supported.

 

OVERVIEW

All successful HTTP or HTTPS request will return a response code of 200. In our web API, it also returns the lookup country code if successful or error code if failed.

Each API unit subscription allows 100,000 query credits. If you need more credits, please add multiple units during checkout. Total credits will be in multiplier (x 100,000) of number of units paid. An unique API key will be provided to query the web service.

IP2Location™ Web API uses a single web interface to perform the reverse lookup logic. The protocol used is HTTP or HTTPS GET. You can test this API as easy as using a web browser.

api.ip2location.com/?ip=<ip_address>&key=<your_api_key>&package=<WS1|WS5|WS9|WS10>

 

FEATURES

 

PARAMETERS
Name Description
key (required) API key.
ip (required) IP address (IPv4 or IPv6) for reverse lookup purpose. If not present, the server IP address will be used for the reverse lookup.
package (optional) If not present, the web service will assume the WS1 package query.
Valid value: WS1 | WS5 | WS9 | WS10

Values returned for WS1:
Country Code (2-characters)

Values returned for WS5:
Country Name, Country Code (2-characters), Region, City, Latitude, Longitude

Values returned for WS9:
Country Name, Country Code (2-characters), Region, City, Latitude, Longitude, ZIP Code

Values returned for WS10:
Country Name, Country Code (2-characters), Region, City, Latitude, Longitude, ZIP Code, ISP, Domain
format (optional) If not present, text format will be returned as the search result. Valid value: json | xml

 

DEMO

You can try out our web service by using the demo key. For example, http://api.ip2location.com/?ip=8.8.8.8&key=demo. Demo query limit is 20 per day.

IPv4:

api.ip2location.com/?ip=73.120.208.71&key=demo&package=WS10


IPv6 (Only for WS1):
api.ip2location.com/?ip=2607:f8b0:4001:c02::93&key=demo&package=WS1

 

PRICING
We offer you 4 different packages for your IP query. Each package provides you a different set of IP information with different credits required for each query.
WS1 WS5 WS9 WS10
Country Code (2-characters)
Country Name
Country Code (2-characters)
Region
City
Latitude
Longitude
Country Name
Country Code (2-characters)
Region
City
Latitude
Longitude
ZIP Code
Country Name
Country Code (2-characters)
Region
City
Latitude
Longitude
ZIP Code
ISP
Domain
1 credit ($0.0005/query) 3 credits ($0.0015/query) 4 credits ($0.0020/query) 6 credits ($0.0029/query)
API Examples:
WS1 Query: http://api.ip2location.com/?ip=<ip_address>&key=<your_api_key>
WS1 Response: US
 
WS5 Query: http://api.ip2location.com/?ip=<ip_address>&key=<your_api_key>&package=WS5
WS5 Response: US;UNITED STATES;CALIFORNIA;MOUNTAIN VIEW;37.405992;-122.078515
 
WS9 Query: http://api.ip2location.com/?ip=<ip_address>&key=<your_api_key>&package=WS9
WS9 Response: US;UNITED STATES;CALIFORNIA;MOUNTAIN VIEW;37.405992;-122.078515;94043
 
WS10 Query: http://api.ip2location.com/?ip=<ip_address>&key=<your_api_key>&package=WS10
WS10 Response: US;UNITED STATES;CALIFORNIA;MOUNTAIN VIEW;37.405992;-122.078515;94043;GOOGLE INCORPORATED;GOOGLE.COM
Web service response format

The web service supports text, json and xml response format. Below please find the details:

Format Example query string and response value
text query string:
http://api.ip2location.com/?ip=<ip_address>&key=<your_api_key>&package=WS5

response format:
US;UNITED STATES;CALIFORNIA;MOUNTAIN VIEW;37.405992;-122.078515

json query string:
http://api.ip2location.com/?ip=<ip_address>&key=<your_api_key>&package=WS5&format=json

response format:
{
"country_code":"US",
"country_name":"UNITED STATES",
"region_name":"CALIFORNIA",
"city_name":"MOUNTAIN VIEW",
"latitude":"37.405992",
"longitude":"-122.078515"
}


xml query string:
http://api.ip2location.com/?ip=<ip_address>&key=<your_api_key>&package=WS5&format=xml

response format:
<result>
<country_code>US</country_code>
<country_name>UNITED STATES</country_name>
<region_name>CALIFORNIA</region_name>
<city_name>MOUNTAIN VIEW</city_name>
<latitude>37.405992</latitude>
<longitude>-122.078515</longitude>
</result>


Note: The web service supports both HTTP and HTTPS queries.

 

SOAP/XML WEB SERVICES IN FRAUDLABS.COM

If you need other XML based web services, please visit http://www.fraudlabs.com