Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

182 Commits

Repository files navigation

IPGeolocation Java SDK for the IPGeolocation API

Maven CentralJava 8+BuildEndpointsLicenseAPI DocsWebsite

Overview

The official Java SDK for the IPGeolocation API. Use /v3/ipgeo and /v3/ipgeo-bulk to get IP geolocation, company and ASN data, timezone and network data, hostname and abuse details, browser and device details, and security signals from one API call. Security signals include VPN detection, proxy detection, threat score, Tor detection, attacker flags, and cloud or data center IP checks.

This SDK supports IPv4, IPv6, and domain lookups, typed Java response classes, raw JSON or XML output, and response metadata including credits charged and request duration.

Installation

Requires Java 8+ and Maven 3.8+.

Maven

<dependency>
<groupId>io.ipgeolocation</groupId>
<artifactId>ipgeolocation</artifactId>
<version>3.0.0</version>
</dependency>

Gradle (Groovy)

dependencies {
implementation 'io.ipgeolocation:ipgeolocation:3.0.0'
}

Gradle (Kotlin)

dependencies {
implementation("io.ipgeolocation:ipgeolocation:3.0.0")
}

Build From Source

git clone https://github.com/IPGeolocation/ip-geolocation-api-java-sdk.git
cd ip-geolocation-api-java-sdk
mvn clean install

Quick Start

importio.ipgeolocation.sdk.ApiResponse;
importio.ipgeolocation.sdk.IpGeolocationClient;
importio.ipgeolocation.sdk.IpGeolocationClientConfig;
importio.ipgeolocation.sdk.LookupIpGeolocationRequest;
importio.ipgeolocation.sdk.model.IpGeolocationResponse;
IpGeolocationClientConfigconfig = IpGeolocationClientConfig.builder("YOUR_API_KEY").build();
try (IpGeolocationClientclient = newIpGeolocationClient(config)) {
ApiResponse<IpGeolocationResponse> result = client.lookupIpGeolocation(
LookupIpGeolocationRequest.builder()
.ip("8.8.8.8")
.build());
System.out.println("IP: " + result.data().ip());
if (result.data().location() != null) {
System.out.println("Country: " + result.data().location().countryName());
System.out.println("City: " + result.data().location().city());
}
if (result.data().timeZone() != null) {
System.out.println("Timezone: " + result.data().timeZone().name());
}
}

Tip

Start with the default response, then add include(...) values such as security, abuse, hostname, user_agent, geo_accuracy, or dma_code when you need more data.

At a Glance

ItemValue
SDK NameIPGeolocation Java SDK
API TypeIPGeolocation API
Supported Endpoints/v3/ipgeo, /v3/ipgeo-bulk
Supported InputsIPv4, IPv6, domain
Main Data ReturnedGeolocation, company, ASN, timezone, security, abuse, hostname, user-agent, network, currency
PricingFree plan available; paid plans for higher limits and extra modules
AuthenticationAPI key, request origin allowlisting for /v3/ipgeo only
Response FormatsTyped JSON, raw JSON, raw XML
Bulk LimitUp to 50,000 IPs or domains per request
Java Requirement8+
API Version3.0

Official Release

Table of Contents

Get Your API Key

To use the SDK, create or access your IPGeolocation account and copy an API key from your dashboard.

  1. Sign up: https://app.ipgeolocation.io/signup
  2. If you signed up with email, verify your email address when prompted.
  3. Sign in: https://app.ipgeolocation.io/login
  4. Open your dashboard: https://app.ipgeolocation.io/dashboard
  5. Copy an API key from the API Keys section
  6. Use that key in IpGeolocationClientConfig.builder("YOUR_API_KEY")

Tip

For backend applications, store your API key in an environment variable or secret manager. For browser-based single lookups on paid plans, use request origin allowlisting instead of exposing an API key in frontend code.

What You Can Get From One API Call

