#geolocation #ip #locator #cli #geolocate

app ipgeo

A CLI tool that finds the location and other information of IP addresses or DNS addresses

8 releases

0.1.8 Apr 28, 2021
0.1.7 Mar 29, 2021
0.1.4 Feb 17, 2021
0.1.2 Jan 26, 2021

#12 in #location

Download history 32/week @ 2023-02-14 20/week @ 2023-02-21 7/week @ 2023-02-28 7/week @ 2023-03-07 23/week @ 2023-03-14 8/week @ 2023-03-21 8/week @ 2023-03-28 7/week @ 2023-04-04 25/week @ 2023-04-11 7/week @ 2023-04-18 7/week @ 2023-04-25 8/week @ 2023-05-02 25/week @ 2023-05-09 10/week @ 2023-05-16 14/week @ 2023-05-23 22/week @ 2023-05-30

72 downloads per month

GPL-3.0 license

264 lines


Crates.io API Crates.io AUR

A CLI tool that finds the location of IP addresses. Built to demonstrate my library ipgeolocate.

With ipgeo you can get the location for an IP address or a DNS address and do lookups for both of them to get data on the ip, latitude, longitude, city, region, country, timezone, method, and a reverse DNS address.

ipgeo was made to work within scripts, so you can use the --silent tag to print information without any extra fluff so it's easier to parse.

ipgeo offers different methods to get information about IP addresses, and each has their own benefits. By default, ip-api.com is used because it gives accurate results and only limits requests by the minute and not by the day, week, or month.


Install it by simply doing

$ cargo install ipgeo

Command Line Arguments

ipgeo 0.1.8
Grant Handy <grantshandy@gmail.com>
Finds IP Information

    ipgeo [FLAGS] [OPTIONS] [--] [ADDRESS]

    -a, --all           Print all available information
    -h, --help          Prints help information
        --horizontal    Print fields horizontally.
    -s, --silent        Run without extra output
    -V, --version       Prints version information
    -v, --verbose       Run with verbose output

    -f, --fields <FIELDS>...    Choose what fields to print about the IP address. [possible values: ip, latitude, longitude, city, region, country, timezone, method, dns]
    -m, --method <SERVICE>      Choose Geolocation API, if not set it defaults to ipapi. [possible values: ipwhois, ipapi, ipapico, freegeoip]

    <ADDRESS>    What IP or DNS address to look up, if none are selected then your network IP address will be chosen


~295K SLoC