IP Geolocation API
The IP Geolocation API is a powerful tool that allows you to easily detect a user's location by their IP address. By utilizing this API, you can determine which language your visitor speaks and which currency to use in payment forms, among other valuable data.
To see the API in action, you can test it out using the API Playground. :
Authentication and API key
If you don't have an API key, create one from our registration page. Once you register, you can get an IP Geolocation API key for free! For an overview of our plans, please take a look at our price page.
If you don't have an API key, don't worry - getting one is quick and easy. Go to our main page and press the "Sign Up" button to create an account. Once you're registered, you can get a Geoapify API key for free!
- To get started, head over to the Geoapify MyProjects page and create a new project
- From there, go to the API Keys section, where you can generate one or multiple API keys for your project. You can also protect your API key by specifying allowed IP addresses, HTTP referrers, origins, and CORS.
- To generate the IP Geolocation API programming code sample, select the API key you want to use and choose "IP Geolocation API" from the list of APIs. You'll then be provided with an URL and programming code that you can use to make API calls.
- To test out your API call, simply press the "Try" button and get the result object.
To use the IP Geolocation API, make an HTTP GET request to the API endpoint:
If you do not specify an IP address in the request, the API will automatically detect the user's IP address and provide location data based on that. Alternatively, you can specify a different IP address in the request to get location data for that IP address instead.
Here are IP Geolocation URL examples (click on a URL to test the API):
Detect an IP address and get location:
Get geographical coordinates for an IP address:
|apiKey||Geoapify API key|
|ip||IP address to lookup. Optional parameter. The IP address is detected automatically when it is not set.|
At Geoapify, we use a universal unit called a "credit" to calculate the cost of our API calls.
With our IP Geolocation API, each call is priced at just 1 credit:
|API name||Cost in credits||Example|
|IP Geolocation API||1 request = 1 credit||3 IP Geoclocation requests cost 3 credits|
Our pricing plans are designed to cater to the needs of any company, and our Free plan includes 3,000 credits per day. To see our pricing plans and find the best option for your business, visit our pricing page.