API
API for the terminal and your programs
Free and no sign-up. Replies in plain text or JSON and can be called from any website (CORS).
Endpoints
GET ip.com.py/Just your IP, as text (when requested by curl, wget or PowerShell).GET ip.com.py/ipJust your IP, as text (from any program or browser).GET ip.com.py/jsonAll your data as JSON.GET ip.com.py/json/8.8.8.8Data for another IP, including connection type and blacklists.?lang=es | pt | enLanguage for place names: es, pt or en.
Examples
curl (Linux, macOS, Windows)
$ curl ip.com.py
203.0.113.7
PowerShell
PS> (Invoke-RestMethod https://ip.com.py/json).ip
203.0.113.7
Python
import urllib.request, json
data = json.load(urllib.request.urlopen("https://ip.com.py/json"))
print(data["ip"], data["country_code"])
JavaScript
const r = await fetch("https://ip.com.py/json");
const { ip, city } = await r.json();
JSON
$ curl ip.com.py/json
{
"ip": "203.0.113.7",
"version": 4,
"hostname": "host-7.example.net",
"city": "Asunción",
"region": "Asunción",
"country": "Paraguay",
"country_code": "PY",
"continent": "Sudamérica",
"latitude": -25.28,
"longitude": -57.63,
"accuracy_radius_km": 20,
"time_zone": "America/Asuncion",
"asn": 64500,
"org": "Ejemplo S.A."
}
JSON fields
ipIP addressversion4 or 6hostnameName associated with the IP (reverse DNS), or nullcity, region, country, continentCity, region, country and continent (approximate)country_codeTwo-letter country code (ISO 3166)latitude, longitude, accuracy_radius_kmApproximate coordinates and accuracy radius in kmtime_zoneTime zone of the locationasn, orgNetwork number and name (provider)connection, blacklistsOnly in /json/{ip}: connection type and blacklist results
Usage limits
To keep the service free, each IP has a limit. If you exceed it, the response is 429 with a Retry-After header (seconds to wait). The X-RateLimit-Limit and X-RateLimit-Remaining headers tell you how many requests you have left.
curl ip.com.py and /ip60 per minute/json30 per minute/json/{ip} and the IP lookup page10 per minute · 300 per day
Location data is approximate and comes from MaxMind GeoLite2.