ipify API
ipify is a free, unlimited API that returns your public IP address as text, JSON or JSONP. No key, no rate limit, IPv4 and IPv6 endpoints. Live curl example.
Endpoint tested and returned HTTP 200 on 2026-08-19
What is the ipify API?
ipify is a free API that returns the public IP address of whoever calls it. It requires no API key, imposes no rate limit, and can respond in plain text, JSON or JSONP depending on the format parameter.
ipify does exactly one thing and does it without conditions: it tells you the public IP address the request came from. There is no key, no quota and no signup, and the service has run reliably for over a decade, which is why it appears in so many deployment scripts and health checks.
Because it reflects the address the server actually saw, it is the standard way to discover the outbound IP of a machine sitting behind NAT, a container network or a cloud load balancer — something the machine itself cannot determine locally.
Quick facts
- Base URL
https://api.ipify.org- Authentication
- No key and no registration.
- Rate limit
- None published. The service explicitly advertises no rate limiting.
- Pricing
- Free and unlimited, including commercial use.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the ipify API
Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.
1. Get the caller's public IP as JSON
GET https://api.ipify.org?format=json
curl 'https://api.ipify.org?format=json'const res = await fetch("https://api.ipify.org?format=json");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://api.ipify.org?format=json", timeout=20)
res.raise_for_status()
print(res.json()){
"ip": "119.155.18.184"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
format | string | Optional | `json` or `jsonp`. Omit entirely for plain text. json |
callback | string | Optional | Callback function name, used only with `format=jsonp`. getIP |
Response fields
ipstring- The public IP address of the caller. Plain text mode returns this bare, with no JSON wrapper.
What you can build with the ipify API
- Discover a server's outbound IP from inside a container or behind NAT
- Add the current IP to a firewall or database allowlist from a deploy script
- Show users their own IP on a network diagnostics page
- Detect whether a VPN or proxy is active by comparing expected and actual IPs
Common errors and how to fix them
Empty or truncated body
Almost always a client-side timeout rather than an API fault.
Fix: Set a sensible timeout and retry once; the endpoint itself is extremely stable.
ipify API — frequently asked questions
How do I get my public IP address with curl?
Run `curl 'https://api.ipify.org?format=json'` for JSON, or `curl https://api.ipify.org` for the bare address as plain text with no wrapper.
Does ipify have a rate limit?
No. ipify advertises no rate limiting and no key requirement, which is unusual among public APIs and makes it safe to call from automated scripts.
Can ipify return an IPv6 address?
Yes. Use `api64.ipify.org` to get IPv6 when available and fall back to IPv4 otherwise. The main `api.ipify.org` host returns IPv4.
Does ipify tell me the location of an IP?
No. It only reflects the caller's address. For city, country and ISP data, use an IP geolocation API such as ip-api or ipwhois.
Tools that pair with this API
ipify is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.