You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Java-IPinfo is a lightweight wrapper for the IPinfo API, which provides up-to-date IP address data.
6
+
This is the officialJava client library for the [IPinfo.io](https://ipinfo.io) IP address API, allowing you to lookup your own IP address, or get any of the following details for an IP:
7
+
- IP geolocation (city, region, country, postal code, latitude and longitude)
8
+
- ASN details (ISP or network operator, associated domain name, and type, such as business, hosting or company)
9
+
- Company details (the name and domain of the business that uses the IP address)
10
+
- Carrier details (the name of the mobile carrier and MNC and MCC for that carrier if the IP is used exclusively for mobile traffic)
7
11
8
-
## Features:
9
12
10
-
- IP Lookup
11
-
- ASN Lookup
12
13
13
-
## Usage
14
+
### Getting Started
15
+
16
+
You'll need an IPinfo API access token, which you can get by singing up for a free account at [https://ipinfo.io/signup](https://ipinfo.io/signup?ref=lib-$LANGUAGE).
17
+
18
+
The free plan is limited to 1,000 requests a day, and doesn't include some of the data fields such as IP type and company data. To enable all the data fields and additional request volumes see [https://ipinfo.io/pricing](https://ipinfo.io/pricing?ref=lib-$LANGUAGE)
19
+
20
+
#### Installation
21
+
22
+
##### Maven
23
+
Add these values to your pom.xml file:
14
24
15
-
### Maven
16
25
Repository:
17
26
18
27
```xml
@@ -37,9 +46,9 @@ Dependency:
37
46
</dependencies>
38
47
```
39
48
40
-
###Examples
49
+
#### Quick Start
41
50
42
-
#### IP Information
51
+
#####IP Information
43
52
44
53
45
54
````java
@@ -65,7 +74,7 @@ public class Main {
65
74
````
66
75
67
76
68
-
#### ASN Information
77
+
#####ASN Information
69
78
70
79
````java
71
80
importio.ipinfo.api.IPInfo;
@@ -89,13 +98,13 @@ public class Main {
89
98
}
90
99
````
91
100
92
-
### Errors
101
+
####Errors
93
102
94
103
- ErrorResponseException: A runtime exception accessible through the ExecutionException of a future. This exception signals that something went wrong when mapping the API response to the wrapper. You probably can't recover from this exception.
95
104
96
105
- RateLimitedException An exception signalling that you've been rate limited.
97
106
98
-
### Caching
107
+
####Caching
99
108
100
109
This library provides a very simple caching system accessible in `SimpleCache`. Simple cache is an in memory caching system that resets every time you restart your code.
101
110
@@ -127,7 +136,7 @@ public class Main {
127
136
}
128
137
```
129
138
130
-
### Country Name Lookup
139
+
####Country Name Lookup
131
140
132
141
This library provides a system to lookup country names through ISO2 country codes.
133
142
@@ -162,7 +171,7 @@ This file must follow the same layout as seen [here](https://github.com/ipinfo/j
162
171
163
172
More language files can be found [here](https://country.io/data)
164
173
165
-
### Location Information
174
+
####Location Information
166
175
167
176
This library provides an easy way to get the latitude and longitude of an IP Address:
168
177
@@ -190,8 +199,20 @@ public class Main {
190
199
}
191
200
```
192
201
193
-
## Extra Information
202
+
####Extra Information
194
203
195
204
- This library is thread safe. Feel free to call the different endpoints from different threads.
196
205
- This library uses square's http client. Please refer to their documentation to get information on more functionality you can use.
197
206
207
+
208
+
### Other Libraries
209
+
210
+
There are official IPinfo client libraries available for many languages including PHP, Python, Go, Java, Ruby, and many popular frameworks such as Django, Rails and Laravel. There are also many third party libraries and integrations available for our API.
211
+
212
+
https://ipinfo.io/developers/libraries
213
+
214
+
### About IPinfo
215
+
216
+
Founded in 2013, IPinfo prides itself on being the most reliable, accurate, and in-depth source of IP address data available anywhere. We process terabytes of data to produce our custom IP geolocation, company, carrier and IP type data sets. Our API handles over 12 billion requests a month for 100,000 businesses and developers.
0 commit comments