Effortless & Free Public IP Discovery
A fast, free, reliable, and easy-to-use public IP address API
Your IP Address
About IpSimple
IpSimple is a fast, reliable, and completely free public IP address API designed for developers who need quick and easy IP detection in their applications.
Ready to get started? Try one of our code samples below in your terminal and see how simple it is!
Quick Start
$ curl 'https://api.ipsimple.org/ipv4?format=json'
Why Choose IpSimple?
Whether you're building applications, managing infrastructure, or developing automation tools, knowing your public IP address is essential. IpSimple makes IP detection effortless with a purpose-built API that developers trust.
- Unlimited Requests
No rate limits, no quotas. Scale from prototype to production without restrictions. - Lightning Fast
Optimized for speed with global edge locations ensuring sub-100ms response times. - Enterprise Reliability
99.99% uptime SLA with Azure's multi-zone, multi-region infrastructure.
- Developer First
Simple REST API, multiple response formats, and extensive documentation. - Zero Logging
Your privacy matters. We don't store, track, or log any request data. - Forever Free
Open source and committed to remaining free for the community.
API Reference
IpSimple provides a clean, RESTful API for retrieving your public IPv4 address. Choose from three response formats to match your application's needs.
Available Endpoints
Endpoint | Format | Response | Use Case |
---|---|---|---|
https://api.ipsimple.org/ipv4
| Plain Text | 98.207.254.136
| Shell scripts, simple automation |
https://api.ipsimple.org/ipv4?format=json
| JSON | {"ip":"98.207.254.136"}
| Modern applications, REST clients |
https://api.ipsimple.org/ipv4?format=jsonp&callback=myCallback
| JSONP | myCallback({"ip":"98.207.254.136"})
| Client-side JavaScript, legacy browsers |
Technical Details
- Protocol: HTTPS only for secure transmission
- Method: GET requests (no authentication required)
- Rate Limiting: None - use responsibly
- Response Time: Typically under 100ms globally
- Status Codes: 200 (success), 400 (bad request), 404 (not found)
Code Examples
Get started quickly with these practical examples. Copy and run any snippet to see IpSimple in action across different programming languages and environments.
Go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
// Get IP address
resp, err := http.Get("https://api.ipsimple.org/ipv4")
if err != nil {
fmt.Printf("Error: %v\n", err)
return
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Printf("My public IP address is: %s\n", string(body))
}
Python
import requests
# Basic request
response = requests.get('https://api.ipsimple.org/ipv4')
ip = response.text.strip()
print(f'My public IP address is: {ip}')
# JSON response with error handling
try:
response = requests.get('https://api.ipsimple.org/ipv4?format=json', timeout=5)
response.raise_for_status()
ip_data = response.json()
print(f'IP Address: {ip_data["ip"]}')
except requests.RequestException as e:
print(f'Error fetching IP: {e}')
JavaScript
// Modern fetch API with async/await
async function getMyIP() {
try {
const response = await fetch('https://api.ipsimple.org/ipv4?format=json');
const data = await response.json();
console.log('My public IP address is:', data.ip);
return data.ip;
} catch (error) {
console.error('Error fetching IP:', error);
}
}
// Call the function
getMyIP();
Node.js
const https = require('https');
function getPublicIP() {
return new Promise((resolve, reject) => {
https.get('https://api.ipsimple.org/ipv4', (res) => {
let data = '';
res.on('data', chunk => data += chunk);
res.on('end', () => resolve(data.trim()));
}).on('error', reject);
});
}
// Usage
getPublicIP()
.then(ip => console.log('Public IP:', ip))
.catch(err => console.error('Error:', err));
Java
import java.io.*;
import java.net.*;
public class IpSimpleClient {
public static void main(String[] args) throws Exception {
URL url = new URL("https://api.ipsimple.org/ipv4");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
BufferedReader reader = new BufferedReader(
new InputStreamReader(conn.getInputStream()));
String ip = reader.readLine();
reader.close();
System.out.println("My public IP address is: " + ip);
}
}
C#
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
using HttpClient client = new HttpClient();
string ip = await client.GetStringAsync("https://api.ipsimple.org/ipv4");
Console.WriteLine($"My public IP address is: {ip.Trim()}");
}
}
Development Roadmap
Here's what we're working on to make IpSimple even better. Our roadmap is driven by community feedback and real-world usage patterns.
IPv6 Support
Comprehensive IPv6 address detection with feature parity to our IPv4 implementation. This includes multiple response formats, global edge optimization, and seamless integration.
- New endpoint:
/ipv6
for IPv6 address detection - Dual-stack support:
/all
endpoint returning both IPv4 and IPv6 - Enhanced JSON responses with address type identification
- Backward compatibility with existing IPv4-only implementations
Enhanced Response Formats
Additional response formats and metadata to support advanced use cases while maintaining our commitment to simplicity.
- XML response format for legacy system integration
- Optional geolocation data (country, region) with privacy controls
- Response headers with additional metadata
- Custom callback names for JSONP responses
- Official SDK libraries for Go, Python, JavaScript, Node.js, Java, and C#