#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

#194 in Geospatial

Download history 44/week @ 2024-03-13 93/week @ 2024-03-20 182/week @ 2024-03-27 62/week @ 2024-04-03 38/week @ 2024-04-10 48/week @ 2024-04-17 51/week @ 2024-04-24 73/week @ 2024-05-01 83/week @ 2024-05-08 50/week @ 2024-05-15 63/week @ 2024-05-22 44/week @ 2024-05-29 79/week @ 2024-06-05 38/week @ 2024-06-12 48/week @ 2024-06-19 46/week @ 2024-06-26

219 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

~11–20MB
~329K SLoC