Skip to main content

Crate ipdata

Crate ipdata 

Source
Expand description

§ipdata

Rust client for the ipdata.co IP geolocation and threat intelligence API.

§Quick Start

let client = ipdata::IpData::new("your-api-key");

// Look up a specific IP
let info = client.lookup("8.8.8.8").await?;
println!("{} is in {}", info.ip, info.country_name.unwrap_or_default());

// Look up your own IP
let me = client.lookup_self().await?;

// Bulk lookup (up to 100 IPs, requires paid key)
let results = client.bulk(&["8.8.8.8", "1.1.1.1"]).await?;

Structs§

Asn
Autonomous System Number information.
Blocklist
A threat blocklist entry.
Carrier
Mobile carrier information.
Company
Company / organization that owns the IP.
Currency
Currency used in the country.
IpData
Client for the ipdata.co API.
IpInfo
Full IP geolocation and threat intelligence response.
Language
Language spoken in the country.
Threat
Threat intelligence data for an IP address.
ThreatScores
Machine-learning-based reputation scores for an IP address.
TimeZone
Time zone information.

Enums§

Error
Error type for the ipdata client.

Type Aliases§

Result
Convenience type alias.