- Takes: IP address
- Passive: the target is not contacted
- Plan: Any plan; some fields need a paid plan
Returns location, ASN and proxy fields. Starter, Plus and Security plans add more fields. Errors return an error object with error_code and error_message.
Query parameters
ipIPv4 or IPv6 address. Defaults to the address of the caller.
formatResponse format.
langISO 639-1 translation code for continent, country, region and city names. Plus and Security plans only.
Response fields · 18ShowHide
ip
The address looked up
country_code
Country code
country_name
Country name
region_name
Region name
city_name
City name
latitude
Latitude
longitude
Longitude
zip_code
ZIP or postal code
time_zone
Time zone offset
asn
Autonomous system number
as
Autonomous system name
is_proxy
Whether the address is a known proxy
isp
Internet service provider (Starter plan and above)
domain
Domain of the ISP (Starter plan and above)
usage_type
Usage type (Starter plan and above)
fraud_score
Fraud score, 0 to 99 (Security plan)
is_vpn
VPN flag (Security plan)
is_tor
Tor flag (Security plan)
curl 'https://api.ip2location.io/' \
-H 'Authorization: Bearer YOUR_API_KEY'{
"ip": "203.0.113.7",
"country_code": "NL",
"country_name": "Netherlands",
"region_name": "Example Region",
"city_name": "Example City",
"latitude": 52,
"longitude": 4,
"zip_code": "1000 AA",
"time_zone": "+01:00",
"asn": "64500",
"as": "Example Network",
"is_proxy": false
}