mmdblookup man page

mmdblookup — a utility to look up an IP address in a MaxMind DB file


mmdblookup --file [FILE PATH] --ip [IP ADDRESS] [DATA PATH]


mmdblookup looks up an IP address in the specified MaxMind DB file. The record for the IP address is displayed in a JSON-like structure with type annotations.

If an IP's data entry resolves to a map or array, you can provide a lookup path to only show part of that data.

For example, given a JSON structure like this:

    "names": {
        "en": "Germany",
        "de": "Deutschland"
    "cities": [ "Berlin", "Frankfurt" ]

You could look up just the English name by calling mmdblookup with a lookup path of:

mmdblookup --file ... --ip ... names en

Or you could look up the second city in the list with:

mmdblookup --file ... --ip ... cities 1

Array numbering begins with zero (0).

If you do not provide a path to lookup, all of the information for a given IP will be shown.


This application accepts the following options:

-f, --file
The path to the MMDB file. Required.
-i, --ip
The IP address to look up. Required.
-v, --verbose
Turns on verbose output. Specifically, this causes this application to output the database metadata.
Print the program's version number and exit.
-h, -?, --help
Show usage information.

Bug Reports and Pull Requests

Please report all issues to our GitHub issue tracker (https://github.com/maxmind/libmaxminddb…). We welcome bug reports and pull requests. Please note that pull requests are greatly preferred over patches.


This utility was written by Boris Zentner (bzentner@maxmind.com) and Dave Rolsky (drolsky@maxmind.com).

See Also


Referenced By


Explore man page connections for mmdblookup(1).