Data SetHow To Request ItCommon Use Cases
IP geolocationDefault responseIP geolocation lookup, localization, geo targeting
Company and ASNDefault responseASN lookup, ISP lookup, ownership enrichment, network analysis
TimezoneDefault responseLocal time lookup, scheduling, regional reporting
Network and currencyDefault responseRouting context, analytics, pricing workflows
Security and risk signalsinclude("security")VPN detection, proxy detection, fraud prevention, threat analysis
Abuse contact datainclude("abuse")Incident response, abuse handling, reporting
Hostname datainclude("hostname"), include("liveHostname"), include("hostnameFallbackLive")Reverse DNS lookup, infrastructure enrichment, hosting checks
User-agent datainclude("user_agent") with userAgent(...)Browser detection, device detection, traffic analysis
Geo accuracy and DMA datainclude("geo_accuracy"), include("dma_code")Local targeting, media market mapping, proximity analysis

Common Use Cases

  • VPN detection and proxy detection for login, signup, and payment screening
  • Threat score checks and IP risk signals for fraud prevention
  • ASN lookup, ISP lookup, and company enrichment for B2B traffic analysis
  • Browser, device, and operating system detection with include=user_agent
  • Abuse contact lookups for investigation and incident response
  • Hostname and reverse DNS enrichment for infrastructure visibility
  • Bulk IP enrichment for analytics pipelines, SIEM workflows, ad verification, and security operations

Security and Risk Signals

Request include("security") to receive the security object. This adds the signals most teams search for when they need VPN detection, proxy detection, threat score data, anonymous IP checks, or data center IP detection from the same API call.

Search Use CaseSDK Fields
VPN detectionisVpn(), vpnProviderNames(), vpnConfidenceScore(), vpnLastSeen()
Proxy detectionisProxy(), proxyProviderNames(), proxyConfidenceScore(), proxyLastSeen()
Residential proxy detectionisResidentialProxy()
Tor detectionisTor()
Anonymous IP detectionisAnonymous()
Threat score and risk scoringthreatScore()
Bot, spam, and attacker signalsisBot(), isSpam(), isKnownAttacker()
Relay detectionisRelay(), relayProviderName()
Cloud, hosting, or data center IP detectionisCloudProvider(), cloudProviderName()

Provider names, confidence scores, and last-seen dates are returned when the API has supporting evidence for the matched VPN, proxy, relay, or hosting signal.

Supported Endpoints

This SDK supports the IPGeolocation API endpoints below.

EndpointHTTP MethodSDK MethodsPrimary Use Case
/v3/ipgeoGETlookupIpGeolocation(...), lookupIpGeolocationRaw(...)Single IPv4, IPv6, or domain lookup
/v3/ipgeo-bulkPOSTbulkLookupIpGeolocation(...), bulkLookupIpGeolocationRaw(...)Bulk lookup for up to 50,000 IPs or domains

Note

Through these two endpoints, the API can return geolocation, company, ASN, timezone, hostname, user-agent, abuse, network, currency, and security data depending on your request parameters and plan.

Authentication Modes

ModeSDK SetupTypical Use
API key query paramIpGeolocationClientConfig.builder("YOUR_API_KEY")Server-side API calls
Request origin allowlistingIpGeolocationClientConfig.builder()Single lookup with /v3/ipgeo on paid plans

Warning

Request origin allowlisting does not work with /v3/ipgeo-bulk. Bulk lookup always requires an API key in the client configuration. The API key is sent as the apiKey query parameter because that is how our IPGeolocation API authenticates these endpoints, so avoid logging full request URLs in application logs.

Plan Features and Limits

Feature availability depends on your plan and request parameters. The table below matches the current live API behavior for /v3/ipgeo and /v3/ipgeo-bulk.

Features marked Paid only return 401 Unauthorized (UnauthorizedException) on free plans.

