While working on a recent project for a client, I found myself in the need of a good and reasonably reliable Geolocation API to find out more about a user that visits your site.
So, I did a little research for currently available APIs and came up with somewhat an exhaustive list. That is what I plan to share today.
I would use a web service that can return JSON data. Below are all the free active IP lookup services I could find and the information they return. If you know of any more, then do add a comment below. If you own one, reach out to me through the contact form, I’d love to talk.
Remember FreeGEOIP.net? Well, it is now called IPStack. It has much better offerings, a good enough free package, and affordable premium packages. IPStack offers so much more inside the API response that has made me not only use IPStack for personal use but I also recommend you to take a look:
✅ Standard/Bulk/Requester lookups
💵 Currency-related data (name, symbol)
🌐 Connection-related data (Internet service provider)
🕖 Timezone-related data (daylight saving, GMT Offset)
📍 Comprehensive location-related data (languages, calling code)
⚙ Specify fields to only get the data you want and save bandwidth
💂♂️ Security-related data (Info on proxy, crawler, tor, threat level/type)
Just use this link https://api.ipstack.com/check?access_key=YOUR_ACCESS_KEY with the language of your choice to get all the details for more details, read the documentation →
100% uptime as reported by UpTimeRobot which is another signal
of a good IP to GEO API service. API speed is pretty much unmatchable.
Extra data points:Location (languages, country flag SVG/emoji, calling code, also helps with GDPR by reporting is_eu as true/false), timezone (daylight saving, GMT Offset), currency (name, symbol), connection (ISP), and much more.
Security Module: Which can be used to assess risks and threats originating from certain IP addresses before any harm can be done to a website or web application. Info about proxy, crawler, tor, threat level/type — makes this service great at many levels.
SMB + Enterprise: IPStack is backed by a company named apilayer I
already use their invoicing SaaS and a couple of other API services. It’s also trusted by enterprise companies like Microsoft, Airbnb, Samsung, and more. They can support millions of requests per day.
Remember GeoIP Nekudo that used to require an IP Address parameter? Well, it is now ipapi.com — a fully-fledged
IP Geolocation API platform capable of offering more than 45 data points for each processed IP address, including Time Zone data,
Currency data, Language data, Connection data, and Risk Assessment data.
ipapi.com offers a vast range of features which puts it alongside the top recommendations I have for GEO IP API
Location finding services. Let’s take a look:
🗃️ Bulk IP Requests
👀 Advanced IP Data
✅ ASN & ISP Lookup
💲 Currency Detection
🗣️ Language Detection
⏰ Timezone Detection
🏇 Faster Response Times
😎 Security & Fraud Prevention
Just use this link https://api.ipapi.com/api/check?access_key=YOUR_ACCESS_KEY with the language of your choice to get all the details for more details, read the documentation →
Extra data points:Location (languages, country flag SVG/emoji, calling code, timezone (daylight saving, GMT Offset), currency (name, symbol), connection (ISP), and much more.
Security Module: Which can be used to assess risks and threats originating from certain IP addresses before any harm can be done to a website or web application. Info about proxy, crawler, tor, threat level/type — makes this service great at many levels.
SMB + Enterprise: ipapi is trusted by some impressive enterprise companies like Wix, Gengo, userflip, Obey, and more.
IPInfo is another major player in the IP information niche. Since 2013 they have built a customer base of over 100,000 including npm, CBS, Dell, Vodafone, and serve 12 Billion IP API requests per month. The company was founded by a former Facebook engineer Ben Dowling. IPInfo boasts an incredible amount of data sets and features as listed below:
Standard/Bulk/Requester lookups
Connection and carrier-related data
🏛️ ASN IP Operator related proprietary data
Comprehensive GeoIP data form an IPInfo self-built solution
Specify fields to only get the data you want and save bandwidth
100% uptime since it’s based on top of Amazon Web Services. The deployments are on a daily basis with Elastic Beanstalk. The API speed is pretty much unmatchable.
Data: Huge data sets for ASN, Carrier, etc. can be beneficial in building content customization. Imagine targeting AT&T and T-Mobile users differently for your next ad campaign.
Enterprise Tested: IPInfo’s data has been sought by several enterprise companies, e.g. Tesla, Dell, TripAdvisor, and Xerox — which is a testament to how far they have come. Many SMB to Large-scale enterprise companies listed on the about page.
11 endpoints around the world, 4 in the US, 1 in Canada, 2 in Europe (London and Frankfurt), Mumbai,
Seoul, Sydney and Sao Paulo. Being this global is a big plus.
2x Speed as compared to others. If you take a look at this data you
can see that IPData.co is quite fast as compared to other IP API Services — this matters a lot if you’re building a
commercial site.
Extra data points i.e. calling code, currency code, name, symbol, time_zone data, current time, UTC
offset and the flag file & emoji flag.
Enterprise level threat data – Only for paid users but have pretty great threat intelligence data to
check if an IP is a proxy, a known attacker, abuser, tor user or a bogon.
Keep in mind that since these are all free services, your mileage may vary in terms of exceeding quota and uptime, and who knows
when/if they will be taken offline down the road. Most of these services also offer a paid tier in case you want something more
robust.
🌳 Node.js foundation Community Committee Outreach Lead, Member Linux Foundation, OpenAPI Business Governing Board, and DigitalOcean Navigator. 📟 Teaching thousands of developers Node.js CLI Automation and VSCode.pro course. Over 142 million views, 24 yrs Blogging, 108K developers learning, 200+ FOSS.
Stay ahead in the web dev community with Ahmad's expert insights on open-source, developer relations, dev-tools, and side-hustles. Insider-email-only-content. Don't miss out - subscirbe for a dose of professional advice and a dash of humor. No spam, pinky-promise!
Thanks very much to do such a thorough survey of geolocation providers! I think it is great you took the time to detail the code and usage limits for each one. Saves me a lot of time.
I’ve been in touch via email to talk about adding ipdata to this list here. We have solid infrastructure and use latency based routing to respond to requests from one of 10 regions globally and our users also love the extra data we return i.e. calling code, currency, postal, tor node status.
Nice article Ahmad – Were you also able to figure out if any of these are being used commercially by companies like Target ? or Amazon ? Is there a reason why google geolocation API isn’t listed here ?
While working on a recent project for a client, I found myself in the need of a good and reasonably reliable IP Geolocation API to find out more about a user that visits your site.
So, I did a little research for currently available APIs and came up with somewhat an exhaustive list. That is what I plan to share today.
Thanks very much to do such a thorough survey of geolocation providers! I think it is great you took the time to detail the code and usage limits for each one. Saves me a lot of time.
Glad I could help :)
can you comment on response time / latency between different services?
thanks
Yeah, I haven’t tested that far. But the code snippets would help you do that.
Thank you for the compilation, for the information you provide and the price in the case of payment services, which gave you the best results?
Thanks for the cool list. Helped me to save a lot of searching time!
Awesome!
Thank you for posting this list! My company is looking to replace the google API due to cost and this was a quick way to narrow down options.
Glad you liked it. 💯
Hi Ahmad!
I’ve been in touch via email to talk about adding ipdata to this list here. We have solid infrastructure and use latency based routing to respond to requests from one of 10 regions globally and our users also love the extra data we return i.e. calling code, currency, postal, tor node status.
Good morning Ahmad Awais,
Could u please provide me an api_key for db-ip.com
Thanks u so much !
You have to get one on your own. 👋
Great article.
FYI, http://freegeoip.net/json/?callback=? is getting deprecated by July 1, 2018.
Thanks for letting me know. I switched to IPStack.
thank you
i have been add some of your code to my website!
question: how to get ip location exact to show geolocation?
thank you
Use longitude and latitude for that.
Nice article Ahmad – Were you also able to figure out if any of these are being used commercially by companies like Target ? or Amazon ? Is there a reason why google geolocation API isn’t listed here ?
Thanks sir.
Nice
Great list, thanks for taking the effort to post…
Glad to be able to help.
While working on a recent project for a client, I found myself in the need of a good and reasonably reliable IP Geolocation API to find out more about a user that visits your site.
So, I did a little research for currently available APIs and came up with somewhat an exhaustive list. That is what I plan to share today.
There were about a dozen sites that I studied.
Mentions