Best Whois Parser

I went through a bunch of different whois parsers trying to find the most accurate. Many of them weren’t able to correctly parse the new TLDs. But one python project seemed to do the best. Pythonwhois was the best one that I tested. I believe I tried out about 6 of the top projects I could find. I also looked at the whois API services out there but found them to be too pricey. I was mainly looking to manage expiration dates of a large domain portfolio. Pythonwhois also comes with a nice command line program which emits json, which was nice since I didn’t want to use python in my project.

Install on Ubuntu

apt-get install pip
pip install pythonwhois

Run Whois on netflix.com into json array

/usr/local/bin/pwhois --json netflix.com

Output

{
  "status": [
    "clientDeleteProhibited https:\/\/icann.org\/epp#clientDeleteProhibited",
    "clientTransferProhibited https:\/\/icann.org\/epp#clientTransferProhibited",
    "clientUpdateProhibited https:\/\/icann.org\/epp#clientUpdateProhibited",
    "serverDeleteProhibited https:\/\/icann.org\/epp#serverDeleteProhibited",
    "serverTransferProhibited https:\/\/icann.org\/epp#serverTransferProhibited",
    "serverUpdateProhibited https:\/\/icann.org\/epp#serverUpdateProhibited"
  ],
  "updated_date": [
    "2015-11-19T21:26:25"
  ],
  "contacts": {
    "admin": null,
    "tech": null,
    "registrant": null,
    "billing": null
  },
  "nameservers": [
    "ns-1372.awsdns-43.org",
    "ns-1984.awsdns-56.co.uk",
    "ns-659.awsdns-18.net",
    "ns-81.awsdns-10.com"
  ],
  "expiration_date": [
    "2019-11-10T05:00:00"
  ],
  "emails": [
    "[email protected]"
  ],
  "raw": [
    "   Domain Name: NETFLIX.COM\n   Registry Domain ID: 1404215_DOMAIN_COM-VRSN\n   Registrar WHOIS Server: whois.markmonitor.com\n   Registrar URL: http:\/\/www.markmonitor.com\n   Updated Date: 2015-11-19T21:26:25Z\n   Creation Date: 1997-11-11T05:00:00Z\n   Registry Expiry Date: 2019-11-10T05:00:00Z\n   Registrar: MarkMonitor Inc.\n   Registrar IANA ID: 292\n   Registrar Abuse Contact Email: [email protected]\n   Registrar Abuse Contact Phone: +1.2083895740\n   Domain Status: clientDeleteProhibited https:\/\/icann.org\/epp#clientDeleteProhibited\n   Domain Status: clientTransferProhibited https:\/\/icann.org\/epp#clientTransferProhibited\n   Domain Status: clientUpdateProhibited https:\/\/icann.org\/epp#clientUpdateProhibited\n   Domain Status: serverDeleteProhibited https:\/\/icann.org\/epp#serverDeleteProhibited\n   Domain Status: serverTransferProhibited https:\/\/icann.org\/epp#serverTransferProhibited\n   Domain Status: serverUpdateProhibited https:\/\/icann.org\/epp#serverUpdateProhibited\n   Name Server: NS-1372.AWSDNS-43.ORG\n   Name Server: NS-1984.AWSDNS-56.CO.UK\n   Name Server: NS-659.AWSDNS-18.NET\n   Name Server: NS-81.AWSDNS-10.COM\n   DNSSEC: unsigned\n   URL of the ICANN Whois Inaccuracy Complaint Form: https:\/\/www.icann.org\/wicf\/\n>>> Last update of whois database: 2017-11-15T19:04:48Z <<<\n\nFor more information on Whois status codes, please visit https:\/\/icann.org\/epp\n\nNOTICE: The expiration date displayed in this record is the date the\nregistrar's sponsorship of the domain name registration in the registry is\ncurrently set to expire. This date does not necessarily reflect the expiration\ndate of the domain name registrant's agreement with the sponsoring\nregistrar.  Users may consult the sponsoring registrar's Whois database to\nview the registrar's reported date of expiration for this registration.\n\nTERMS OF USE: You are not authorized to access or query our Whois\ndatabase through the use of electronic processes that are high-volume and\nautomated except as reasonably necessary to register domain names or\nmodify existing registrations; the Data in VeriSign Global Registry\nServices' (\"VeriSign\") Whois database is provided by VeriSign for\ninformation purposes only, and to assist persons in obtaining information\nabout or related to a domain name registration record. VeriSign does not\nguarantee its accuracy. By submitting a Whois query, you agree to abide\nby the following terms of use: You agree that you may use this Data only\nfor lawful purposes and that under no circumstances will you use this Data\nto: (1) allow, enable, or otherwise support the transmission of mass\nunsolicited, commercial advertising or solicitations via e-mail, telephone,\nor facsimile; or (2) enable high volume, automated, electronic processes\nthat apply to VeriSign (or its computer systems). The compilation,\nrepackaging, dissemination or other use of this Data is expressly\nprohibited without the prior written consent of VeriSign. You agree not to\nuse electronic processes that are automated and high-volume to access or\nquery the Whois database except as reasonably necessary to register\ndomain names or modify existing registrations. VeriSign reserves the right\nto restrict your access to the Whois database in its sole discretion to ensure\noperational stability.  VeriSign may restrict or terminate your access to the\nWhois database for failure to abide by these terms of use. VeriSign\nreserves the right to modify these terms at any time.\n\nThe Registry database contains ONLY .COM, .NET, .EDU domains and\nRegistrars.\n"
  ],
  "whois_server": [
    "whois.markmonitor.com"
  ],
  "registrar": [
    "MarkMonitor Inc."
  ],
  "creation_date": [
    "1997-11-11T05:00:00"
  ],
  "id": [
    "1404215_DOMAIN_COM-VRSN"
  ]
}

Leave a Reply

Your email address will not be published. Required fields are marked *