CapabilityFree PlanPaid Plan
IPv4 and IPv6 single lookupSupportedSupported
Domain lookupPaid onlySupported
Bulk endpoint /v3/ipgeo-bulkPaid onlySupported, but always requires an API key
.include("*")Accepted, returns the default response onlyAccepted, returns all available modules
include=security, abuse, hostname, liveHostname, hostnameFallbackLive, geo_accuracy, dma_code, user_agentPaid onlySupported
Non-English langPaid onlySupported
fields and excludesSupportedSupported

Free Plan Example

ApiResponse<IpGeolocationResponse> freeResponse = client.lookupIpGeolocation(
LookupIpGeolocationRequest.builder()
.ip("8.8.8.8")
.include("*")
.fields("location.country_name")
.excludes("currency")
.build());

Paid Plan Example

ApiResponse<IpGeolocationResponse> paidResponse = client.lookupIpGeolocation(
LookupIpGeolocationRequest.builder()
.ip("ipgeolocation.io")
.lang(io.ipgeolocation.sdk.Language.DE)
.include("security")
.include("abuse")
.include("user_agent")
.include("hostnameFallbackLive")
.build());

Caution

Bulk lookup does not support request origin allowlisting. /v3/ipgeo-bulk always requires an API key in the client configuration.

Client Configuration

Builder MethodTypeDefaultNotes
apiKey(String)Stringnull if omittedRequired unless using request origin allowlisting for /v3/ipgeo
baseUrl(String)Stringhttps://api.ipgeolocation.ioTrailing slash is trimmed
connectTimeout(Duration)Duration10sMust be greater than zero and less than or equal to readTimeout
readTimeout(Duration)Duration30sMust be greater than zero

Important

connectTimeout must be less than or equal to readTimeout.

importjava.time.Duration;
IpGeolocationClientConfigconfig = IpGeolocationClientConfig.builder("YOUR_API_KEY")
.baseUrl("https://api.ipgeolocation.io")
.connectTimeout(Duration.ofSeconds(10))
.readTimeout(Duration.ofSeconds(30))
.build();

Available Methods

Single Lookup

MethodReturn TypeNotes
lookupIpGeolocation(request)ApiResponse<IpGeolocationResponse>Typed body plus metadata
lookupIpGeolocationRaw(request)ApiResponse<String>Raw JSON or XML plus metadata

Bulk Lookup

MethodReturn TypeNotes
bulkLookupIpGeolocation(request)ApiResponse<List<BulkLookupResult>>Typed bulk result plus metadata
bulkLookupIpGeolocationRaw(request)ApiResponse<String>Raw JSON or XML plus metadata

Request Options

Single Lookup Query Parameters

Builder MethodAPI ParamTypeDefaultNotes
ip(String)ipStringomittedIPv4, IPv6, or domain. Blank is treated as omitted and resolves to the caller IP.
lang(Language)langLanguageAPI default enNon-English requires a paid plan
include(String)includerepeatable StringnoneSent as comma-separated values
fields(String)fieldsrepeatable StringnoneSent as comma-separated values
excludes(String)excludesrepeatable StringnoneSent as comma-separated values
output(ResponseFormat)outputResponseFormatJSONTyped methods are JSON only. Raw methods support JSON and XML

Language values supported by .lang(...):

  • Language.EN for English
  • Language.DE for German
  • Language.RU for Russian
  • Language.JA for Japanese
  • Language.FR for French
  • Language.CN for Chinese Simplified
  • Language.ES for Spanish
  • Language.CS for Czech
  • Language.IT for Italian
  • Language.KO for Korean
  • Language.FA for Persian
  • Language.PT for Portuguese

Dot-separated field paths can be passed to .fields(...) and .excludes(...) to control which parts of the response are returned.

  • .fields(...) returns only the specified fields or objects.
  • .excludes(...) removes the specified fields or objects from the response.

include Supported Values

