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.
- Client
Builder - Builder for
Client. UseClient::builderto 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.
- Threat
Match - Result of a threat-intel lookup. When
listedisfalsethe remaining fields are absent. - Time
Zone - 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.