{
    "name": "WHOIS Lookup API",
    "message": "Add the \"domain\" parameter to look up a domain, an IP address or an AS number.",
    "request": {
        "method": "GET",
        "url": "https://mdjhs.com/whois/api.php?domain=example.com"
    },
    "parameters": {
        "domain": "Required. A domain name or URL (example.com), an IPv4/IPv6 address (8.8.8.8) or an AS number (AS15169). \"query\" and \"ip\" also work as names.",
        "raw": "Optional. raw=1 adds the raw WHOIS text to the response. Default: 0.",
        "format": "Optional. \"json\" (default) or \"text\" for a plain-text WHOIS record."
    },
    "examples": [
        "https://mdjhs.com/whois/api.php?domain=google.com",
        "https://mdjhs.com/whois/api.php?domain=8.8.8.8",
        "https://mdjhs.com/whois/api.php?domain=AS15169",
        "https://mdjhs.com/whois/api.php?domain=github.com&raw=1",
        "https://mdjhs.com/whois/api.php?domain=wikipedia.org&format=text"
    ],
    "response_fields": {
        "type": "domain, ip or asn.",
        "domain": {
            "registered / available": "A domain is registered when it has a WHOIS record or DNS records (name servers, A, AAAA or MX). It is available only when neither exists.",
            "whois_record": "false when the domain is registered (it has DNS records) but publishes no WHOIS record.",
            "fields": "domain, registry_domain_id, registrar{name,iana_id,url,abuse_email,abuse_phone}, dates{created,updated,expires,transferred}, days_until_expiry, domain_age_days, status[], nameservers[], dnssec, dns{ns,a,aaaa,mx,txt,spf,dmarc}",
            "contact_status": "public, protected or unavailable. \"protected\" means the owner hides their details (privacy service or registrar). \"unavailable\" means the details could not be retrieved right now (a lookup problem, try again).",
            "contacts": "registrant, admin, tech, billing: name, organization, email, phone, fax, street, city, state, postal_code, country. \"protected\": true marks a protected contact."
        },
        "ip": "ip, version, hostname, network{name,handle,range,cidr,type,country,parent_handle}, organization, asn{number,name,prefix}, dates, status, abuse{email,phone}, contacts. Private and reserved addresses return \"reserved\": true.",
        "asn": "asn, name, handle, range, as_type, country, organization, dates, status, abuse, contacts.",
        "raw_whois": "Only with raw=1."
    },
    "status_codes": {
        "200": "OK. Also returned for unregistered domains: check \"registered\".",
        "404": "No WHOIS record for this IP address or AS number.",
        "405": "Method not allowed.",
        "422": "Invalid domain, IP address or AS number.",
        "429": "Rate limit exceeded. See the Retry-After header.",
        "502": "Lookup failed. Try again later."
    },
    "rate_limit": "30 requests per minute per IP."
}