Skip to content

Networks

mte edited this page May 31, 2022 · 4 revisions

Endpoints for network tools like IP lookups etc

Current Available Endpoints:

  • /network/info - Location, hostname, post code, timezone + more
  • [*] /network/asn - ASN, name, country, n⁰ of IPs + more
  • [*] /network/domains - Number+list of domains hosted on an IP
  • [*] /network/privacy - VPN, PROXY, TOR, HOSTING, RELAY

Soon Available E‍ndpoints:

​​ ​​ ​​


Notes:

  • all [*] marked endpoints have higher ratelimits.
  • all endpoints accept GET and POST.
  • ip to use is retrieved from URL parameter (/network/info?ip=1.1.1.1), from json (json={'ip':'1.1.1.1'}), or from the request's executor ‍‍​ ​​ ​

Python examples

Get info about an IP address

import requests

data = {
    'ip':'1.1.1.1'
}

# Method 1: req = requests.post('https://utilities.tk/network/info', json=data) <- uses ip from json
# Method 2: req = requests.post('https://utilities.tk/network/info')            <- uses ip that sent the request (not recommended for [*] marked endpoints)
# Method 3: req = requests.get('https://utilities.tk/network/info?ip=1.1.1.1') <- uses ip from url parameter

print(req.status_code)
print(req.text)

Output:

200

{
  "ip": "1.1.1.1", 
  "hostname": "one.one.one.one", 
  "anycast": true, 
  "city": "Los Angeles", 
  "region": "California", 
  "country": "US", 
  "loc": "34.0522,-118.2437", 
  "org": "AS13335 Cloudflare, Inc.", 
  "postal": "90076", 
  "timezone": "America/Los_Angeles"
}

​​ ​​ ​​

Get privacy info about an IP address

import requests

data = {
    'ip':'1.1.1.1'
}

# Method 1: req = requests.post('https://utilities.tk/network/privacy', json=data) <- uses ip from json
# Method 2: req = requests.post('https://utilities.tk/network/privacy')            <- uses ip that sent the request (not recommended for [*] marked endpoints)
# Method 3: req = requests.get('https://utilities.tk/network/privacy?ip=1.1.1.1') <- uses ip from url parameter

print(req.status_code)
print(req.text)

Output:

200

{
    "data": {
        "hosting": true,
        "proxy": false,
        "relay": false,
        "service": "",
        "tor": false,
        "vpn": false
    },
    "input": "1.1.1.1"
}

output may vary depending on IP.

Clone this wiki locally