ValueAdds to ResponseExtra Credits
securitysecurity object with threat score, VPN detection, proxy detection, Tor detection, anonymous IP signals, residential proxy signals, bot and spam signals, attacker flags, relay detection, and cloud or hosting or data center IP identification+2
abuseabuse object+1
geo_accuracylocation.locality, location.accuracy_radius, location.confidence0
dma_codelocation.dma_code0
user_agentuser_agent object with browser, device, operating system, and engine details0
hostnamehostname via local source0
liveHostnamehostname via live DNS0
hostnameFallbackLivehostname with fallback strategy0
*All available modules for the plan+3

Note

When you request include=security, the API can return fields such as threat_score, is_vpn, vpn_provider_names, vpn_confidence_score, is_proxy, proxy_provider_names, proxy_confidence_score, is_tor, is_anonymous, is_residential_proxy, is_known_attacker, is_bot, is_spam, is_relay, relay_provider_name, is_cloud_provider, and cloud_provider_name.

Single Lookup Header Parameters

Builder MethodAPI HeaderTypeDefaultNotes
userAgent(String)User-AgentStringomittedPer-request override for .include("user_agent") requests

Bulk Lookup Body, Query, and Header Parameters

Builder MethodAPI Field or ParamTypeRequiredNotes
addIp(String)body ips[]StringYesAdds one IP or domain
ips(List<String>)body ips[]List<String>YesReplaces the current list
lang(Language)query langLanguageNoSame behavior as single lookup
include(String)query includerepeatable StringNoSent as comma-separated values
fields(String)query fieldsrepeatable StringNoSent as comma-separated values
excludes(String)query excludesrepeatable StringNoSent as comma-separated values
output(ResponseFormat)query outputResponseFormatNoTyped methods are JSON only. Raw methods support JSON and XML
userAgent(String)header User-AgentStringNoPer-request override for include=user_agent requests

Important

Bulk lookup validation rules:

  • Client config must include an API key
  • ips must not be empty
  • Maximum ips size is 50,000
  • Request origin allowlisting is not supported for /v3/ipgeo-bulk

Single Lookup Examples

All examples below assume the following client setup:

IpGeolocationClientclient = newIpGeolocationClient(
IpGeolocationClientConfig.builder("YOUR_API_KEY").build());

Full Enrichment Example

LookupIpGeolocationRequestrequest = LookupIpGeolocationRequest.builder()
.ip("8.8.8.8")
.include("security")
.include("abuse")
.include("user_agent")
.userAgent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9")
.build();
ApiResponse<IpGeolocationResponse> response = client.lookupIpGeolocation(request);
System.out.println("IP: " + response.data().ip());
System.out.println("Country: " + response.data().location().countryName());
System.out.println("Timezone: " + response.data().timeZone().name());
System.out.println("Threat Score: " + response.data().security().threatScore());
System.out.println("VPN: " + response.data().security().isVpn());
System.out.println("Proxy: " + response.data().security().isProxy());
System.out.println("Browser: " + response.data().userAgent().name());
System.out.println("OS: " + response.data().userAgent().operatingSystem().name());
System.out.println("Credits: " + response.metadata().creditsCharged());

ip

LookupIpGeolocationRequestrequest = LookupIpGeolocationRequest.builder()
.ip("2607:fb91:16c6:8860:e531:2d1d:4944:6c7c")
.build();
ApiResponse<IpGeolocationResponse> response = client.lookupIpGeolocation(request);
System.out.println(response.data().ip());

lang

LookupIpGeolocationRequestrequest = LookupIpGeolocationRequest.builder()
.ip("8.8.8.8")
.lang(io.ipgeolocation.sdk.Language.DE)
.build();
ApiResponse<IpGeolocationResponse> response = client.lookupIpGeolocation(request);
System.out.println(response.data().location().countryName());

include

LookupIpGeolocationRequestrequest = LookupIpGeolocationRequest.builder()
.ip("8.8.8.8")
.include("security")
.include("abuse")
.build();
ApiResponse<IpGeolocationResponse> response = client.lookupIpGeolocation(request);
System.out.println(response.data().security().threatScore());
System.out.println(response.data().security().isVpn());
System.out.println(response.data().security().isProxy());
System.out.println(response.data().abuse());

