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
This is the official Ruby client library for the [IPinfo.io](https://ipinfo.io) IP address API, allowing you to look up your own IP address, or get any of the following details for an IP:
4
-
-[IP geolocation data](https://ipinfo.io/ip-geolocation-api) (city, region, country, postal code, latitude, and longitude)
5
-
-[ASN information](https://ipinfo.io/asn-api) (ISP or network operator, associated domain name, and type, such as business, hosting, or company)
6
-
-[Firmographic data](https://ipinfo.io/ip-company-api) (the name and domain of the business that uses the IP address)
7
-
-[Carrier details](https://ipinfo.io/ip-carrier-api) (the name of the mobile carrier and MNC and MCC for that carrier if the IP is used exclusively for mobile traffic)
4
+
5
+
-[IP geolocation data](https://ipinfo.io/ip-geolocation-api) (city, region, country, postal code, latitude, and longitude)
6
+
-[ASN information](https://ipinfo.io/asn-api) (ISP or network operator, associated domain name, and type, such as business, hosting, or company)
7
+
-[Firmographic data](https://ipinfo.io/ip-company-api) (the name and domain of the business that uses the IP address)
8
+
-[Carrier details](https://ipinfo.io/ip-carrier-api) (the name of the mobile carrier and MNC and MCC for that carrier if the IP is used exclusively for mobile traffic)
8
9
9
10
Check all the data we have for your IP address [here](https://ipinfo.io/what-is-my-ip).
10
11
@@ -234,6 +235,58 @@ details.country_code # US
234
235
details.country # United States
235
236
```
236
237
238
+
### Core API
239
+
240
+
The library also supports the [Core API](https://ipinfo.io/developers/data-types#core-data), which provides city-level geolocation with nested geo and AS objects. Authentication with your token is required.
241
+
242
+
```ruby
243
+
require'ipinfo_core'
244
+
245
+
access_token ='123456789abc'
246
+
handler =IPinfoCore::create(access_token)
247
+
248
+
details = handler.details('8.8.8.8')
249
+
details.ip # 8.8.8.8
250
+
details.geo['city'] # Mountain View
251
+
details.geo['country'] # United States
252
+
details.as['asn'] # AS15169
253
+
details.as['name'] # Google LLC
254
+
```
255
+
256
+
### Plus API
257
+
258
+
The library also supports the [Plus API](https://ipinfo.io/developers/data-types#plus-data), which provides enhanced data including mobile carrier info and privacy detection. Authentication with your token is required.
259
+
260
+
```ruby
261
+
require'ipinfo_plus'
262
+
263
+
access_token ='123456789abc'
264
+
handler =IPinfoPlus::create(access_token)
265
+
266
+
details = handler.details('8.8.8.8')
267
+
details.ip # 8.8.8.8
268
+
details.geo['city'] # Mountain View
269
+
details.mobile # mobile carrier info
270
+
details.anonymous['is_proxy'] # false
271
+
```
272
+
273
+
### Residential Proxy API
274
+
275
+
The library also supports the [Residential Proxy API](https://ipinfo.io/developers/residential-proxy-api), which allows you to check if an IP address is a residential proxy. Authentication with your token is required.
0 commit comments