|
<h1>Introduction</h1>
<p>A simplified <b>Whoislookup API</b> with a <b>JSON</b> response. The API returns less information, but with better accuracy than other whois lookup services.</p>
<p>Created by <a href="http://jamesperet.com">James Peret</a>, based on the <a href="https://github.com/okor/whoiz">Whoiz</a> application by <a href="http://jasonormand.com/2012/06/10/a-free-whois-api/">Jason Ormand</a> and using the <a href="http://whoisrb.org/">Ruby Whois</a> gem.
<h2>Accessing the API</h2>
<p>Provide a <b>URL</b> for the <i>API</i> and get a nicely formatted <i>JSON</i> response with the domain information. You can query information in many diferent ways like directly thru the browser, with curl on the command line or with javascript. Here are some examples:</p>
<h4>Browser</h4>
<div hljs>http://whois.j1x.co/jamesperet.com</div>
<h4>curl</h4>
<div hljs>curl http://whois.j1x.co/jamesperet.com</div>
<h4>Angular JS Directive</h4>
<div hljs>
angular.module('ExampleApp', [])
.service('DomainLookup', [ '$http', function($http) {
domain = ""
this.domainLookup = function(url){
$http({
method: 'GET',
url: 'http://whois.j1x.co/' + url
}).success(function(data) {
console.log("Domain Lookup Successfull")
console.log(data)
domain = data;
return domain;
});
}
this.get = function() {
return domain;
}
}])
</div>
<h2>Query Options</h2>
<p>This are the options for querying the API:</p>
<ul>
<li> <code>url</code> - The domain url that will be queried. Omit the <code>http://www.</code>.</li>
<li> <code>&raw=true</code> - the <i>JSON</i> response will include a <i>raw</i> version of the data received by the <b>registrar</b></li>
<li> <code>&dev=true</code> - Only basic information and the *raw* version will be included in the *JSON* response. No parsing will be done with the data. This is useful for <b>debugging</b>b>.</li>
</ul>
<p>Example:</p>
<div hljs source="'http://whois.j1x.co/google.com&raw=true'"></div>
<h2>Example Domain Lookup response</h2>
<div hljs>
{
"domain": "jamesperet.com",
"owner": "James Peret",
"registrar": "eNom Inc.",
"expires_on": "2016-06-07T16:01:00.00Z",
"update_on": "2015-05-13 00:00:00 -0300",
"registered?": true,
"available?": false
}
</div>
<h2>Domain Support</h2>
<p>For now the supported domains are: <code>.com</code>, <code>.net</code>, <code>.com.br</code> and <code>.network</code>. Support for more domains will come in the future.</p>
<p>The queries for <code>.com.br</code> domains usually come with limited information because of the registrar's API call allowance.</p>
<p>There is also a bug where some <code>.com</code> domains return an error (ex: google.com).</p>
<div style="margin-bottom: 70px;"></div>
|