This request will return the the country code and country name that a given IP address is located within.
| URL | https://api.telecomx.dk/geoip/IP_ADDRESS | |
|---|---|---|
| Method | GET | |
| Access level | VIEWER, MANAGER, OWNER, RESELLER, ADMIN | |
| Param | IP_ADDRESS | IP address to lookup |
https://api.telecomx.dk/geoip/77.66.100.10
| JSON object | ||
|---|---|---|
| ip | String | The IP address that was looked up. |
| countryCode | String | ISO3166-1 2 char country code. |
| country | String | Country name (english). |
| continent | String | Continent the country is on. |
| postal | String | Postal code - if available. |
| city | String | City - if available. |
| location | Object | Location data - if available. |
| location.accuracy_radius | Number | Accuracy of the position in KM. |
| location.latitude | Number | Latitude. |
| location.longitude | Number | Longitude. |
| location.time_zone | String | Timezone of the location. |
{ ip: "85.184.160.18", countryCode: "DK", country: "Denmark", continent: "EU", postal: "8300", city: "Odder", location: { accuracy_radius: 20, latitude: 55.9731, longitude: 10.153, time_zone: "Europe/Copenhagen" } }
| Error code | Message | Description |
|---|---|---|
| 400 | ip | IP address missing in request URI |
| 403 | access_denied | Insufficient access level |
| 404 | ip | IP address not found |
| 422 | ip | IP address is private or special and cannot be looked up |