Endpoint
GET/analytics/geo
APIs that can be used to work with State programmatically
This API method retrieves information about a given IP address. Both IPv4 and IPv6 formats are supported.
Authorization required.
| Parameter | Description |
|---|---|
| ip | Required. i.e. ip=192.168.0.1 |
curl https://state.sk/api/analytics/geo?ip=192.168.0.1 \
-H 'x-api-key: state_xxxxxxxxxx'
The response provides detailed information about the continent, country, region, city, and related geographic data.
{
"continent": {
"code": "EU",
"geonameId": 6255148,
"names": {
"de": "Europa",
"en": "Europe",
"es": "Europa",
"fr": "Europe",
"ja": "ヨーロッパ",
"pt-BR": "Europa",
"ru": "Европа",
"zh-CN": "欧洲"
}
},
"country": {
"geonameId": 3057568,
"isInEuropeanUnion": true,
"isoCode": "SK",
"names": {
"de": "Slowakei",
"en": "Slovakia",
"es": "Eslovaquia",
"fr": "Slovaquie",
"ja": "スロバキア (スロバキア共和国)",
"pt-BR": "Eslováquia",
"ru": "Словакия",
"zh-CN": "斯洛伐克"
}
},
"registeredCountry": {
"geonameId": 3017382,
"isInEuropeanUnion": true,
"isoCode": "FR",
"names": {
"de": "Frankreich",
"en": "France",
"es": "Francia",
"fr": "France",
"ja": "フランス共和国",
"pt-BR": "França",
"ru": "Франция",
"zh-CN": "法国"
}
},
"traits": {
"isAnonymous": false,
"isAnonymousProxy": false,
"isAnonymousVpn": false,
"isAnycast": false,
"isHostingProvider": false,
"isLegitimateProxy": false,
"isPublicProxy": false,
"isResidentialProxy": false,
"isSatelliteProvider": false,
"isTorExitNode": false,
"ipAddress": "92.180.233.10",
"network": "92.180.224.0/20"
},
"city": {
"geonameId": 723819,
"names": {
"de": "Prešov",
"en": "Prešov",
"es": "Prešov",
"ru": "Прешов"
}
},
"location": {
"accuracyRadius": 100,
"latitude": 49.0013,
"longitude": 21.2295,
"timeZone": "Europe/Bratislava"
},
"postal": {
"code": "080 01"
},
"subdivisions": [
{
"geonameId": 865085,
"isoCode": "PV",
"names": {
"de": "Prešovský kraj",
"en": "Prešov Region",
"es": "Región de Prešov",
"fr": "Prešov",
"ja": "プレショウ県",
"pt-BR": "Prešov",
"ru": "Прешовский край",
"zh-CN": "普列索夫州"
}
}
]
}