Using the API

If you want to integrate the JSON results to your webpage, you might want to read more about JSONP.

Searching

Method
GET
URL
http://dotnul.com/api/time/:timestamp
Ouput for an IPv4
JSONP; example for http://dotnul.com/api/ip/80.92.78.192/19:
{
        "ipcalc": {
            "ip": "80.92.78.192",
            "ipv6": false,
            "size": 8192,
            "bits": "01010000010111000100111011000000",
            "network": "80.92.64.0",
            "broadcast": "80.92.95.255",
            "reverse": "192.78.92.80.in-addr.arpa"
        },
        "error": false
}
Ouput for an IPv6
JSONP; example for http://dotnul.com/api/ip/2001:b20::8/64:
{
        "ipcalc": {
            "ip": "2001:b20:0:4::2",
            "ipv6": true,
            "ip_uncompressed": "2001:0b20:0000:0004:0000:0000:0000:0002/64",
            "size": 18446744073709552000,
            "bits": "00100000000000010000101100100000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000010",
            "network": "2001:b20:0:4::",
            "network_uncompressed": "2001:0b20:0000:0004:0000:0000:0000:0000/64",
            "reverse": "2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.4.0.0.0.0.0.0.0.0.2.b.0.1.0.0.2.ip6.arpa"
        },
        "error": false
}
Response to errorneous query
{
    "ip": null,
    "message": "Application Exception ArgumentError: Invalid IP \"80.92.0\"",
    "error": true
}