Developer API

Network data without the ceremony.

Use IPGetter from shell scripts, dashboards and small applications. The public v1 API works without an account. Optional API keys give signed-in developers higher limits while keeping the same endpoints and response contract.

v1 API key optional 120 anonymous requests/minute 50,000 keyed requests/day
TEXT/ip

Your IP as plain text

Returns only the caller's public IP address with a trailing newline. Useful in shell scripts and health checks.

curl https://ipgetter.com/ip
GET/api/v1/me

Your network details

Returns the caller's IP, IP version, hostname, protocol and local GeoIP / ASN details.

curl https://ipgetter.com/api/v1/me
GET/api/v1/lookup?ip=8.8.8.8

IP lookup

Looks up a valid IPv4 or IPv6 address and returns scope, reverse DNS, geo and ASN data.

curl "https://ipgetter.com/api/v1/lookup?ip=8.8.8.8"
GET/api/v1/asn?ip=1.1.1.1

ASN / network owner

Returns the autonomous system number and network organisation for an IP address.

curl "https://ipgetter.com/api/v1/asn?ip=1.1.1.1"
GET/api/v1/reverse?ip=1.1.1.1

Reverse DNS

Returns the PTR hostname resolved for a valid IPv4 or IPv6 address.

curl "https://ipgetter.com/api/v1/reverse?ip=1.1.1.1"
Quick start

Use it from whatever you already have.

All JSON endpoints support GET and browser CORS. Here is the same lookup in four common environments.

cURL
curl "https://ipgetter.com/api/v1/lookup?ip=8.8.8.8"
JavaScript
const res = await fetch('https://ipgetter.com/api/v1/lookup?ip=8.8.8.8');
const data = await res.json();
console.log(data);
Python
import requests

data = requests.get(
    'https://ipgetter.com/api/v1/lookup',
    params={'ip': '8.8.8.8'},
    timeout=10,
).json()
print(data)
PHP
$json = file_get_contents(
    'https://ipgetter.com/api/v1/lookup?ip=8.8.8.8'
);
$data = json_decode($json, true);
var_dump($data);
Developer accounts

Use a key when your app needs more room.

Anonymous requests keep working exactly as before. Free account holders can create revocable API keys and send them as a Bearer token from server-side code.

Authenticated request
curl \
  -H "Authorization: Bearer ipg_live_YOUR_KEY" \
  "https://ipgetter.com/api/v1/lookup?ip=8.8.8.8"
How keys work

Create a free IPGetter account to generate revocable API keys. The full secret is shown once, only its hash is stored by IPGetter, and each key can be revoked independently. Do not expose secret keys in public browser JavaScript.

Response contract

Success and errors are explicit.

JSON responses include a boolean success field. Existing result fields remain at the top level, so the v1 response stays simple and backwards-friendly.

Successful lookup
{
  "success": true,
  "ip": "8.8.8.8",
  "version": "IPv4",
  "scope": "Public",
  "hostname": "dns.google",
  "geo": {
    "country_code": "US",
    "asn": "AS15169",
    "organisation": "Google LLC",
    "source": "DB-IP Lite"
  }
}
Validation error
{
  "success": false,
  "error": {
    "code": "invalid_ip",
    "message": "Provide a valid IPv4 or IPv6 address in the ip parameter."
  }
}
Limits and behaviour

Free, public and deliberately predictable.

Rate limits

Anonymous clients get 120 requests per minute and 10,000 requests per UTC day. API keys get 300 per minute and 50,000 per UTC day. A 429 response includes Retry-After.

Rate headers

Every counted request includes remaining and reset information in X-RateLimit-* response headers.

CORS

Public endpoints send Access-Control-Allow-Origin: * and allow the Authorization header. Keep secret API keys in server-side code rather than public browser JavaScript.

Privacy

Rate limiting uses a one-way server-side client hash. IPGetter does not store raw client IP addresses in its analytics logs.

StatusCodeMeaning
400invalid_ipThe supplied IP parameter is missing or invalid.
401invalid_api_keyThe supplied Bearer token is invalid or has been revoked.
405method_not_allowedThe endpoint was called with a method other than GET or OPTIONS.
429rate_limit_exceededThe per-minute or daily anonymous limit has been exceeded.
Need a hand?

API questions and integration help.

If a request is not behaving as expected, send the endpoint, response status and a redacted example to support. Never include a full API secret.

Contact support
Data source

Local lookups, not a third-party request on every call.

GeoIP and ASN enrichment is served from IPGetter's managed local Geo Engine. The current provider is DB-IP Lite, with validated monthly updates and rollback protection. Reverse DNS uses the server's configured DNS resolver.