Endpoint
| Method | GET |
| URL | https://ipsnapshot.com/api/ip/{ip} |
| Your own IP | https://ipsnapshot.com/api/ip/self |
| Auth | None - no API key required |
| Rate limit | 500 requests / day / IP (see X-RateLimit-Remaining header) |
| CORS | Access-Control-Allow-Origin: * - call it straight from the browser |
| Caching | Responses cacheable for 1h (Cache-Control: max-age=3600) |
Example Request
| curl | curl https://ipsnapshot.com/api/ip/8.8.8.8 |
| JavaScript | const r = await fetch('https://ipsnapshot.com/api/ip/8.8.8.8').then(r => r.json()); |
| PHP | $r = json_decode(file_get_contents('https://ipsnapshot.com/api/ip/8.8.8.8'), true); |
| Python | r = requests.get('https://ipsnapshot.com/api/ip/8.8.8.8').json() |
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | true when the lookup succeeded |
ip | string | The address that was looked up |
data.ip_version | int | 4 or 6 |
data.country_code | string | ISO 3166-1 alpha-2 code |
data.country / region / city / continent | string | Geolocation (city-level for IPv4) |
data.asn | int | Autonomous system number |
data.isp | string | Network operator / organization |
data.is_vpn | boolean | Appears on public VPN provider lists |
data.is_datacenter | boolean | Falls within a datacenter/hosting range |
data.is_tor | boolean | Active Tor exit node |
data.risk_level / risk_score | string / int | Combined risk assessment (0-100) |
page | string | Human-readable page for this IP on ipsnapshot.com |
Errors use standard status codes: 400 invalid IP, 429 daily limit reached.
Fair Use & Attribution
- 500 requests per day per IP - combined with 1-hour caching this covers most integrations.
- Geolocation and ASN data include DB-IP Lite (CC BY 4.0); a link back is appreciated.
- Threat flags are compiled from public VPN/datacenter lists and the official Tor exit list, refreshed regularly.
Frequently Asked Questions
Is the IP lookup API really free?
Yes. No API key, no registration, no credit card. Up to 500 requests/day per IP, CORS enabled for direct browser use.
Does it support IPv6?
Yes - IPv6 lookups return country-level geolocation plus ASN data. IPv4 lookups additionally include city-level location and threat-list flags.
How fresh is the data?
Geolocation and ASN data are refreshed monthly from DB-IP; VPN, datacenter, and Tor lists are refreshed regularly from public sources.
Can I test it right now?
Try /api/ip/8.8.8.8 in your browser, or look up 8.8.8.8, 1.1.1.1, or your own IP with What Is My IP.