Today we launched a new API for our platform: The IP-location API. With this Geolocation API the exact location of a user can be discovered. The API can be implemented to your website with one line of JavaScript code. When someone enters your website the user’s location, time, currency and IP information becomes available to you.
Location, Time, Currency, and IP-address
When the Geolocation API is implemented on your website the following information is available to you:
- Country Code – e.g. NL
- Country – e.g. Netherlands
- Region code – e.g. nb
- Region – e.g. North-Brabant
- City e.g. Eindhoven
- Latitude – e.g. 51.103454
- Longitude – e.g. 6.6587321
- Phone code – e.g. 31
- Timezone name – e.g. Europe/Amsterdam
- Timezone code – e.g. CET
- Local time – e.g. Mon Apr 20 2020 20:03:40 GMT+2
- Currency name – e.g. Euro
- Currency code – e.g. EUR
- Currency Symbol – e.g. €
- IP-address: e.g. 84.32.12.254
JavaScript implementation
The API Company aims on making simple and easy-to-use API’s. Therefore the geolocation API can be implemented in seconds:
- Get your unique id here (or click here for the trial version with 1000 free API calls)
- Add the following line of JavaScript between the head tags of your website. Add your unique id at XXX.
<script src="https://theapicompany.com/geolocationAPI.js?id=XXX"></script>
- Retrieve all information as described over here. So for example, if you need to know the city, use the following line:
var city = geolocation.location.city;
That was easy right 🙂
Pricing
The Geolocation API comes in three packages. All of these have the same functionally
- Basic – 100.000 API calls per month – $1.99 p/m
- Medium – 1.000.000 API calls per month – $9.99 p/m
- Professional – 10.000.000 API calls per month – $59.99 p/m
If you need more/custom amount of API calls please send us an email.
Conclusion
The API Company creates easy and simple-to-use API’s to make your life easier. With this API we hope a lot of web-developers can be supported. So go ahead and happy coding 🙂