userAgent

LookupIpGeolocationRequestrequest = LookupIpGeolocationRequest.builder()
.ip("91.128.103.196")
.include("user_agent")
.userAgent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9")
.build();
ApiResponse<IpGeolocationResponse> response = client.lookupIpGeolocation(request);
System.out.println(response.data().userAgent().name());
System.out.println(response.data().userAgent().operatingSystem().name());

fields

LookupIpGeolocationRequestrequest = LookupIpGeolocationRequest.builder()
.ip("8.8.8.8")
.fields("location.country_name")
.fields("asn.organization")
.build();
ApiResponse<IpGeolocationResponse> response = client.lookupIpGeolocation(request);

Tip

Use fields when you want a smaller response and a more focused payload.

excludes

LookupIpGeolocationRequestrequest = LookupIpGeolocationRequest.builder()
.ip("8.8.8.8")
.excludes("currency")
.excludes("time_zone")
.build();
ApiResponse<IpGeolocationResponse> response = client.lookupIpGeolocation(request);

output

Typed methods are JSON only.

try {
client.lookupIpGeolocation(
LookupIpGeolocationRequest.builder()
.ip("8.8.8.8")
.output(ResponseFormat.XML)
.build());
} catch (io.ipgeolocation.sdk.exceptions.ValidationExceptionex) {
System.out.println(ex.getMessage());
}

Raw methods support XML and return raw response text:

ApiResponse<String> xml = client.lookupIpGeolocationRaw(
LookupIpGeolocationRequest.builder()
.ip("8.8.8.8")
.output(ResponseFormat.XML)
.build());
System.out.println(xml.data());

Raw JSON and XML Methods

Use raw methods when you want the server response body exactly as returned.

Methodoutput parameterdata() TypeResult
lookupIpGeolocation(...)omitted or ResponseFormat.JSONIpGeolocationResponseTyped parse
lookupIpGeolocation(...)ResponseFormat.XMLN/AValidationException
lookupIpGeolocationRaw(...)omitted or ResponseFormat.JSONStringRaw JSON
lookupIpGeolocationRaw(...)ResponseFormat.XMLStringRaw XML
bulkLookupIpGeolocation(...)omitted or ResponseFormat.JSONList<BulkLookupResult>Typed parse
bulkLookupIpGeolocation(...)ResponseFormat.XMLN/AValidationException
bulkLookupIpGeolocationRaw(...)omitted or ResponseFormat.JSONStringRaw JSON
bulkLookupIpGeolocationRaw(...)ResponseFormat.XMLStringRaw XML

Single Raw JSON Example

ApiResponse<String> rawJson = client.lookupIpGeolocationRaw(
LookupIpGeolocationRequest.builder()
.ip("8.8.8.8")
.output(ResponseFormat.JSON)
.build());
System.out.println(rawJson.data());
System.out.println(rawJson.metadata().statusCode());
System.out.println(rawJson.metadata().creditsCharged());

Single Raw XML Example

ApiResponse<String> rawXml = client.lookupIpGeolocationRaw(
LookupIpGeolocationRequest.builder()
.ip("8.8.8.8")
.output(ResponseFormat.XML)
.build());
System.out.println(rawXml.data());
System.out.println(rawXml.metadata().statusCode());
System.out.println(rawXml.metadata().firstHeaderValue("Content-Type"));

Bulk Raw JSON Example

ApiResponse<String> rawBulkJson = client.bulkLookupIpGeolocationRaw(
BulkLookupIpGeolocationRequest.builder()
.addIp("8.8.8.8")
.addIp("1.1.1.1")
.output(ResponseFormat.JSON)
.build());
System.out.println(rawBulkJson.data());
System.out.println(rawBulkJson.metadata().creditsCharged());

Bulk Raw XML Example

