Today (Jun 8, 2017), we are announcing new output in our Whois API. It’s XML! A long time ago, we made a decision to support only JSON, but the time has come to also support XML. After all, when we first started out, it was on a website called get whois XML .com!
Although we have updated our documentation and our Console, the difference in the API request is very small. You just need to add &ip=&asxml at the end of your request to signal you want an XML output. So if you were using our JSON version, the switch is very simple.
What if you like JSON output?
If you really like JSON whois, there’s absolutely no change. We recommend you check our API documentation and code examples if you’ve never used our Whois API. Again, just keep in mind that if you want to get an XML output, make sure you have the XML ending in your request. If you want to get the whois in a JSON output, your whois request remains the same and should look as stated in our documentation:
http://api.whoapi.com/?domain=whoapi.com&r=whois&apikey=demokey
What about our other APIs?
If you are using any of our other APIs, and you would like to switch to the XML output, just follow the same advice! At the end of the request, make sure you include &asxml. You can find more information and example outputs on each page for every API that you use.
- Screenshot API in XML
- Domain Availability API in XML
- Email Blacklist API in XML
- Email Score API in XML
- Domain Score API in XML
- SSL API in XML
- Whois API in XML
Why introduce XML now?
One company specifically told us they signed up with a competitor because we didn’t have XML output. Three days later, voila, we have XML output. Below you can see how a Whois record in XML output looks like.
What is XML API?
XML and API are both acronyms, so let’s define them one by one. XML is short for Extensible Markup Language. API is short for Application Programming Interface. There is nothing much I can say or write that hasn’t already been said on Wikipedia but in short XML is… well, a markup language, which is somewhat different from a programming language. A markup language is a framework for explaining a whois record in a manner that is grammatically discernable from the text. In our case, it helps to make the whois record machine-readable (as opposed to human-readable). Interestingly, a programming language is a proper language that contains a bunch of guidelines used to create different sorts of results. Programming languages such as PHP, Ruby, and Javascript are used to make web applications such as domain checkers.
Another markup language you might have heard of is HTML which is short for Hypertext Markup Language.
We established that there are Whois XML APIs, there are Whois JSON APIs, but there are also Screenshot APIs in JSON and Screenshot APIs in XML. If you want to build an application that uses such APIs, you need to write them with a programing language.
How can you use a Whois XML API?
I wrote an entire article on what are the best ways you can use a Whois API. Using a Whois API with XML output, or Whois API with JSON output is virtually the same. You can build the exact same application with both outputs. If you are looking for ideas on how you can do it, check that article.