Expand description
§ipapi
A Rust library to query IP addresses using the ipquery.io API.
§Features
- Query details for a specific IP address
- Bulk query multiple IP addresses
- Fetch your own public IP address
§Example Usage
use ipapi::{query_ip, query_bulk, query_own_ip};
use tokio;
#[tokio::main]
async fn main() {
// Query a specific IP
let ip_info = query_ip("8.8.8.8").await.unwrap();
println!("{:?}", ip_info);
}
§License
This project is licensed under the MIT License.
Structs§
- IPInfo
- Represents the full set of information returned by the API for an IP address.
- ISPInfo
- Represents information about an ISP (Internet Service Provider).
- Location
Info - Represents information about the geographical location of an IP address.
- Risk
Info - Represents information about potential risks associated with an IP address.
Functions§
- query_
bulk - Fetches information for multiple IP addresses.
- query_
ip - Fetches the IP information for a given IP address.
- query_
own_ ip - Fetches the IP address of the current machine.