🦁 IP Animals
⚑ For developers

The IP Animals API

Your public IP address as a bare string β€” no API key, no signup, no JSON to parse unless you want it. Point curl at it, read one line, done. The same friendly zoo, now scriptable.

$ curl https://ip.ipanimals.com …

Checking the live endpoint…

Endpoints

RequestReturns
curl https://ip.ipanimals.comYour connecting IP (v4 or v6)
curl https://ipv4.ipanimals.comAlways IPv4
curl https://ipv6.ipanimals.comAlways IPv6
curl https://ip.ipanimals.com?format=json{"ip":"…","family":"IPv4"}
Forcing a family: a URL path can't change the transport β€” by the time the request lands, your connection is already IPv4 or IPv6. So to guarantee one, use the dedicated ipv4. / ipv6. hosts (their DNS is single-family) or curl -4 / curl -6.

Use it anywhere

Shell

# your public IP into a variable
MYIP=$(curl -s https://ip.ipanimals.com)

# force IPv4 or IPv6
curl -s https://ipv4.ipanimals.com
curl -s https://ipv6.ipanimals.com

JavaScript

const ip = await fetch('https://ip.ipanimals.com').then(r => r.text());
// or structured:
const { ip: myIp, family } =
  await fetch('https://ip.ipanimals.com?format=json').then(r => r.json());

Python

import urllib.request
ip = urllib.request.urlopen("https://ip.ipanimals.com").read().decode().strip()

Good to know

πŸ› οΈ Browse the network tools β†’