Python tool that turns IPs into suburb & country via ip-api.com + OpenStreetMap Nominatim. Live lookups only.
I can customise for specific datasets or formats — hire me on Upwork: https://www.upwork.com/freelancers/ericfisher
- Reads a CSV with an IP column (auto-detected)
- Outputs:
ip,suburb,country - Respects free-tier API rate limits
- Works on Windows, macOS, and Linux
pip install -r requirements.txtpython ip_locator_live.py --in "IP_sample__10_rows_.csv" --out "output.csv" --verboseThis processes the included IP_sample__10_rows_.csv and writes output.csv with suburb + country lookups.
ip_locator_live.py— The main scriptIP_sample__10_rows_.csv— Sample input fileoutput.csv— Example output generated from the sample inputrequirements.txt— Dependencies for running the script
- Private/reserved IPs will return blank suburb/country
- Suburb is taken from OpenStreetMap reverse geocoding (falls back to city if needed)
- I can adapt this script for different data sources, output formats, or API providers