πGeoIP Location API
Provides the location for a provided host/IP address.
GeoIP Location API
POST https://tools.datalabs.net/geoIP
Host: tools.datalabs.net
Content-Type: application/json
{
"key": "DATALABS_API_KEY", // Required - DataLabs API Key
"host": "22.22.22.22" // Required - IP to be checked
}import requests
api_key = "DATALABS_API_KEY"
tool = "geoIP"
host = "22.22.22.22"
url = f"https://tools.datalabs.net/{tool}?key={api_key}&host={host}"
headers = {
'Host': 'tools.datalabs.net'
}
response = requests.get(url, headers=headers)
try:
response_data = response.json()
except ValueError:
response_data = response.text
print(response_data)Last updated