If you're looking for an API to get a location for an IP address, there are many good options. The ipdata API is a good option for developers, with geolocation data, threat intelligence feeds, proxy and VPN detection, company data and more. It's GDPR compliant and offers a range of pricing levels, including a free tier for noncommercial use.
Another good option is MaxMind, which offers accurate, noninvasive IP geolocation data and real-time risk scoring for fraud prevention. It's geared for businesses of all sizes, covering 99.9999% of IP addresses and offering high uptime. MaxMind also offers proxy detection, so it's a good option for companies trying to keep people out.
For more complete IP geolocation and threat intelligence, check out Ipregistry. This service offers data on more than 3 million unique locations, including user profiles, currency, timezone and threat data. It can handle large volumes of requests and offers easy integration with JSON and XML APIs, so it's good for publishers, ad networks and e-commerce sites.
Last, ipapi offers a fast and scalable IP lookup service with detailed location data. It's built on AWS for high availability and offers secure HTTPS encryption. With flexible pricing plans and a generous free tier, ipapi is good for everything from figuring out where a user is to screening out bad bots.