WHOIS is the de-facto standard or protocol for querying domain name information. This can be treated as a directory of domain ownership. Unfortunately not all domains can be accessed with all the ownership information since some TLD (Top Level Domains) maintainers do not offer such functionality. Some obfuscate the content or offer few or no information.
What does the WHOIS information contain?
The WHOIS information contains information on who owns the domain (administrative contact), the technical contact and actual billing person.
To obtain WHOIS information one has to query with the domain name by opening a socket on TCP port 43. Such task cannot be done without a 3rd party tool (like Netumo)
Despite WHOIS being a very simple protocol, the lack of a well-structured specification transforms it to one of the most complex protocol to work with. There are various structures and a WHOIS record is mainly a chunk of normally human readable text. This makes it more difficult to parse via code.
Netumo lets you query WHOIS information for free. Click on the following link: https://www.netumo.app/tools/whois to give it a go.