Skip to main content

Crate ip_api_io

Crate ip_api_io 

Source
Expand description

Official Rust client for the ip-api.io IP intelligence and email validation API: IP geolocation, email validation, fraud detection and risk scoring, VPN/proxy/Tor detection, ASN lookup, WHOIS, DNS and domain age.

Get a free API key at https://ip-api.io.

let client = ip_api_io::Client::with_api_key("YOUR_API_KEY");

let info = client.lookup_ip("8.8.8.8").await?;
println!("{:?} vpn={}", info.location.country, info.suspicious_factors.is_vpn);

let risk = client.risk_score_ip("8.8.8.8").await?;
println!("{} {}", risk.score, risk.risk_level);

A synchronous client is available behind the blocking feature as blocking::Client.

Re-exports§

pub use models::*;

Modules§

blocking
Blocking (synchronous) client, enabled with the blocking cargo feature.
models
Response models mirroring the schemas in https://ip-api.io/openapi.json. Unknown fields are tolerated for forward compatibility.

Structs§

Client
Async client for the ip-api.io API.
ClientBuilder
Builder for Client.

Enums§

Error
Errors returned by the ip-api.io client.

Constants§

MAX_BATCH_SIZE
Documented per-request limit for batch endpoints.
VERSION
Client library version.