Aller au contenu

API

Les mêmes réponses en JSON, sans clé.

Depuis un terminal

Un curl sur la racine du site renvoie votre adresse en texte brut et rien d'autre, de sorte qu'elle se compose dans un script shell.

$ curl ipaddress.gg
203.0.113.42

Point d'accès

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
Usage raisonnableIl n'y a ni clé ni quota. Mettez en cache ce que vous récupérez et gardez les traitements en masse à un rythme qu'un petit serveur peut soutenir.