APIs

You can use this whois service programatically from your applications.

Make a request

To make a whois lookup for domain example.org, send a GET request to the following URL:

    http://whomsy.com/api/example.org

Response parameters

The default response is in JSON format, but you have a choice between the JSON, XML and HTML. To set the output format use the ?output parameter, like so:

    http://whomsy.com/api/example.org?output=json // default
    http://whomsy.com/api/example.org?output=xml
    http://whomsy.com/api/example.org?output=html

An example JSON response is structured like:

    {
        "domain":"example.org",
        "type":"success",
        "message":"information\nabout the\ndomain"
    }

If the lookup failed, the "type" will say "error".

Callbacks

The JSON output also supports a callback function:

    http://whomsy.com/api/example.org?callback=myFunc

This will return a response like:

    myFunc({"domain":"example.org","type":"success","message":"..."})