IP Lookup API
Free JSON API for IP address geolocation and network details.
API endpoint
Base URL (append format=json and optional ip):
https://pinip.net/api?format=json&ip=8.8.8.8
Lookup a specific IP
https://pinip.net/api?format=json&ip=8.8.8.8
Lookup caller IP (no ip parameter)
https://pinip.net/api?format=json
Response fields
Enriched responses include country, city, coordinates, ISP, ASN, proxy/hosting flags, and more. Example:
{
"success": true,
"ip": "8.8.8.8",
"country": "United States",
"country_code": "US",
"city": "Mountain View",
"latitude": 37.4056,
"longitude": -122.0775,
"isp": "Google LLC",
"asn": 15169,
"is_proxy": false,
"is_hosting": true,
"source": "pinip.net"
}
Parameters
| Parameter | Required | Description |
|---|---|---|
format | Yes | Must be json |
ip | No | IPv4 or IPv6 to lookup; omit for caller IP |
Rate limits & fair use
The API is free for reasonable use. Cache responses when possible and include a descriptive User-Agent. For heavy volume, contact us.
Try it now
API frequently asked questions
Is the API really free?
Yes, for reasonable personal and commercial use. Avoid aggressive scraping that could overload the service.
What format is returned?
JSON with geolocation, ISP, ASN, and security fields when you use ?format=json.
Can I lookup IPv6?
Yes. Pass any valid IPv6 address in the ip parameter.
Do I need an API key?
Not currently. Always identify your application in the User-Agent and cache results when possible.
What if I get an error?
Verify the IP format, retry later, or use the web lookup at pinip.net.