Skip to content

Java SDK

Maven Central GitHub

The IPWho Java SDK wraps the IP geolocation API in idiomatic Java — typed POJO responses, checked exceptions, and a single Maven dependency. One call returns the full payload: geolocation, timezone, currency, connection (ASN/ISP), security flags, and more.

<dependency>
<groupId>com.lavrox</groupId>
<artifactId>ipwho</artifactId>
<version>1.0.0</version>
</dependency>
implementation("com.lavrox:ipwho:1.0.0")

Java 11+, OkHttp, Jackson. Package: com.ipwho.

IpWhoClient client = new IpWhoClient(System.getenv("IPWHO_API_KEY"));
IpGeoResponse resp = client.lookup("8.8.8.8"); // GET /ip/{ip}
IpGeoResponse me = client.me(); // GET /me
List<IpGeoResponse> bulk = client.bulk(Arrays.asList("8.8.8.8", "1.1.1.1"));
try {
IpGeoResponse resp = client.lookup("8.8.8.8");
} catch (InvalidIPException e) {
// malformed IP address (404)
} catch (RateLimitException e) {
// plan limit reached (429)
} catch (APIResponseException e) {
// unexpected response
}
  • lookup(String ip) — GET /ip/{ip}
  • me() — GET /me
  • bulk(List<String> ips) — GET /bulk/{a,b,c}; returns List<IpGeoResponse>