REST API Access Now Available

We recently released an often requested feature – API access to MxToolbox.  With the API, you can easily integrate MxToolBox directly in your own tools and website.

What is it?

The API is a RESTful Web Service.  Basically, you send a url to the site, and it will return the results in JSON format.  RESTFul services allow for simple testing.  For example, if you want to do a dns lookup on example.com, you go to

http://api.mxtoolbox.com/api/v1/lookup/dns/example.com/

with the following results:

    {
    "UID": "bca9f444-f28d-4d49-9368-2386d70e3034",
    "Command": "dns",
    "CommandArgument": "example.com",
    "TimeRecorded": "2013-10-11T10:40:21.7445287-05:00",
    "ReportingNameServer": "a.iana-servers.net",
    "TimeToComplete": "5101",
    "HasSubscriptions": false,
...
    ],
    "Passed": [
        {
            "ID": 305,
            "Name": "DNS Bad Glue Detected",
            "Info": "No Bad Glue Detected"
        },
    ]
...
}

You may notice that this information is almost exactly what you would get if you ran this in SuperTool:

http://mxtoolbox.com/supertool.aspx?action=dns:example.com

With the API, there is no longer a need to “scrape” the SuperTool results.

In all, the REST API has three functions/urls available

  • Lookup – as shown in the prior example, gives access to the SuperTool engine.
  • Monitor – access to the status of your current subscriptions, similar to the Monitors Tab in the Dashboard.
  • Usage – view the number of available API calls available to your subscription

The above links show example uses of each function.  In order to regulate usage, you are required to Request an API Key.  Each of the example links above include a “API Access Key” section with a button to request a key.  The api key is associated with your account.  Like all good things, we require a paid subscription to access the full power of the API.  The limits are defined in the  API Documentation.

To help with testing, we also allow all “example.com” lookups to be completed without an api key. This is why the above example works.  If, for example, you try navigating to http://api.mxtoolbox.com/api/v1/lookup/dns/mxtoolbox.com/ , you will get an “Invalid ApiKey” error because the argument is “mxtoolbox.com,” not “example.com.”  Please see the api documentation and examples for the proper way to use your ApiKey.

Use Cases

Customers have asked for this functionality for multiple reasons.  Usually it is to run a blacklist on demand from their own toolset.  The second most popular request is to get a “real time” version of their monitors.  We are excited to see what other uses customers have for the API.

The API is currently in BETA, so expect some slight changes as we determine the needs of our customer.  As always, we appreciate any feedback.