{
    "name": "IPAddress.to API",
    "version": "1.1",
    "docs": "https://ipaddress.to/api/docs/",
    "endpoints": [
        {
            "path": "/api/lookup/{ip_or_hostname}",
            "method": "GET",
            "description": "Geolocation and network info for an IP address or hostname. Returns nested location/asn/company objects plus connection flags (is_vpn, is_proxy, is_tor, is_hosting).",
            "examples": [
                "/api/lookup/8.8.8.8",
                "/api/lookup/google.com",
                "/api/lookup/my",
                "/api/lookup/my?fields=location.country_code,location.currency"
            ],
            "query": {
                "fields": "Optional comma-separated list of fields to return (dotted paths, e.g. location.country_code)."
            },
            "embed": "https://ipaddress.to/embed/v1/ (script tag for web pages, documented at https://ipaddress.to/embed/)"
        },
        {
            "path": "/api/whois/{ip_or_domain}",
            "method": "GET",
            "description": "WHOIS registration data for an IP address or domain name.",
            "examples": [
                "/api/whois/google.com",
                "/api/whois/1.1.1.1"
            ]
        },
        {
            "path": "/api/resolve/{hostname}",
            "method": "GET",
            "description": "DNS resolution for a hostname. Returns A, AAAA, and CNAME records with reverse lookups.",
            "examples": [
                "/api/resolve/github.com",
                "/api/resolve/ipv6.google.com"
            ]
        },
        {
            "path": "/api/dns/{type}/{domain}",
            "method": "GET",
            "description": "DNS propagation checker. Queries 40 global DNS servers and streams results as NDJSON. Optionally query a single server with ?server=IP.",
            "types": [
                "A",
                "AAAA",
                "CNAME",
                "MX",
                "NS",
                "TXT",
                "SOA",
                "PTR",
                "SRV",
                "CAA"
            ],
            "examples": [
                "/api/dns/a/google.com",
                "/api/dns/mx/example.com",
                "/api/dns/a/example.com?server=8.8.8.8"
            ]
        },
        {
            "path": "/api/score/{ip_or_hostname}",
            "method": "GET",
            "description": "IP fraud score and reputation analysis. Returns a 0-100 risk score, VPN provider detection, threat blocklist checks, and risk factors.",
            "examples": [
                "/api/score/8.8.8.8",
                "/api/score/1.1.1.1",
                "/api/score/my"
            ]
        },
        {
            "path": "/api/email/{email_or_domain}",
            "method": "GET",
            "description": "Email auth score (0-100) for any email address or domain. Checks MX, SPF, DMARC, disposable/throwaway status and role-based mailboxes. No query returns a sample of known disposable domains.",
            "examples": [
                "/api/email/you@gmail.com",
                "/api/email/github.com",
                "/api/email/mailinator.com"
            ]
        }
    ]
}