IP Geolocation API, made simple.

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
Example API ResponseJSON
{
  "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"
}

API Capabilities

Build more with IP address intelligence

Access useful geolocation and network information through a simple HTTP API. Available data varies by plan.

IP Geolocation

Identify country, region, city, ZIP code, latitude, and longitude associated with an IP address.

IPv4 & IPv6 Support

Look up both IPv4 and IPv6 addresses through the same straightforward API endpoint.

Time Zone Information

Retrieve time zone information to help localize your digital experience.

Network Details

Get basic autonomous system information. Additional ISP and network attributes are available on selected plans.

Proxy Detection

Identify basic public proxy signals, with more advanced proxy and security data on eligible plans.

Developer-Friendly REST API

Integrate JSON responses into websites, applications, scripts, and backend services.

Getting Started

Start using the API in 3 easy steps

IPInfoDB recommends IP2Location.io for new API users.

1

Create a free account

Sign up at IP2Location.io. New IPInfoDB API registrations are no longer accepted.

2

Get your API key

After registration, access your API key through your IP2Location.io account.

3

Make your first request

Send an HTTPS request with your API key and the IP address to receive a JSON response.

API Example

One request. Useful IP information.

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

Get started for free with IP2Location.io

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 plans
FREE PLAN
$0 / month
  • 50,000 IP geolocation queries / month
  • IPv4 and IPv6 lookups
  • Country, region, city and coordinates
  • Basic autonomous system information
  • Basic open proxy detection
  • API key included
Create Free Account

Free Plan attribution is required. Limits and features are subject to IP2Location.io's current terms.

Frequently Asked Questions

Common questions about the API

No. IPInfoDB no longer accepts new API registrations. New users should create a free account at IP2Location.io to obtain an API key.

Yes. IP2Location.io offers a Free Plan with 50,000 IP geolocation queries per month. Attribution is required for Free Plan usage. Review the latest plan details before integrating.

Yes. IP2Location.io supports keyless API requests with a limit of 1,000 queries per day. For higher limits, register for a free API key.

Yes. The IP2Location.io IP Geolocation API supports both IPv4 and IPv6 lookups.

The official IP2Location.io documentation provides API authentication, request parameters, sample responses, and error codes.

Ready to add IP geolocation to your application?

Create your free account at IP2Location.io and get an API key to start building.

Get Free API Key  

IP2Location IP Geolocation

IP2Location Free Widgets

IP2Location.io IP Geolocation API

IP Address Map