Skip to main content

Crate ipdatainfo

Crate ipdatainfo 

Source
Expand description

Official Rust client for the ipdata.info IP geolocation, ASN, and threat-intelligence API.

use ipdatainfo::Client;

let client = Client::new(); // free tier; or Client::builder().api_key("KEY").build()
let info = client.lookup("8.8.8.8").unwrap();
println!("{:?} {:?}", info.city, info.country);

Structs§

AsnBrief
Compact ASN subset returned by crate::Client::asn.
Client
Client for the ipdata.info IP geolocation, ASN, and threat-intelligence API.
ClientBuilder
Builder for Client. Use Client::builder to obtain one.
Connection
Connection (ASN/org/ISP) block.
Currency
Country currency block.
Flag
Flag image + emoji representations of the country.
GeoInfo
Compact geo subset returned by crate::Client::geo.
IpInfo
Full geolocation record returned by crate::Client::lookup.
Network
ASN/route block for the IP.
Security
Anonymity/threat flags for the IP.
ThreatMatch
Result of a threat-intel lookup. When listed is false the remaining fields are absent.
TimeZone
Enriched timezone object.

Enums§

Error
All errors that can occur while talking to the ipdata.info API.

Constants§

DEFAULT_BASE_URL
Free tier host: 50 requests/min, no API key required.
PRO_BASE_URL
Paid tier host, used automatically once an API key is configured.