SDK
Java RDAP SDK
Look up domains, IPs, and ASNs from Java. Strong typing, bulk lookups, AutoCloseable client.
Java 11 or later
Install
implementation("io.rdapapi:rdapapi-java:0.5.0")<dependency>
<groupId>io.rdapapi</groupId>
<artifactId>rdapapi-java</artifactId>
<version>0.5.0</version>
</dependency>First request in 60 seconds
Get an API key from the dashboard, then drop your key into the client and call any of the lookup methods.
import io.rdapapi.client.RdapClient;
import io.rdapapi.client.responses.DomainResponse;
import io.rdapapi.client.responses.IpResponse;
import io.rdapapi.client.responses.AsnResponse;
try (RdapClient client = new RdapClient("your-api-key")) {
DomainResponse domain = client.domain("google.com");
System.out.println(domain.getRegistrar().getName()); // "MarkMonitor Inc."
IpResponse ip = client.ip("8.8.8.8");
System.out.println(ip.getName()); // "GOGL"
AsnResponse asn = client.asn(15169);
System.out.println(asn.getName()); // "GOOGLE"
}Bulk domain lookups
Send up to 10 domains in one request. Available on Pro and Business plans.
BulkDomainResponse resp = client.bulkDomains(
List.of("google.com", "github.com", "example.com"),
new DomainOptions().follow(true));
System.out.println(resp.getSummary().getSuccessful()); // 3
for (BulkDomainResult result : resp.getResults()) {
if ("success".equals(result.getStatus())) {
System.out.println(result.getDomain() + ": " + result.getData().getRegistrar().getName());
}
}Error handling
Every API error maps to a typed exception. Catch NotSupportedException before NotFoundException since it is a subclass.
import io.rdapapi.client.exceptions.*;
try {
client.domain("example.nope");
} catch (NotSupportedException e) {
System.out.println("TLD not covered by RDAP");
} catch (NotFoundException e) {
System.out.println("Domain not registered");
} catch (RateLimitException e) {
System.out.println("Retry after " + e.getRetryAfter() + " seconds");
}