Get a free API key
Instant. 1,000 requests per day. We only use your email for quota notices and billing.
Your API key (store it now — it is shown once):
Use it as ?key=… or header X-API-Key.
Usage dashboard
Paste a key to see today's usage, plan and billing options.
Plan
–
Used today
–
Daily limit
–
Documentation
Base URL: https://www.ipaddressdetails.com/api/v1
Caller's IP
GET /api/v1/ip
Returns details for the IP making the request. Ideal for "what is my IP" widgets.
Any IP
GET /api/v1/ip/{ip}
IPv4 or IPv6. Cached for one hour at the edge.
Single field, plain text
GET /api/v1/ip/{ip}/{field}
e.g. /api/v1/ip/1.1.1.1/country_code → AU. Handy for shell scripts.
Authentication
Send your key as ?key=ipad_… or the X-API-Key header. Every response includes X-RateLimit-Limit-Day and X-RateLimit-Remaining-Day. Over quota returns HTTP 429 with a JSON error.
Examples
curl "https://www.ipaddressdetails.com/api/v1/ip/8.8.8.8?key=YOUR_KEY"
# just the country code
curl "https://www.ipaddressdetails.com/api/v1/ip/8.8.8.8/country_code"
const res = await fetch('https://www.ipaddressdetails.com/api/v1/ip/8.8.8.8', {
headers: { 'X-API-Key': 'YOUR_KEY' }
});
const data = await res.json();
console.log(data.country_code, data.city, data.org);
import requests
r = requests.get('https://www.ipaddressdetails.com/api/v1/ip/8.8.8.8',
headers={'X-API-Key': 'YOUR_KEY'}, timeout=5)
data = r.json()
print(data['country_code'], data['city'], data['org'])
$ctx = stream_context_create(['http' => ['header' => "X-API-Key: YOUR_KEY\r\n"]]);
$data = json_decode(file_get_contents('https://www.ipaddressdetails.com/api/v1/ip/8.8.8.8', false, $ctx), true);
echo $data['country_code'], ' ', $data['city'];
Response fields
ipThe address that was looked up.version4 or 6.is_privatetrue for RFC1918 / loopback / link-local ranges (no geo data).city, region, countryEnglish names. May be null for sparse ranges.country_codeISO 3166-1 alpha-2, e.g. "US".continent, continent_codeContinent name and two-letter code.latitude, longitudeApproximate coordinates (city centroid).timezoneIANA timezone when available, e.g. "Europe/Berlin".is_eutrue when the country is in the European Union.asnAutonomous system number, e.g. "AS13335".orgOrganisation / ISP that announces the prefix.hostnameReverse DNS (PTR) record, or null.Errors
400 invalid_ip — the path segment is not a valid IPv4/IPv6 address.
401 invalid_key — key unknown or disabled.
429 quota_exceeded — daily quota used; upgrade or wait for the UTC reset.
429 rate_limited — more than 120 requests in one minute.
Pricing
Daily quotas reset at 00:00 UTC. All plans include every field and IPv6.
Free
$0/month
- 1,000 requests / day
- ~30,000 / month
- 120 requests / minute burst
- Community support
Starter
$9/month
- 30,000 requests / day
- ~900,000 / month
- 120 requests / minute burst
- Email support
Pro
$29/month
- 150,000 requests / day
- ~4,500,000 / month
- 120 requests / minute burst
- Email support
Need more than 150,000/day or a bulk CSV export? Talk to us.
Frequently asked questions
Is the IP geolocation API really free?
Yes. Without a key you get 100 requests per day per IP. A free key raises that to 1,000 requests per day, no credit card required. Paid plans exist for production workloads.
How accurate is the location data?
Country is accurate for the vast majority of addresses. City-level accuracy is typically within 25–50 km for residential broadband and less reliable for mobile carriers, VPNs and corporate networks. Never use IP geolocation for anything that needs a street address.
Where does the data come from?
Geolocation and ASN data come from the DB-IP Lite database (updated monthly) with fallback enrichment from ipinfo.io. Reverse DNS hostnames are resolved live.
Does the API support IPv6?
Yes. Pass any IPv4 or IPv6 address, or call /api/v1/ip with no address to get details for the caller.
Can I call the API from a browser?
Yes. CORS is enabled for all origins. For browser apps use the anonymous endpoint or a key you are comfortable exposing (usage limits protect you).
Can I cancel a paid plan?
Any time from the billing portal. Your key immediately drops back to the free tier at the end of the billing period.