Getting Started
You can use the API to get information about IP addresses, including continents, countries, cities, and even the approximate latitude and longitude of the IP address.
First touch
Section titled “First touch”Production API is available at https://api.ip-sonar.com
It’s straightforward to use. You may send a request to check your IP address geolocation:
curl https://api.ip-sonar.com/v1/myip
Check any IP address
Section titled “Check any IP address”You can check any IP address by sending a request to the API:
curl https://api.ip-sonar.com/v1/216.8.112.107
You will see a response like this:
{ "accuracy_radius": 50, "city_name": "Cleveland", "continent_code": "NA", "continent_name": "North America", "country_code": "US", "country_name": "United States", "ip": "216.8.112.107", "is_in_eu": false, "latitude": 41.4377, "longitude": -81.5487, "postal_code": "44128", "subdivision_1_code": "OH", "subdivision_1_name": "Ohio", "timezone": "America/New_York"}
Authentication
Section titled “Authentication”Use API keys to authenticate with the IP-Sonar API. Authenticated requests have a higher rate limit. You can add API key in dashboard.
Use the X-Api-Key
header to authenticate your requests:
curl -H "X-Api-Key: YOUR_API_KEY" https://api.ip-sonar.com/v1/216.8.112.107
Next steps
Section titled “Next steps”That’s it! In the next sections, we will cover field masks, rate limits, and batch requests to get the most out of the API.