Unofficial Java wrapper for ipinfo.io IP geolocation API.
Created by gh-md-toc
This can look up:
- information about your own IP address or someone else,
- short (one-field) information about IP address.
You get a ready client
IpInfo client = IpInfo.getInstance("qwerty-token");
or make your own with Feign and Java JSON
IpInfo client = Feign.builder()
.client(new Http2Client())
.requestInterceptor(new TokenInterceptor("qwerty-token"))
.decoder(new JsonDecoder())
.target(IpInfo.class, IpInfo.API_LOCATOR);
The token is optional on free plan, see more on IPinfo's pricing page.
Now you get details of your IP address
client.lookup(null);
or someone else
client.lookup("8.8.8.8")
The IPinfo supports IP6 addresses
client.lookup("2001:4860:4860::8888")
The volume of information depends on your plan, see some samples here.
Please read Contributing.
See Changelog
Copyright 2017-2023 Witalij Berdinskich
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.