Skip to content

API

The same answers as JSON, without a key.

From a terminal

Requesting the site root with curl returns your address as plain text and nothing else, so it composes in a shell script.

$ curl ipaddress.gg
203.0.113.42

Endpoint

GET/api/plain

Your address as plain text, with a trailing newline. Nothing else.

curl ipaddress.gg
GET/api/ip

Your address with its routing origin and registry delegation, as JSON.

curl -s https://ipaddress.gg/api/ip
GET/api/ip/{address}

The same record for any IPv4 or IPv6 address.

curl -s https://ipaddress.gg/api/ip/8.8.8.8
GET/api/asn/{asn}

Holder, registry allocation and announced prefixes for an AS number.

curl -s https://ipaddress.gg/api/asn/15169
GET/api/dns?host={hostname}&type={type}

DNS records, resolved live. Omit type for every supported type.

curl -s 'https://ipaddress.gg/api/dns?host=example.com&type=MX'
GET/api/reverse-dns?ip={address}

PTR names for an address, with forward confirmation.

curl -s 'https://ipaddress.gg/api/reverse-dns?ip=8.8.8.8'
GET/api/whois?q={query}

RDAP record and raw WHOIS text for a domain, address or AS number.

curl -s 'https://ipaddress.gg/api/whois?q=example.com'
GET/api/blacklist?ip={address}

DNSBL status per list, with each list's own return code. Omit ip for your own.

curl -s 'https://ipaddress.gg/api/blacklist?ip=8.8.8.8'
POST/api/ports

Open ports on your own address. There is no way to name another target.

curl -sX POST https://ipaddress.gg/api/ports
GET/api/mac?q={address}

The vendor registered for a MAC address or OUI prefix, from the IEEE registry.

curl -s 'https://ipaddress.gg/api/mac?q=00:1A:2B:3C:4D:5E'
GET/api/ssl?host={hostname}

The TLS certificate a host serves, its chain, expiry and trust verdict.

curl -s 'https://ipaddress.gg/api/ssl?host=example.com'
GET/api/geo/cities?bbox={w,s,e,n}

Place names inside a map window, largest first. This is what the map labels itself from.

curl -s 'https://ipaddress.gg/api/geo/cities?bbox=28,40,30,41&limit=10'
GET/api/status

Dataset freshness and record counts. Used by the container healthcheck.

curl -s https://ipaddress.gg/api/status
Fair useThere is no key and no quota. Please cache what you fetch and keep bulk work to a rate a small server can serve.