RFC 9083 defines JSON Responses for the Registration Data Access Protocol (RDAP). RDAP is a replacement for WHOIS, providing structured data access for domain names, IP addresses, and AS numbers.
Enter a domain, IP address, ASN, or CIDR range to query:
There is also an API that returns the same results in JSON format, its endpoint is: /query?q=example.com&format=json
You can find the OpenAPI specification at /openapi.json