Chapter 1. Data Source Handbook
Websites
The whois
Unix command is still a workhorse,
and I’ve found the web service a decent alternative, too. You can get
the basic registration information for any website. In recent years,
some owners have chosen “private” registration, which hides their
details from view, but in many cases you’ll see a name, address,
email, and phone number for the person who registered the site. You
can also enter numerical IP addresses here and get data on the
organization or individual that owns that server.
Unfortunately the terms of service of most providers forbid automated gathering and processing of this information, but you can craft links to the Domain Tools site to make it easy for your users to access the information:
<a href="http://whois.domaintools.com/www.google.com">Info for www.google.com</a>
There is a commercial API available through whoisxmlapi.com that offers a JSON interface and bulk downloads, which seems to contradict the terms mentioned in most WHOIS results. It costs $15 per thousand queries. Be careful, though; it requires you to send your password as a nonsecure URL parameter, so don’t use a valuable one:
curl "http://www.whoisxmlapi.com/whoisserver/WhoisService?\ domainName=oreilly.com&outputFormat=json&userName=<username>&password=<password>" {"WhoisRecord": { "createdDate": "26-May-97", "updatedDate": "26-May-10", "expiresDate": "25-May-11", "registrant": { "city": "Sebastopol", "state": "California", "postalCode": "95472", "country": ...
Get Data Source Handbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.