βWebsite Status API
Checks if a host is up or down.
Website Status API
POST https://tools.datalabs.net/upOrDown
Host: tools.datalabs.net
Content-Type: application/json
{
"key": "DATALABS_API_KEY", // Required - DataLabs API Key
"host": "example.com" // Required - Host to be checked
}import requests
api_key = "DATALABS_API_KEY"
tool = "upOrDown"
host = "example.com"
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