RDAP
The Registration Data Access Protocol is a standard way to query domain and IP registration data over HTTPS, returning structured JSON.
RDAP was designed to replace WHOIS. A client sends an HTTPS request to the registry or registrar and receives a JSON response with a consistent structure. For a domain the response includes status codes and event dates such as registration and expiry. For an IP range or ASN it identifies the allocation and the responsible registry.
Because the format is standardized, tools can read it without custom parsers for each registry. RDAP also supports access control, so registries can decide what a given requester may see, which matters for personal data.
Domain age and expiry come from registry events. They are reliable for how long a domain has existed in its current registration, and less informative about who runs it, since registrant details are often redacted.