Online GeoIP Lookups Using


There are lots of ways to resolve an IP to a country/location. The fastest way is to have the database local and do quick checks against the file/database as needed.

But for quick hits it’s always nice to have an online options as well!


This gets you a nice little JSON object with the full results, as seen above.

Here are a few other filtering options:

# Get the country code of the result

curl | grep country | awk -F'”‘ ‘{ print $4 }’

# Get the state of the result

curl | grep region | awk -F'”‘ ‘{ print $4 }’

# Get the city of the result

curl | grep city | awk -F'”‘ ‘{ print $4 }’


Related posts: