What this API does
The ip-api Geolocation API provides a simple and fast way to retrieve detailed location data based on public IP addresses. Developers can easily integrate this API to obtain information such as city, region, country, ZIP code, timezone, ISP, and geographical coordinates (latitude and longitude). Designed for high performance, it responds quickly with data in JSON, XML, or CSV formats.
How it works
This API allows developers to send HTTP GET requests to retrieve geographical information related to IP addresses. Each request returns structured data containing various location details. The service is designed for high throughput and can handle multiple requests simultaneously.
It supports batch queries which can be used to fetch data for up to 100 IPs in a single API call, making it efficient for large-scale applications.
Authentication
No authentication is required to access the ip-api Geolocation API. Developers can start using the service immediately without the need for an API key or signup process.
Example usage
http://ip-api.com/json/{ip}- Retrieves geolocation data for a specific IP address.http://ip-api.com/batch- Accepts a batch of up to 100 IP addresses and returns location data for all.http://ip-api.com/xml/{ip}- Retrieves geolocation data in XML format for a specific IP.http://ip-api.com/csv/{ip}- Retrieves geolocation data in CSV format for a specific IP.
Limits
The ip-api Geolocation API allows up to 45 free requests per minute. For batch queries, the limit is set to a maximum of 100 IPs per request.
Ideal use cases
- Building security applications to identify user locations.
- Enhancing analytics tools to provide geo-based insights.
- Enabling content localization based on user location.
- Implementing fraud prevention mechanisms by analyzing IP data.