ipinfo.im
Your Public IP Address::216.73.217.43
United States Ohio Columbus Amazon.com, Inc.
API Usage Guide
Basic Usage
Bash Example
curl ipinfo.im
216.73.217.43
Get JSON Information
Bash Example
curl ipinfo.im/json
{
"ip": "216.73.217.43",
"location": "United States Ohio Columbus",
"isp": "Amazon.com, Inc.",
"time": "2026-06-04 07:39:41"
}
Bash Example
curl ipinfo.im/json/216.73.217.43
{
"ip": "216.73.217.43",
"location": "United States Ohio Columbus",
"isp": "Amazon.com, Inc.",
"time": "2026-06-04 07:39:41"
}
Language parameter
Supported languages: zh, en
Default value: en
Bash Example
curl "ipinfo.im/json?lang=zh"
Bash Example
curl "ipinfo.im/json/216.73.217.43?lang=en"
Available APIs
| Endpoint | Description | Example |
|---|---|---|
/ |
Only returns IP | curl ipinfo.im |
/json |
Returns JSON | curl ipinfo.im/json |
/json/<ip> |
Returns JSON | curl ipinfo.im/json/216.73.217.43 |
?lang |
Language parameter - Supported languages: zh, en- Default value: en
|
curl "ipinfo.im/json?lang=zh"curl "ipinfo.im/json/216.73.217.43?lang=en"
|
Response Fields
| Field | Type | Description |
|---|---|---|
ip | string | The queried IP address |
location | string | Geolocation info (country, region, city) |
isp | string | Internet Service Provider name |
time | string | Query timestamp (server local time) |
Rate Limiting
The API is completely free and requires no authentication key. To ensure service quality, requests are limited to 60 per minute per IP address. Exceeding the limit will return HTTP 429 status code.
Error Handling
| Status Code | Meaning |
|---|---|
200 | Request successful |
429 | Rate limit exceeded, please retry later |
500 | Internal server error, please retry later |
Common Use Cases
- Automatically retrieve the outbound IP in server scripts
- Monitor network changes (e.g., IP switch detection)
- Build user-facing IP lookup tools or integrate into dashboards
- Quickly query suspicious IP geolocation and ISP during security audits
More Code Examples
Python
import requests
data = requests.get("https://ipinfo.im/json").json()
print(f"IP: {data['ip']}")
print(f"Location: {data['location']}")
print(f"ISP: {data['isp']}")
Node.js
const res = await fetch("https://ipinfo.im/json");
const data = await res.json();
console.log(`IP: ${data.ip}, Location: ${data.location}`);
Go
resp, _ := http.Get("https://ipinfo.im/json")
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
PowerShell
$resp = Invoke-RestMethod -Uri "https://ipinfo.im/json" Write-Host "IP: $($resp.ip) | Location: $($resp.location)"