#ip #information #toml

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

#175 in Geospatial

Download history 6/week @ 2023-12-14 8/week @ 2023-12-21 45/week @ 2023-12-28 33/week @ 2024-01-04 12/week @ 2024-01-11 23/week @ 2024-01-18 40/week @ 2024-01-25 77/week @ 2024-02-01 52/week @ 2024-02-08 58/week @ 2024-02-15 53/week @ 2024-02-22 63/week @ 2024-02-29 78/week @ 2024-03-07 45/week @ 2024-03-14 97/week @ 2024-03-21 187/week @ 2024-03-28

412 downloads per month
Used in 2 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

~18–29MB
~451K SLoC