IP Geolocation API - detect user location by IP

Get a city-level user location and useful information about the location. Set up your website or app for customer needs - show relevant map view, set currency and language

We have a Freemium pricing model and extensive free tier suitable for commercial usage as well. Get an API key and start now for Free!

Use cases for IP Geolocation API

Provide the best service for your customers considering customer location

Customize map view for a user location

Adapt map view

Show to a customer familiar and a well-accepted by him map view. So the customer can start immediately working with the map not sending additional time to scroll the map.

Address and places search location bias

Search locally

Knowing a customer location lets you search for addresses and places locally. Geoapify Geocoding API and Places API provide a "bias" parameter to prefer local places and addresses.

Customize website content for the customer

Use language and currency

Together with location information, the IP Geolocation API returns useful information that lets you adjust better your website or app for a customer location. For example, set the currency for payments or language.

Getting started

Geoapify IP Geolocation IP works via HTTP Get request. Use our code samples to add the API:

.then(resp => resp.json())
.then((userLocationData) => {


How accurate is the IP Geolocation API?

Geoapify IP Geolocation API returns city-level user location that corresponds to map zoom levels 8-9.

Is it possible to detect a user location more precisely?

You can detect user location more precisely by using the HTML Geolocation service which is natively provided by all modern browsers. This can be useful for getting up-to-date information and turn-by-turn navigation. However, the location information is provided only after user permission, i.e after the user presses the “Allow“ button in the popup.

How is the Geoapify IP Geolocation billed?

The IP Geolocation API request belongs to the “Geocoding & Places“ requests group. The Free pricing plan includes up to 100.000 requests monthly.

Can I use Free Plan for a commercial project?

Yes, we do not restrict using the Free plan by commercial companies. Start for Free and upgrade when you need it! But you have to provide a follow-link to Geoapify on your website. For example, “Powered by Geoapify“ near information about Geolocation service.

Which versions of IP do you support?

We support both IPv4 and IPv6 addresses.

World map

Ready to get started?

Get an API key and add IP Geolocation to your project!