{"id":27433486,"url":"https://github.com/mpcodewriter21/whois21","last_synced_at":"2026-01-24T13:54:52.144Z","repository":{"id":54639294,"uuid":"521734935","full_name":"MPCodeWriter21/whois21","owner":"MPCodeWriter21","description":"whois21 is a simple and easy to use python package that lets you easily query whois information of a domain/IP.","archived":false,"fork":false,"pushed_at":"2024-12-07T17:21:33.000Z","size":142,"stargazers_count":29,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T17:16:36.559Z","etag":null,"topics":["asn","domain","ip","python","python-package","python3","rdap","whois"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MPCodeWriter21.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-05T18:10:29.000Z","updated_at":"2024-12-07T17:21:13.000Z","dependencies_parsed_at":"2023-09-24T16:22:37.347Z","dependency_job_id":"925fe8e7-73d0-4713-9964-de64344044fa","html_url":"https://github.com/MPCodeWriter21/whois21","commit_stats":{"total_commits":20,"total_committers":2,"mean_commits":10.0,"dds":"0.050000000000000044","last_synced_commit":"33947ded1a680376a7316283d58fcd1d7acca502"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MPCodeWriter21%2Fwhois21","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MPCodeWriter21%2Fwhois21/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MPCodeWriter21%2Fwhois21/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MPCodeWriter21%2Fwhois21/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MPCodeWriter21","download_url":"https://codeload.github.com/MPCodeWriter21/whois21/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248923740,"owners_count":21183953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asn","domain","ip","python","python-package","python3","rdap","whois"],"created_at":"2025-04-14T17:16:34.352Z","updated_at":"2026-01-24T13:54:52.137Z","avatar_url":"https://github.com/MPCodeWriter21.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"whois21\n=====\n\n![version](https://img.shields.io/pypi/v/whois21)\n![stars](https://img.shields.io/github/stars/MPCodeWriter21/whois21)\n![forks](https://img.shields.io/github/forks/MPCodeWriter21/whois21)\n![repo size](https://img.shields.io/github/repo-size/MPCodeWriter21/whois21)\n[![CodeFactor](https://www.codefactor.io/repository/github/mpcodewriter21/whois21/badge)](https://www.codefactor.io/repository/github/mpcodewriter21/whois21)\n\nWHOIS21 is a simple and easy to use python package that lets you easily query whois\ninformation of a domain.\n\nFeatures\n--------\n\n### WHOIS\n\n+ Query whois information of a TLD from various whois servers and parse the results.\n+ Get the Registration Information of a domain from different RDAP servers and parse the\n  results.\n+ Get IP information from ip-api.com.\n+ Any idea? Feel free to\n  [open an issue](https://github.com/MPCodeWriter21/whois21/issues) or submit a pull\n  request.\n\n![Issues](https://img.shields.io/github/issues/MPCodeWriter21/whois21)\n![contributors](https://img.shields.io/github/contributors/MPCodeWriter21/whois21)\n\nInstallation\n------------\n\nWell, this is a python package so the first thing you need is python.\n\nIf you don't have python installed, please visit [Python.org](https://python.org) and\ninstall the latest version of python based on your OS.\n\nThen you can install whois21 using pip module:\n\n```shell\n# Use this command to get the latest version from pypi.org and install it automatically\npython -m pip install whois21 -U\n\n# OR\n# Download the release file from GitHub: https://github.com/MPCodeWriter21/whois21/releases\n# And install it using this command\npip install whois21-x.x.x.tar.gz\n```\n\nOr you can clone [the repository](https://github.com/MPCodeWriter21/whois21) and run:\n\n```shell\npython -m build .\n```\n\n### Dependencies\n\n+ [requests](https://requests.readthedocs.io/en/master/): Used for:\n  + Downloading list of whois and RDAP servers.\n  + Downloading RDAP information.\n+ [importlib_resources](https://importlib-resources.readthedocs.io/en/latest/): Used for:\n  + Getting the path to the whois21 package installation directory(for saving server lists).\n+ [chardet](https://pypi.org/project/chardet/): Used for:\n  + Detecting the encoding of the whois response.\n+ [log21](https://github.com/MPCodeWriter21/log21): Used for:\n  + Colorized Logging.\n  + Printing collected data in pprint or tree format.\n+ [os](https://docs.python.org/3/library/os.html) (A core python module): Used for:\n  + Working with files and directories.\n+ [socket](https://docs.python.org/3/library/socket.html) (A core python module): Used for:\n  + Establishing TCP connection to the whois server.\n+ [json](https://docs.python.org/3/library/json.html) (A core python module): Used for:\n  + Parsing JSON data from RDAP servers.\n  + Parsing RDAP server list.\n  + Saving collected whois or/and RDAP data to a file.\n  + Loading some package data from a file.\n+ [datetime](https://docs.python.org/3/library/datetime.html) (A core python module): Used for:\n  + Converting Creation/Updated/Expiration date to a usable python datetime object.\n+ [ipaddress](https://docs.python.org/3/library/ipaddress.html) (A core python module): Used for:\n  + Validating IPv4 and IPv6 addresses.\n+ [typing](https://docs.python.org/3/library/typing.html) (A core python module): Used for:\n  + Type checking.\n  + Type hinting.\n+ [re](https://docs.python.org/3/library/re.html) (A core python module): Used for:\n  + Matching date-time strings with regular expressions.\n\nChanges\n-------\n\n### 1.4.7\n\n+ Update `log21` to v3.0.0\n+ Update LICENSE\n\nUsage Examples\n---------------\n\n### CLI Examples\n\n+ Example 1: Query whois information of google.com\n\n```shell\n# -v : verbose mode\nwhois21 -v google.com\n```\n\n+ Example 2: Query whois information of 3 domains and save the results to a directory\n\n```shell\n# -R : saves the results as raw text\n# -np: avoids printing the results to the screen\n# -o results: saves the results to `./results` directory \nwhois21 -R -np -o results google.com facebook.com pinterest.com\n```\n\n+ Example 3: Query whois information of 3 IPs and save the results to a directory\n\n```shell\n# Options explained in the examples above\nwhois21 -R -np -v -o results 1.1.1.1 157.240.20.174 64.91.226.82\n```\n\n+ Example 4: Query RDAP information of domains and IPs and save the results to a file\n\n```shell\n# -r: Gets the RDAP information of the queried domains and IPs\nwhois21 -np -o results -o results -r microsoft.com python.org 140.82.121.3 185.147.178.13\n```\n\n### Python Code Examples\n\n+ Example 1: Query whois information of GitHub.com using WHOIS class.\n\n```python\n# First step is to import the package\nimport whois21\n\nquery = 'github.com'\n\n# Second step is to create an instance of the WHOIS class\nwhois = whois21.WHOIS(query)\n\n# Third step is to check if the operation was successful\nif not whois.success:\n    print(whois.error)\n    exit()\n\n# And basically you are done!\n# Now you can print the results\nimport log21  # I use log21 to print the results in a cool way 8D\n\n# Print the results in a nice way\n# PPrint the dictionary\nlog21.pprint(whois.whois_data)\n# Tree-Print the dictionary\nlog21.tree_print(whois.whois_data)\n\n# Or you can print the results in as raw text\nprint(whois.raw.decode('utf-8'))\n\n# Or you can access each part of the results individually\nprint(f'Creation date   : {whois.creation_date}')\nprint(f'Expiration date : {whois.expires_date}')\nprint(f'Updated date    : {whois.updated_date}')\n\n```\n\nAbout\n-----\n\nAuthor: CodeWriter21 (Mehrad Pooryoussof)\n\nGitHub: [MPCodeWriter21](https://github.com/MPCodeWriter21)\n\nTelegram Channel: [@CodeWriter21](https://t.me/CodeWriter21)\n\nAparat Channel: [CodeWriter21](https://www.aparat.com/CodeWriter21)\n\n### License\n\n![License](https://img.shields.io/github/license/MPCodeWriter21/whois21)\n\n[apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\n### Donate\n\nIn order to support this project you can donate some crypto of your choice 8D\n\n[Donate Addresses](https://github.com/MPCodeWriter21/whois21/blob/master/DONATE.md)\n\nOr if you can't, simply give [this project](https://github.com/MPCodeWriter21/whois21)\none star on GitHub :)\n\nReferences\n----------\n\n+ WHOIS (Wikipedia): [https://en.wikipedia.org/wiki/WHOIS](https://en.wikipedia.org/wiki/WHOIS)\n+ Domains: [https://www.iana.org/domains/root/db/](https://www.iana.org/domains/root/db/)\n+ Registration Data Access Protocol (RDAP) (\n  Wikipedia): [https://en.wikipedia.org/wiki/Registration_Data_Access_Protocol](https://en.wikipedia.org/wiki/Registration_Data_Access_Protocol)\n+ RDAP Response Profile (\n  PDF): [https://www.icann.org/en/system/files/files/rdap-response-profile-15feb19-en.pdf](https://www.icann.org/en/system/files/files/rdap-response-profile-15feb19-en.pdf)\n+ RFC 9224 Finding the Authoritative Registration Data Access Protocol (RDAP) Service\n  [https://www.rfc-editor.org/rfc/rfc9224.html](https://www.rfc-editor.org/rfc/rfc9224.html)\n+ Registration Data Access Protocol (RDAP) Query\n  Format: [https://www.rfc-editor.org/rfc/rfc7482.html](https://www.rfc-editor.org/rfc/rfc7482.html)\n+ Registration Data Access Protocol (RDAP) Object\n  Tagging: [https://www.rfc-editor.org/rfc/rfc8521.html](https://www.rfc-editor.org/rfc/rfc8521.html)\n+ Finding the Authoritative Registration Data (RDAP)\n  Service: [https://www.rfc-editor.org/rfc/rfc7484.html](https://www.rfc-editor.org/rfc/rfc7484.html)\n+ JSON Responses for the Registration Data Access Protocol (RDAP):\n  [https://www.rfc-editor.org/rfc/rfc7483](https://www.rfc-editor.org/rfc/rfc7483)\n+ Registration Data Access Protocol (RDAP) Partial\n  Response: [https://www.rfc-editor.org/rfc/rfc8982.html](https://www.rfc-editor.org/rfc/rfc8982.html)\n+ vCard Format\n  Specification: [https://www.rfc-editor.org/rfc/rfc6350.txt](https://www.rfc-editor.org/rfc/rfc6350.txt)\n+ vCard (Wikipedia): [https://en.wikipedia.org/wiki/VCard](https://en.wikipedia.org/wiki/VCard)\n+ Notes on vCard, LDIF and mappings to\n  RDF: [https://www.w3.org/2002/12/cal/vcard-notes.html](https://www.w3.org/2002/12/cal/vcard-notes.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpcodewriter21%2Fwhois21","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpcodewriter21%2Fwhois21","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpcodewriter21%2Fwhois21/lists"}