ApiResponse<String> rawBulkXml = client.bulkLookupIpGeolocationRaw(
BulkLookupIpGeolocationRequest.builder()
.addIp("8.8.8.8")
.addIp("invalid-ip")
.output(ResponseFormat.XML)
.build());
System.out.println(rawBulkXml.data());
System.out.println(rawBulkXml.metadata().statusCode());
System.out.println(rawBulkXml.metadata().rawHeaders());

Bulk Lookup Examples

Bulk With All Valid Inputs

importio.ipgeolocation.sdk.model.BulkLookupResult;
importjava.util.List;
BulkLookupIpGeolocationRequestrequest = BulkLookupIpGeolocationRequest.builder()
.addIp("8.8.8.8")
.addIp("1.1.1.1")
.build();
ApiResponse<List<BulkLookupResult>> response = client.bulkLookupIpGeolocation(request);
System.out.println("Count: " + response.data().size());
System.out.println("Credits: " + response.metadata().creditsCharged());

Bulk With Mixed Valid and Invalid Inputs

importio.ipgeolocation.sdk.model.BulkLookupError;
importio.ipgeolocation.sdk.model.BulkLookupResult;
importio.ipgeolocation.sdk.model.BulkLookupSuccess;
importjava.util.List;
BulkLookupIpGeolocationRequestrequest = BulkLookupIpGeolocationRequest.builder()
.addIp("8.8.8.8")
.addIp("invalid-ip")
.addIp("1.1.1.1")
.build();
ApiResponse<List<BulkLookupResult>> results = client.bulkLookupIpGeolocation(request);
for (BulkLookupResultitem : results.data()) {
if (iteminstanceofBulkLookupSuccess) {
BulkLookupSuccesssuccess = (BulkLookupSuccess) item;
System.out.println("OK: " + success.item().ip());
} elseif (iteminstanceofBulkLookupError) {
BulkLookupErrorerror = (BulkLookupError) item;
System.out.println("ERR: " + error.message());
}
}

Tip

Prefer bulk lookup when you are processing larger datasets or batched enrichment jobs.

Advanced Configuration

Response Metadata

All lookup methods return ApiResponse<T>.

ApiResponse<T> contains:

  • data()
  • metadata()

ApiResponseMetadata fields:

FieldTypeDescription
statusCodeintFinal HTTP response status
durationMslongTotal request duration
creditsChargedIntegerParsed from X-Credits-Charged when present
successfulRecordsIntegerParsed from X-Successful-Record for bulk responses
rawHeadersMap<String, List<String>>Immutable raw response header map

Header helper methods:

MethodReturn TypeDescription
headerValues("Header-Name")List<String>Case-insensitive header lookup for all values
firstHeaderValue("Header-Name")StringCase-insensitive header lookup for the first value
ApiResponse<IpGeolocationResponse> response = client.lookupIpGeolocation(
LookupIpGeolocationRequest.builder().ip("8.8.8.8").build());
System.out.println("Status: " + response.metadata().statusCode());
System.out.println("Duration ms: " + response.metadata().durationMs());
System.out.println("Credits: " + response.metadata().creditsCharged());
System.out.println("Raw X-Credits-Charged: "
+ response.metadata().firstHeaderValue("X-Credits-Charged"));

The client always sends SDK-managed User-Agent and Accept headers. Bulk requests also send Content-Type: application/json.

JSON Output Modes

Use JsonOutput for logs or CLI output. By default, it omits null fields from the API response.

ModeBehavior
JsonOutputMode.COMPACTOmits null fields
JsonOutputMode.FULLIncludes null fields
importio.ipgeolocation.sdk.JsonOutput;
importio.ipgeolocation.sdk.JsonOutputMode;
Stringcompact = JsonOutput.toPrettyJson(response.data());
Stringfull = JsonOutput.toPrettyJson(response.data(), JsonOutputMode.FULL);

Error Handling

All SDK exceptions extend IpGeolocationException.

