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 or state, city, latitude and longitude, ZIP/Postal code, time zone, Internet Service Provider (ISP) or company name, domain name, net speed, area code, weather station code, weather station name, mobile country code (MCC), mobile network code (MNC) and carrier brand, elevation, and usage type. 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|WS2|WS3|...|WS24>

 

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 | WS2 | WS3 | WS4 | WS5 | WS6 | WS7 | WS8 | WS9 | WS10 | WS11 | WS12 | WS13 | WS14 | WS15 | WS16 | WS17 | WS18 | WS19 | WS20 | WS21 | WS22 | WS23 | WS24

Please refer to the below pricing table for value returned.
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=172.80.16.103&key=demo&package=WS10


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

 

PRICING
We offer you 24 packages for your IP query. Each package returns you a different set of IP information with different credits required for each query.
Package Information Returned Credit
WS1 Country Code 1 credit
(0.0005/query)
WS2 Country, ISP 2 credits
(0.0010/query)
WS3 Country, Region, City 2 credits
(0.0010/query)
WS4 Country, Region, City, ISP 3 credits
(0.0015/query)
WS5 Country, Region, City, Latitude, Longitude 3 credits
(0.0015/query)
WS6 Country, Region, City, Latitude, Longitude, ISP 4 credits
(0.0020/query)
WS7 Country, Region, City, ISP, Domain 4 credits
(0.0020/query)
WS8 Country, Region, City, Latitude, Longitude, ISP, Domain 5 credits
(0.0025/query)
WS9 Country, Region, City, Latitude, Longitude, ZIPCode 4 credits
(0.0020/query)
WS10 Country, Region, City, Latitude, Longitude, ZIPCode, ISP, Domain 6 credits
(0.0029/query)
WS11 Country, Region, City, Latitude, Longitude, ZIPCode, TimeZone 5 credits
(0.0025/query)
WS12 Country, Region, City, Latitude, Longitude, ZIPCode, TimeZone, ISP, Domain 7 credits
(0.0034/query)
WS13 Country, Region, City, Latitude, Longitude, TimeZone, NetSpeed 5 credits
(0.0025/query)
WS14 Country, Region, City, Latitude, Longitude, ZIPCode, TimeZone, ISP, Domain, NetSpeed 8 credits
(0.0039/query)
WS15 Country, Region, City, Latitude, Longitude, ZIPCode, TimeZone, AreaCode 7 credits
(0.0034/query)
WS16 Country, Region, City, Latitude, Longitude, ZIPCode, TimeZone, ISP, Domain, NetSpeed, AreaCode 10 credits
(0.0049/query)
WS17 Country, Region, City, Latitude, Longitude, TimeZone, NetSpeed, Weather 6 credits
(0.0029/query)
WS18 Country, Region, City, Latitude, Longitude, ZIPCode, TimeZone, ISP, Domain, NetSpeed, AreaCode, Weather 11 credits
(0.0054/query)
WS19 Country, Region, City, Latitude, Longitude, ISP, Domain, Mobile 8 credits
(0.0039/query)
WS20 Country, Region, City, Latitude, Longitude, ZIPCode, TimeZone, ISP, Domain, NetSpeed, AreaCode, Weather, Mobile 13 credits
(0.0064/query)
WS21 Country, Region, City, Latitude, Longitude, ZIPCode, TimeZone, AreaCode, Elevation 8 credits
(0.0039/query)
WS22 Country, Region, City, Latitude, Longitude, ZIPCode, TimeZone, ISP, Domain, NetSpeed, AreaCode, Weather, Mobile, Elevation 14 credits
(0.0069/query)
WS23 Country, Region, City, Latitude, Longitude, ISP, Domain, Mobile, UsageType 11 credits
(0.0054/query)
WS24 Country, Region, City, Latitude, Longitude, ZIPCode, TimeZone, ISP, Domain, NetSpeed, AreaCode, Weather, Mobile, Elevation, UsageType 18 credits
(0.0088/query)
API Examples:
WS1 Query: http://api.ip2location.com/?ip=<ip_address>&key=<your_api_key>
WS1 Response: US
 
WS24 Query: http://api.ip2location.com/?ip=<ip_address>&key=<your_api_key>&package=WS24
WS24 Response: US;United States;California;Mountain View;37.405992;-122.078515;94043;-08:00;Google Inc.;google.com;T1;1;650;USCA0746;Mountain View;-;-;-;31;SES
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=WS24

response format:
US;United States;California;Mountain View;37.405992;-122.078515;94043;-08:00;Google Inc.;google.com;T1;1;650;USCA0746;Mountain View;-;-;-;31;SES


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

response format:
{
"country_code":"US",
"country_name":"United States",
"region_name":"California",
"city_name":"Mountain View",
"latitude":"37.405992",
"longitude":"-122.078515",
"zip_code":"94043",
"time_zone":"-08:00",
"isp":"Google Inc.",
"domain":"google.com",
"net_speed":"T1",
"idd_code":"1",
"area_code":"650",
"weather_station_code":"USCA0746",
"weather_station_name":"Mountain View",
"mcc":"-",
"mnc":"-",
"mobile_brand":"-",
"elevation":"31",
"usage_type":"SES"
}


xml query string:
http://api.ip2location.com/?ip=<ip_address>&key=<your_api_key>&package=WS24&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>
<zip_code>94043</zip_code>
<time_zone>-08:00</time_zone>
<isp>Google Inc.</isp>
<domain>google.com</domain>
<net_speed>T1</net_speed>
<idd_code>1</idd_code>
<area_code>650</area_code>
<weather_station_code>USCA0746</weather_station_code>
<weather_station_name>Mountain View</weather_station_name>
<mcc>-</mcc>
<mnc>-</mnc>
<mobile_brand>-</mobile_brand>
<elevation>31</elevation>
<usage_type>SES</usage_type>
</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