Notes about Geolocation
There are several providers who offer this "service"... Geolocation from an IP.
I'm gonna resume some few services, and a basic usage of them, just to help others to know how to use the IP Geolocation and what it offers.
Summary
-
FREE Services
- Maybe, the best, cheap, fast, most basic and reliable is
my-ip.io
/my-ip.io / My IP
- Additionally, we can use
api-bdc.net / Reverse Geocode
- And, for more details, we can use
api-bdc.net / Roaming
- Maybe, the best, cheap, fast, most basic and reliable is
-
APIKey Services
- With subscriptions, we can use
api-bdc.net / IP Geolocation FULL
for full info. - Also, we can use
api-bdc.net / Reverse Geocode Client
for less info. - Another option is to use
ipapi.com / Info about any IP
- With subscriptions, we can use
my-ip.io
Service BIO:
- Web site: https://www.my-ip.io/
- Documentation: https://www.my-ip.io/api-usage
- Susbscription type: It's FREE.
FREE EndPoints
My IP
Sample Request
# PowerShell
Clear-Host;
$RootURL = "https://api.my-ip.io";
$BaseURL = "${RootURL}/v2/ip.json";
## My IP
$MyIpioInfo = IRM "${BaseURL}";
$MyIpioInfo;
$MyIpioInfo | ConvertTo-Json -Depth 9;
$MyIpioIP = $MyIpioInfo.ip;
$MyIpioIP;
Sample Response
{
"success": true,
"ip": "[MY_IP]",
"type": "IPv4",
"country": {
"code": "[MY_COUNTRY_CODE]",
"name": "[MY_COUNTRY_NAME]"
},
"region": "[MY_REGION]",
"city": "[MY_CITY]",
"location": {
"lat": [MY_LATITUDE_SHORT],
"lon": [MY_LONGITUDE_SHORT]
},
"timeZone": "[MY_TIMEZONE]",
"asn": {
"number": [MY_ASN],
"name": "[MY_ASN_NAME]",
"network": "[MY_ASN_NETWORK]"
}
}
api-bdc.net / bigdatacloud.com
Service BIO:
- Web site: https://www.bigdatacloud.com/
- Documentation: https://www.bigdatacloud.com/free-api
- Susbscription type: Allow FREE, but subject to 10.000 "queries" per month.
FREE EndPoints
Client IP
Sample Request
# PowerShell
Clear-Host;
$BaseURL = "https://api-bdc.net";
$Response = IRM "${BaseURL}/data/client-ip"
$Response;
$Response | ConvertTo-Json -Depth 9;
## My IP
$MyBDCClientIP = $Response.ipString;
$MyBDCClientIP;
Sample Response
{
"ipString": "[MY_IP]",
"ipType": "IPv4"
}
Client Info
Sample Request
# PowerShell
Clear-Host;
$BaseURL = "https://api-bdc.net";
$MyBDCClientInfo = IRM "${BaseURL}/data/client-info"
$MyBDCClientInfo;
$MyBDCClientInfo | ConvertTo-Json -Depth 9;
Sample Response
{
"ipString": "[MY_IP]",
"ipNumeric": [MY_NUMERIC_IP],
"ipType": "IPv4",
"isBehindProxy": false,
"device": "Desktop",
"os": "Windows 10",
"userAgent": "WindowsPowerShell 5.1.22621",
"family": "WindowsPowerShell",
"versionMajor": "5",
"versionMinor": "1",
"versionPatch": "22621",
"isSpider": false,
"isMobile": false,
"userAgentDisplay": "Windows 10 Desktop WindowsPowerShell 5.1.22621",
"userAgentRaw": "Mozilla/5.0 (Windows NT; Windows NT 10.0; es-ES) WindowsPowerShell/5.1.22621.4391"
}
Reverse Geocode
Sample Request
# PowerShell
Clear-Host;
$BaseURL = "https://api-bdc.net";
$MyBDCRevGeoInfo = IRM "${BaseURL}/data/reverse-geocode-client?localityLanguage=es"
$MyBDCRevGeoInfo;
$MyBDCRevGeoInfo | ConvertTo-Json -Depth 9;
Sample Response
{
"latitude": [MY_LATITUDE],
"lookupSource": "ip geolocation",
"longitude": [MY_LONGITUDE],
"localityLanguageRequested": "[MY_COUNTRY_CODE]",
"continent": "Europa",
"continentCode": "EU",
"countryName": "[MY_COUNTRY_NAME]",
"countryCode": "[MY_COUNTRY_CODE]",
"principalSubdivision": "[MY_REGION]",
"principalSubdivisionCode": "[MY_REGION_CODE]",
"city": "[MY_CITY]",
"locality": "[MY_LOCALITY]",
"postcode": "",
"plusCode": "[MY_PLUS_CODE]",
"localityInfo": {
"administrative": [
{
"name": "[MY_COUNTRY_NAME]",
"description": "pa\u00eds del suroeste de Europa",
"isoName": "[MY_COUNTRY_ISO_NAME]",
"order": 2,
"adminLevel": 2,
"isoCode": "[MY_COUNTRY_ISO_CODE]",
"wikidataId": "[MY_WIKIDATA_ID]",
"geonameId": [MY_GEONAME_ID]
},
{...},
{...}
],
"informative": [
{
"name": "Europa",
"description": "continente ba\u00f1ado principalmente por el Atl\u00e1ntico",
"isoName": "Europe",
"order": 1,
"isoCode": "EU",
"wikidataId": "Q46",
"geonameId": 6255148
},
{...}
]
}
}
Roaming
Requires latitude
and longitude
.
Afortunatelly, we can get those values from the previous call.
Sample Request
# PowerShell
Clear-Host;
$BaseURL = "https://api-bdc.net";
$MyBDCRevGeoInfo = IRM "${BaseURL}/data/reverse-geocode-client"
$MyBDCLatitude = $MyBDCRevGeoInfo.latitude;
$MyBDCLongitude = $MyBDCRevGeoInfo.longitude;
$MyBDCRoamingInfo = IRM "${BaseURL}/data/am-i-roaming?latitude=${MyBDCLatitude}&longitude=${MyBDCLongitude}"
$MyBDCRoamingInfo;
$MyBDCRoamingInfo | ConvertTo-Json -Depth 9;
Sample Response
{
"isRoaming": false
}
APIKey EndPoints
IP Geolocation FULL
Availables here: https://www.bigdatacloud.com/ip-geolocation
Requires an APIKey
.
Sample Request
# PowerShell
Clear-Host;
$MyBDCAPIKey = "[MY_BDC_API_KEY]";
$RootURL = "https://api-bdc.net";
$BaseURL = "${RootURL}/data";
$MyBDCGeoLocFULL = IRM "${BaseURL}/ip-geolocation-full?key=${MyBDCAPIKey}&localityLanguage=es"
$MyBDCGeoLocFULL;
$MyBDCGeoLocFULL | ConvertTo-Json -Depth 9;
Sample Response
{
"ip": "[MY_IP]",
"localityLanguageRequested": "[MY_COUNTRY_CODE]",
"isReachableGlobally": true,
"country": {
"isoAlpha2": "[MY_COUNTRY_ALPHA2_CODE]",
"isoAlpha3": "[MY_COUNTRY_ALPHA3_CODE]",
"m49Code": [MY_COUNTRY_M49_CODE],
"name": "[MY_COUNTRY_NAME]",
"isoName": "[MY_COUNTRY_ISO_NAME]",
"isoNameFull": "[MY_COUNTRY_ISO_FULL_NAME]",
"isoAdminLanguages": [
{
"isoAlpha3": "[MY_LANGUAGE_ALPHA3_CODE]",
"isoAlpha2": "[MY_LANGUAGE_ALPHA2_CODE]",
"isoName": "[MY_LANGUAGE_ISO_NAME]",
"nativeName": "[MY_LANGUAGE_NAME]"
}
],
"unRegion": "Europe and Northern America/Europe/Southern Europe",
"currency": {
"numericCode": 978,
"code": "EUR",
"name": "Euro",
"minorUnits": 2
},
"wbRegion": {
"id": "ECS",
"iso2Code": "Z7",
"value": "Europe & Central Asia"
},
"wbIncomeLevel": {
"id": "HIC",
"iso2Code": "XD",
"value": "High income"
},
"callingCode": "[MY_COUNTRY_CALLING_CODE]",
"countryFlagEmoji": "[MY_COUNTRY_FLAG_EMOJI]",
"wikidataId": "[MY_WIKIDATA]",
"geonameId": [MY_GEONAME_ID],
"isIndependent": true
},
"location": {
"principalSubdivision": "[MY_REGION]",
"isoPrincipalSubdivision": "[MY_REGION_ISO]",
"isoPrincipalSubdivisionCode": "[MY_REGION_ISO_CODE]",
"continent": "Europa",
"continentCode": "EU",
"city": "[MY_CITY]",
"localityName": "[MY_LOCALITY]",
"postcode": "",
"latitude": [MY_LATITUDE_SHORT],
"longitude": [MY_LONGITUDE_SHORT],
"plusCode": "[MY_PLUS_CODE]",
"timeZone": {
"ianaTimeId": "[MY_TIMEZONE]",
"displayName": "[MY_TIMEZONE_NAME]",
"effectiveTimeZoneFull": "Central European Standard Time",
"effectiveTimeZoneShort": "CET",
"utcOffsetSeconds": 3600,
"utcOffset": "+01",
"isDaylightSavingTime": false,
"localTime": "2025-02-01T10:21:36.9293308"
},
"localityInfo": {
"administrative": [
{
"name": "[MY_COUNTRY_NAME]",
"description": "pa\u00eds del suroeste de Europa",
"isoName": "[MY_COUNTRY_ISO_NAME]",
"order": 2,
"adminLevel": 2,
"isoCode": "[MY_COUNTRY_CODE]",
"wikidataId": "Q29",
"geonameId": 2510769
},
{...},
{...}
],
"informative": [
{
"name": "Europa",
"description": "continente ba\u00f1ado principalmente por el Atl\u00e1ntico",
"isoName": "Europe",
"order": 1,
"isoCode": "EU",
"wikidataId": "Q46",
"geonameId": 6255148
},
{...},
{...}
]
}
},
"lastUpdated": "2025-02-01T04:44:13.6068279Z",
"network": {
"registry": "RIPE",
"registryStatus": "assigned",
"registeredCountry": "[MY_COUNTRY_CODE]",
"registeredCountryName": "[MY_COUNTRY_NAME]",
"organisation": "[MY_CARRIER]",
"isReachableGlobally": true,
"isBogon": false,
"bgpPrefix": "[MY_CARRIER_PREFIX]",
"bgpPrefixNetworkAddress": "[MY_CARRIER_NET_ADDRESS]",
"bgpPrefixLastAddress": "[MY_CARRIER_LAST_ADDRESS]",
"totalAddresses": 4096,
"carriers": [
{...info about carriers...}
],
"viaCarriers": [
{...info about via carrier...},
{...info about via carrier...},
{...info about via carrier...}
]
},
"confidence": "high",
"confidenceArea": [ // Array of points delimiting an area
{
"latitude": [LATITUDE],
"longitude": [LONGITUDE]
}
],
"securityThreat": "unknown",
"hazardReport": {
"isKnownAsTorServer": false,
"isKnownAsVpn": false,
"isKnownAsProxy": false,
"isSpamhausDrop": false,
"isSpamhausEdrop": false,
"isSpamhausAsnDrop": false,
"isBlacklistedUceprotect": false,
"isBlacklistedBlocklistDe": false,
"isKnownAsMailServer": false,
"isKnownAsPublicRouter": false,
"isBogon": false,
"isUnreachable": false,
"hostingLikelihood": 0,
"isHostingAsn": false,
"isCellular": false,
"iCloudPrivateRelay": false
}
}
Reverse Geocode Client
Availables here: https://www.bigdatacloud.com/reverse-geocoding
Requires an APIKey
, the latitude
and the longitude
.
Afortunatelly, we can get those values from the previous call.
Sample Request
# PowerShell
Clear-Host;
$MyBDCAPIKey = "[MY_BDC_API_KEY]";
$RootURL = "https://api-bdc.net";
$BaseURL = "${RootURL}/data";
$MyBDCRevGeoClientInfo = IRM "${BaseURL}/reverse-geocode-with-timezone?key=${MyBDCAPIKey}&latitude=${MyBDCLatitude}&longitude=${MyBDCLongitude}&localityLanguage=es"
$MyBDCRevGeoClientInfo;
$MyBDCRevGeoClientInfo | ConvertTo-Json -Depth 9;
Sample Response
{
"latitude": [MY_LATITUDE],
"longitude": [MY_LONGITUDE],
"localityLanguageRequested": "[MY_COUNTRY_CODE]",
"continent": "Europa",
"continentCode": "EU",
"countryName": "[MY_COUNTRY_NAME]",
"countryCode": "[MY_COUNTRY_CODE]",
"principalSubdivision": "[MY_REGION]",
"principalSubdivisionCode": "[MY_REGION_CODE]",
"city": "[MY_CITY]",
"locality": "[MY_LOCALITY]",
"postcode": "",
"plusCode": "[MY_PLUS_CODE]",
"administrative": [
{
"name": "[MY_COUNTRY_NAME]",
"description": "pa\u00eds del suroeste de Europa",
"isoName": "[MY_COUNTRY_ISO_NAME]",
"order": 2,
"adminLevel": 2,
"isoCode": "[MY_COUNTRY_ISO_CODE]",
"wikidataId": "[MY_WIKIDATA_ID]",
"geonameId": [MY_GEONAME_ID]
},
{...},
{...}
],
"informative": [
{
"name": "Europa",
"description": "continente ba\u00f1ado principalmente por el Atl\u00e1ntico",
"isoName": "Europe",
"order": 1,
"isoCode": "EU",
"wikidataId": "Q46",
"geonameId": 6255148
},
{...}
]
},
"timeZone": {
"ianaTimeId": "[MY_TIMEZONE]",
"displayName": "[MY_TIMEZONE_NAME]",
"effectiveTimeZoneFull": "Central European Standard Time",
"effectiveTimeZoneShort": "CET",
"utcOffsetSeconds": 3600,
"utcOffset": "+01",
"isDaylightSavingTime": false,
"localTime": "2025-02-01T10:30:04.4715676"
}
}
Phone and Email Verification
Availables here: https://www.bigdatacloud.com/phone-email-verification
Network Engineering
Availables here: https://www.bigdatacloud.com/network-engineering
ipapi.com
Service BIO:
- Web site: https://ipapi.com/
- Documentation: https://ipapi.com/quickstart | https://ipapi.com/documentation
- Susbscription type: Allow FREE, but subject to 100 "requests" per month.
APIKey EndPoints
Info about My IP
Requires only the APIKey
.
Sample Request
# PowerShell
Clear-Host;
$MyIpapiAPIKey = "[MY_IPAPI_API_KEY]";
$RootURL = "http://api.ipapi.com";
$BaseURL = "${RootURL}/api";
$MyIpapiInfo = IRM "${BaseURL}/check?access_key=${MyIpapiAPIKey}"
$MyIpapiInfo;
$MyIpapiInfo | ConvertTo-Json -Depth 9;
Sample Response
{
"ip": "[MY_IP]",
"type": "ipv4",
"continent_code": "EU",
"continent_name": "Europe",
"country_code": "[MY_COUNTRY_CODE]",
"country_name": "[MY_COUNTRY_ISO_NAME]",
"region_code": "[MY_REGION_CODE]",
"region_name": "[MY_REGION]",
"city": "[MY_CITY]",
"zip": "[MY_POBOX]",
"latitude": [MY_LATITUDE],
"longitude": [MY_LONGITUDE],
"msa": null,
"dma": null,
"radius": null,
"ip_routing_type": "fixed",
"connection_type": "dsl",
"location": {
"geoname_id": [MY_GEONAME_ID],
"capital": "[MY_CITY]",
"languages": [
{
"code": "[MY_COUNTRY_CODE]",
"name": "[MY_COUNTRY_NAME]",
"native": "[ONE_LANGUAGE]"
},
{
"code": "[MY_COUNTRY_CODE]",
"name": "[MY_COUNTRY_NAME]",
"native": "[OTHER_LANGUAGE]"
},
{...more languages...}
],
"country_flag": "[MY_COUNTRY_FLAG]",
"country_flag_emoji": "[MY_COUNTRY_FLAG_EMOJI]",
"country_flag_emoji_unicode": "[MY_COUNTRY_FLAG_EMOJI_UNICODE]",
"calling_code": "[MY_COUNTRY_CALLING_CODE]",
"is_eu": true
}
}
Info about ANY IP
Requires an APIKey
and an IP
.
We can retrieve our IP from here
Just, in the previous endpoin, instead of: /check
put any IP, for example our own IP: ${MyIpifyIP}
.
Sample Request
# PowerShell
Clear-Host;
$MyIpapiAPIKey = "[MY_IPAPI_API_KEY]";
$RootURL = "http://api.ipapi.com";
$BaseURL = "${RootURL}/api";
## My IP
$MyIpifyIP = ( IRM "https://api64.ipify.org?format=json" ).ip;
$MyIpifyIP;
$MyIpapiInfo = IRM "${BaseURL}/${MyIpifyIP}?access_key=${MyIpapiAPIKey}"
$MyIpapiInfo;
$MyIpapiInfo | ConvertTo-Json -Depth 9;
Sample Response
{
"ip": "[MY_IP]",
"type": "ipv4",
"continent_code": "EU",
"continent_name": "Europe",
"country_code": "[MY_COUNTRY_CODE]",
"country_name": "[MY_COUNTRY_ISO_NAME]",
"region_code": "[MY_REGION_CODE]",
"region_name": "[MY_REGION]",
"city": "[MY_CITY]",
"zip": "[MY_POBOX]",
"latitude": [MY_LATITUDE],
"longitude": [MY_LONGITUDE],
"msa": null,
"dma": null,
"radius": null,
"ip_routing_type": "fixed",
"connection_type": "dsl",
"location": {
"geoname_id": [MY_GEONAME_ID],
"capital": "[MY_CITY]",
"languages": [
{...several languages...}
],
"country_flag": "[MY_COUNTRY_FLAG]",
"country_flag_emoji": "[MY_COUNTRY_FLAG_EMOJI]",
"country_flag_emoji_unicode": "[MY_COUNTRY_FLAG_EMOJI_UNICODE]",
"calling_code": "[MY_COUNTRY_CALLING_CODE]",
"is_eu": true
}
}
AbstractAPI.com
Service BIO:
- Web site: https://www.abstractapi.com/
- Documentation: https://app.abstractapi.com/dashboard
- Susbscription type: Allow FREE, but subject to 1000 "credits" per month.
APIKey EndPoints
IP Geolocation
Requires an APIKey
and an optional IP
.
We can retrieve our IP from here
Sample Request
# PowerShell
Clear-Host;
$MyAAPIKey = "[MY_AAPI_API_KEY]";
$RootURL = "https://ipgeolocation.abstractapi.com";
$BaseURL = "${RootURL}/v1";
## Without IP
## ----------------
$MyAApiInfo = IRM "${BaseURL}/?api_key=${MyAAPIKey}"
$MyAApiInfo;
$MyAApiInfo | ConvertTo-Json -Depth 9;
## With any IP
## ----------------
## My IP
$MyIpifyIP = ( IRM "https://api64.ipify.org?format=json" ).ip;
$MyIpifyIP;
$MyAApiInfo = IRM "${BaseURL}/?api_key=${MyAAPIKey}&ip_address=${MyIpifyIP}"
$MyAApiInfo;
$MyAApiInfo | ConvertTo-Json -Depth 9;
Sample Response
{
"ip_address": "[MY_IP]",
"city": "[MY_CITY]",
"city_geoname_id": [MY_CITY_GEONAME_ID],
"region": "[MY_REGION]",
"region_iso_code": "[MY_REGION_ISO_CODE]",
"region_geoname_id": [MY_REGION_GEONAME_ID],
"postal_code": "[MY_POBOX]",
"country": "[MY_COUNTRY_ISO_NAME]",
"country_code": "[MY_COUNTRY_CODE]",
"country_geoname_id": [MY_COUNTRY_CODE_GEONAME_ID],
"country_is_eu": true,
"continent": "Europe",
"continent_code": "EU",
"continent_geoname_id": 6255148,
"longitude": [MY_LONGITUDE_SHORT],
"latitude": [MY_LATITUDE_SHORT],
"security": {
"is_vpn": false
},
"timezone": {
"name": "[MY_TIMEZONE]",
"abbreviation": "CET",
"gmt_offset": 1,
"current_time": "11:04:34",
"is_dst": false
},
"flag": {
"emoji": "[MY_COUNTRY_FLAG_EMOJI]",
"unicode": "[MY_COUNTRY_FLAG_EMOJI_UNICODE]",
"png": "[MY_COUNTRY_FLAG_PNG]",
"svg": "[MY_COUNTRY_FLAG_SVG]"
},
"currency": {
"currency_name": "Euros",
"currency_code": "EUR"
},
"connection": {
"autonomous_system_number": [MY_ASN],
"autonomous_system_organization": "[MY_ASN_NAME]",
"connection_type": null,
"isp_name": null,
"organization_name": null
}
}
ipify.com
Service BIO:
- Web site: https://www.ipify.org/
- Documentation: https://geo.ipify.org/docs
- Susbscription type: Allow FREE, but subject to 1000 "credits" per month.
FREE EndPoints
My IP
Sample Request
# PowerShell
Clear-Host;
$BaseURL = "https://api64.ipify.org?format=json";
$Response = IRM "${BaseURL}";
$Response;
$Response | ConvertTo-Json -Depth 9;
## My IP
$MyIpifyIP = $Response.ip;
$MyIpifyIP;
Sample Response
{
"ip": "[MY_IP]"
}
ipify.com only offers the "My IP" for free.
With the "subscription plan", more/extra information is available.
APIKey EndPoints
My Info
Sample Request
# PowerShell
Clear-Host;
$MyIpifyAPIKey = "[MY_IPIFY_API_KEY]";
$RootURL = "https://geo.ipify.org";
$BaseURL = "${RootURL}/api/v2";
$MyIpifyInfo = IRM "${BaseURL}/country?apiKey=${MyIpifyAPIKey}&ipAddress=${MyIpifyIP}"
$MyIpifyInfo;
$MyIpifyInfo | ConvertTo-Json -Depth 9;
Sample Response
{
"ip": "[MY_IP]",
"location": {
"country": "[MY_COUNTRY_CODE]",
"region": "[MY_REGION]",
"timezone": "+00:00"
},
"as": {
"asn": [MY_ASN],
"name": "[MY_ASN_NAME]",
"route": "[MY_ASN_NETWORK]",
"domain": "[MY_ASN_WEBSITE]",
"type": ""
},
"isp": "[MY_ASN_NAME]"
}
My Extended Info
Sample Request
# PowerShell
Clear-Host;
$MyIpifyAPIKey = "[MY_IPIFY_API_KEY]";
$RootURL = "https://geo.ipify.org";
$BaseURL = "${RootURL}/api/v2";
$MyIpifyExtendedInfo = IRM "${BaseURL}/country,city?apiKey=${MyIpifyAPIKey}&ipAddress=${MyIpifyIP}"
$MyIpifyExtendedInfo;
$MyIpifyExtendedInfo | ConvertTo-Json -Depth 9;
Sample Response
{
"ip": "[MY_IP]",
"location": {
"country": "[MY_COUNTRY]",
"region": "[MY_REGION]",
"city": "[MY_CITY]",
"lat": [MY_LATITUDE_SHORT],
"lng": [MY_LONGITUDE_SHORT],
"postalCode": "[MY_POBOX]",
"timezone": "+00:00",
"geonameId": [MY_GEONAME_ID]
},
"as": {
"asn": [MY_ASN],
"name": "[MY_ASN_NAME]",
"route": "[MY_ASN_NETWORK]",
"domain": "[MY_ASN_WEBSITE]",
"type": ""
},
"isp": "[MY_ASN_NAME]"
}
My Balance
Sample Request
# PowerShell
Clear-Host;
$MyIpifyAPIKey = "[MY_IPIFY_API_KEY]";
$RootURL = "https://geo.ipify.org";
$BaseURL = "${RootURL}/api/v2";
$MyIpifyBalance = IRM "${RootURL}/service/account-balance?apiKey=${MyIpifyAPIKey}"
$MyIpifyBalance;
$MyIpifyBalance | ConvertTo-Json -Depth 9;
Sample Response
{
"credits": [MY_REMAINING_CREDITS]
}
Top comments (0)