HTTP StatusException
400BadRequestException
401UnauthorizedException
404NotFoundException
405MethodNotAllowedException
413PayloadTooLargeException
415UnsupportedMediaTypeException
423LockedException
429RateLimitException
499ClientClosedRequestException
5xxServerErrorException
Other non-2xxApiException
importio.ipgeolocation.sdk.exceptions.RateLimitException;
importio.ipgeolocation.sdk.exceptions.UnauthorizedException;
try {
client.lookupIpGeolocation(LookupIpGeolocationRequest.builder().build());
} catch (UnauthorizedExceptionex) {
System.err.println("Unauthorized: " + ex.apiMessage());
} catch (RateLimitExceptionex) {
System.err.println("Rate limit: " + ex.apiMessage());
}

Troubleshooting

SymptomLikely CauseWhat To Do
IllegalArgumentException: connectTimeout must be <= readTimeoutInvalid timeout relationSet connect timeout less than or equal to read timeout
ValidationException for XML with typed methodsTyped methods are JSON onlyUse lookupIpGeolocationRaw(...) or bulkLookupIpGeolocationRaw(...) for XML
ValidationException: bulk lookup requires apiKey in client configBulk client config has no API keyConfigure IpGeolocationClientConfig with an API key
ValidationException: ips must not be emptyBulk body has no entriesAdd at least one IP or domain
ValidationException: ips must contain at most 50000 entriesBulk request is too largeSplit the request into smaller chunks
UnauthorizedExceptionMissing or invalid key, or plan limitationVerify your key and requested features
RateLimitExceptionUsage or billing conditionReview account usage and plan status
LockedExceptionBogon IP address was queriedUse a valid public IP address
BadRequestExceptionProvided IP address is not validUse a valid public IP address

For the full list of API-side errors, see the IPGeolocation API error codes documentation.

FAQ

Can this Java SDK return VPN detection, proxy detection, and threat score data?

Yes. Use include("security") with /v3/ipgeo or /v3/ipgeo-bulk to receive the security object. That object can contain threat score, VPN detection, proxy detection, Tor detection, anonymous IP checks, residential proxy signals, bot and spam signals, known attacker signals, relay detection, and cloud or data center IP identification.

Can I get geolocation, company, ASN, timezone, and security data in one API call?

Yes. A single request can return geolocation, company, ASN, timezone, network, and currency data by default, and you can add more modules such as security, abuse, hostname, and user_agent with include(...).

Does the SDK support domain lookup?

Yes, but domain lookup requires a paid API plan. On free plans, the live API currently returns 401 Unauthorized for domain lookups.

Does the SDK support bulk IP enrichment?

Yes. Use /v3/ipgeo-bulk through bulkLookupIpGeolocation(...) or bulkLookupIpGeolocationRaw(...). Bulk requests support up to 50,000 IPs or domains per request and always require an API key.

Can I request raw XML instead of typed JSON?

Yes. Use lookupIpGeolocationRaw(...) or bulkLookupIpGeolocationRaw(...) with output(ResponseFormat.XML). Typed methods are JSON only.

How do I get user-agent details such as browser, device, and operating system?

Use include("user_agent") and set the request User-Agent header with .userAgent(...). The API can then return browser, device, operating system, and rendering engine details in the user_agent object.

What does include("*") return?

On free plans, include("*") returns the default response. On paid plans, it returns all modules available to your plan for that request.

Can I use request origin allowlisting for bulk lookup?

No. Request origin allowlisting works only for /v3/ipgeo on paid plans. /v3/ipgeo-bulk requires an API key.

Links

About

Official Java SDK for the IPGeolocation API. Get IP geolocation, ASN, company, timezone, hostname, and user-agent data, plus security signals such as VPN detection, proxy detection, Tor detection, threat score, and cloud or data center IP checks.

Topics

Resources

Contributing

Stars

21 stars

Watchers

6 watching

Forks

Releases

Used by

Contributors

Languages