{"auth":{"required":false,"when_required":"send Authorization: Bearer \u003ctoken\u003e or X-Api-Key: \u003ctoken\u003e on /lookup and /reverse. /, /health and /choices are never gated."},"description":"IP geolocation and reverse geocode. City-level only (not street). Same database for both: IP2Location LITE.","endpoints":[{"example":"/lookup/8.8.8.8","method":"GET","params":{"ip":"path, IPv4 or IPv6"},"path":"/lookup/{ip}","response":{"city":"Mountain View","country_code":"US","country_name":"United States of America","ip":"8.8.8.8","latitude":37.405992,"locale":{"country_name":"United States","currency":{"code":"USD","example":"$5,000.50","name":"US Dollar","symbol":"$","symbol_first":true,"symbol_space":false},"decimal_separator":".","group_separator":",","language":"en","measurement":"imperial"},"longitude":-122.078515,"region":"California","timezone":"-07:00","zipcode":"94043"},"use_when":"Caller has an IPv4 or IPv6 address."},{"example":"/reverse?lat=-27.4698\u0026lon=153.0251","method":"GET","notes":"Nearest city centroid in the database. zipcode is the city's representative zip, not the device's street. Response has no ip field.","params":{"lat":"query, number -90..90","lon":"query, number -180..180"},"path":"/reverse","response":{"city":"Brisbane","country_code":"AU","country_name":"Australia","latitude":-27.46754,"locale":{"country_name":"Australia","currency":{"code":"AUD","example":"$5,000.50","name":"Australian Dollar","symbol":"$","symbol_first":true,"symbol_space":false},"decimal_separator":".","group_separator":",","language":"en","measurement":"metric"},"longitude":153.02809,"region":"Queensland","timezone":"+10:00","zipcode":"4000"},"use_when":"Caller has WGS84 latitude and longitude from a device location share."},{"example":"/choices","method":"GET","notes":"Static CLDR snapshot keyed by ISO 3166-1 alpha-2. Never requires auth. Same objects as the locale field on /lookup and /reverse.","path":"/choices","response":{"DK":{"country_name":"Denmark","currency":{"code":"DKK","example":"5.000,50 kr.","name":"Danish Krone","symbol":"kr.","symbol_first":false,"symbol_space":true},"decimal_separator":",","group_separator":".","language":"da","measurement":"metric"}},"use_when":"Caller wants the full country_code -\u003e locale table (dropdown labels, currency, separators, metric/imperial)."},{"example":"/health","method":"GET","path":"/health","response":{"database":"IP2LOCATION-LITE-DB11.IPV6.BIN","db_version":"2026.9.1","places":86234,"status":"ok"},"use_when":"Liveness. Never requires auth."}],"errors":{"400":"invalid ip or lat/lon","401":"auth required or token wrong","501":"IPv6 asked of an IPv4-only database","503":"database not loaded yet"},"field_notes":["Unknown or reserved ranges return '-' in text fields.","zipcode and timezone are omitted on lesser BINs (no SDK error sentences).","Returned latitude/longitude are the matched city point, not the query (on /reverse) and not a street address.","locale is omitted when country_code is unknown ('-'). One locale per country (CLDR majority language)."],"service":"ip2loc","usage":"If you have an IP, GET /lookup/{ip}. If you have device GPS, GET /reverse?lat={lat}\u0026lon={lon}. Do not send an IP to /reverse. Do not send lat/lon to /lookup."}
