IP Geolocation
Identify country, region, city, ZIP code, latitude, and longitude associated with an IP address.
Get country, region, city, coordinates, time zone, and more from an IPv4 or IPv6 address. Power your application with the IP2Location.io API, recommended by IPInfoDB.
Get Your Free API Key{
"ip": "8.8.8.8",
"country_code": "US",
"country_name": "United States of America",
"region_name": "California",
"city_name": "Mountain View",
"latitude": 37.38605,
"longitude": -122.08385,
"zip_code": "94035",
"asn": "15169",
"as": "Google LLC"
}
Service Notice
IPInfoDB has transitioned its API registration service to IP2Location.io, which provides the underlying IP intelligence data powering the IPInfoDB API service. New API registrations are no longer available through IPInfoDB.
Existing users who wish to continue using IP geolocation services can register for a free API account at IP2Location.io. Refer to the API documentation for current features, usage limits, and integration instructions.
API Capabilities
Access useful geolocation and network information through a simple HTTP API. Available data varies by plan.
Identify country, region, city, ZIP code, latitude, and longitude associated with an IP address.
Look up both IPv4 and IPv6 addresses through the same straightforward API endpoint.
Retrieve time zone information to help localize your digital experience.
Get basic autonomous system information. Additional ISP and network attributes are available on selected plans.
Identify basic public proxy signals, with more advanced proxy and security data on eligible plans.
Integrate JSON responses into websites, applications, scripts, and backend services.
Getting Started
IPInfoDB recommends IP2Location.io for new API users.
Sign up at IP2Location.io. New IPInfoDB API registrations are no longer accepted.
After registration, access your API key through your IP2Location.io account.
Send an HTTPS request with your API key and the IP address to receive a JSON response.
API Example
Try the IP2Location.io geolocation endpoint with a simple cURL request.
Authenticated request (cURL)
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.ip2location.io/?ip=8.8.8.8"
Try without an API key (limited)
curl "https://api.ip2location.io/?ip=8.8.8.8"
Keyless requests are currently limited to 1,000 queries per day. For higher usage and global API infrastructure, create a free IP2Location.io account. See the full API documentation for parameters, error codes, and field availability.
Free Plan
For new users, IPInfoDB recommends the IP2Location.io Free Plan. It gives you a higher monthly query allowance than the keyless API and provides an API key for your application.
Need more attributes, additional query volume, or advanced proxy intelligence? Explore the available paid plans on IP2Location.io.
Compare all plansFree Plan attribution is required. Limits and features are subject to IP2Location.io's current terms.
Frequently Asked Questions
Create your free account at IP2Location.io and get an API key to start building.
Get Free API Key