#ip #information

geolocation

A library to get geolocation information of an IP. Its simple

1 unstable release

0.2.1 Mar 9, 2022
0.2.0 Mar 8, 2022
0.1.2 Mar 8, 2022
0.1.1 Mar 8, 2022
0.1.0 Mar 8, 2022

#223 in Geospatial

Download history 92/week @ 2024-07-20 59/week @ 2024-07-27 63/week @ 2024-08-03 32/week @ 2024-08-10 34/week @ 2024-08-17 63/week @ 2024-08-24 40/week @ 2024-08-31 38/week @ 2024-09-07 35/week @ 2024-09-14 69/week @ 2024-09-21 56/week @ 2024-09-28 32/week @ 2024-10-05 30/week @ 2024-10-12 30/week @ 2024-10-19 40/week @ 2024-10-26 29/week @ 2024-11-02

130 downloads per month
Used in 3 crates

MIT license

5KB

geolocation

Get geolocation information of an IP. Its simple.

geolocation = "0.2.1"

Add this line to your Cargo.toml.

Example

Using geolocation is really quite easy and simple:

use geolocation;
fn main() {
    let ip = "<Put your IP address Here>";
    let info = geolocation::find(ip).unwrap();
 
    println!("{:?}", info.city);
}

This and more examples are found in the examples directory.

Query Limits

You can send 45 requests per minute.

Fields

The API can get these fields about IP addresses.

ip
latitude
longitude
city
region
country
timezone
location

lib.rs:

geolocation

Get geolocation information of an IP. Its simple.

geolocation = "0.2.1"

Add to Cargo.toml.

Example

Using geolocation is really quite easy:

use geolocation;
fn main() {
    let ip = "<Put your IP address Here>";
    let info.city = geolocation::find(ip).unwrap();

    println!("{:?}", info.city.city);
}

This and more examples are found in the examples directory.

Query Limits

You can send 45 requests per minute.

Fields

The API can get these fields about IP addresses.

Written with love, in Rust.

Dependencies

~13–22MB
~335K SLoC