IP Lookup
A unified IP geolocation query library using multiple free public providers.
Overview
The ip-lookup crate provides a simple and unified interface to query IP geolocation information from multiple free public providers. It supports various providers like IpApi, IpInfo, IpSb, and more, allowing you to retrieve details such as country, city, coordinates, and network information for a given IP address.
Installation
Add the following to your Cargo.toml:
[]
= "0.1.0"
Usage
The crate provides functions to get the public IP address and query geolocation data using different providers. Below is an example of how to use the library:
use ;
Example Output
The lookup function returns an Option<LookupResult>, where LookupResult contains detailed geolocation information. An example response might look like this:
License
This project is licensed under the MIT License. See the LICENSE file for details.