TL;DR
What it does: Returns the public IP address (IPv4 or IPv6) of the device making the request. That's it — the simplest API on the internet.
Why use it: Zero configuration, zero dependencies, zero auth. One URL call and you know your public IP from anywhere in the world.
Quick start: curl "https://api.ipify.org?format=json" → {"ip":"58.69.200.111"}
No API key required — just make the request.
Overview
IPify provides the simplest possible way to discover your public IP address. Unlike other IP lookup services, IPify requires no registration, no API key, and no authentication headers. It supports both IPv4 (via api.ipify.org) and IPv6 (via api6.ipify.org), works with any HTTP client, and can return responses in plain text, JSON, or JSONP format. Because it has no enforced rate limits for reasonable usage, it is widely used in network diagnostics, deployment scripts, VPN checkers, and server configuration tools around the world.
Try It Now
Call the API to see your own public IP address in real time:
https://api.ipify.org?format=json
Show My IP →
{"ip":"58.69.200.111"}
Field Explanations
The JSON response contains a single field:
ip- The public IP address of the device that made the HTTP request. Returns an IPv4 address when using
api.ipify.organd an IPv6 address when usingapi6.ipify.org.
Code Examples
JavaScript Example
fetch('https://api.ipify.org?format=json')
.then(res => res.json())
.then(data => console.log(`Your IP: ${data.ip}`))
.catch(err => console.error(err));
Python Example
import requests
response = requests.get('https://api.ipify.org?format=json')
data = response.json()
print(f"Your IP: {data['ip']}")
cURL Example
# Plain text (IPv4)
curl https://api.ipify.org
# JSON format (IPv4)
curl "https://api.ipify.org?format=json"
# IPv6 address
curl https://api6.ipify.org
Frequently Asked Questions
- Is IPify really free to use?
- Yes. IPify is completely free with no API key, no signup, and no documented rate limits. It has been a reliable free service for years.
- Does it support IPv6?
- Yes. Use
api6.ipify.orgto get your IPv6 address. The mainapi.ipify.orgreturns your IPv4 address. - What response formats are available?
- Plain text by default (just the IP string), JSON (
?format=json), and JSONP (?format=jsonp&callback=fn) for cross-domain browser requests. - Can I look up someone else's IP address?
- No. IPify only returns the IP address of the device making the request. To look up information about a specific IP, check out related APIs like ip-api.com or IPinfo.
- Is there a rate limit?
- IPify has no documented rate limit and is designed for high-volume production use. However, please be reasonable and avoid calling it every second.
- Can I use this from a browser with client-side JavaScript?
- Yes. The JSONP endpoint (
?format=jsonp&callback=myFunc) works cross-domain, making it easy to use from any web page without CORS issues.
API Details
- Base URL
https://api.ipify.org- Method
- GET
- Authentication
- Not Required
- Formats
- Plain text, JSON (
?format=json), JSONP (?format=jsonp&callback=fn) - IPv6 Endpoint
https://api6.ipify.org- Documentation
- https://www.ipify.org/
- Category
- Development
- CORS
- Yes (via JSONP)
- Geographic Coverage
- Global — works on any internet-connected device anywhere in the world
What You Can Build
- IP display widgets — Show "Your IP is X.X.X.X" on any website
- Network diagnostics — Check your public IP in troubleshooting tools
- VPN checkers — Verify a VPN connection by detecting IP changes
- Server deployment scripts — Auto-detect a server's public IP during provisioning
- DDNS clients — Update DNS records when your public IP changes
- Security audit logs — Record the public IP of users for access tracking