
Explore IP address ranges by geographic location
Explore IP address ranges by geographic location.
IPGlobe is a local-first CLI and interactive map for finding published IP range observations around a city or coordinates. It downloads account-free open datasets, builds spatial indexes and keeps each provider's observations and provenance separate.


Version 1.0.0 provides a stable CLI/API/JSON contract, a compact byte-bounded ASN cache, and visible-area map results on the shared search engine. The 2015 IpByGeo prototype is preserved at Git tag legacy-ipbygeo-2015.
Download the wheel or source package from the 1.0.0 release, verify SHA256SUMS, and install the wheel with python -m pip install ./ipglobe-1.0.0-py3-none-any.whl. The release also includes the JSON schema and a commit/build receipt. Dataset downloads remain separate from the package. See release notes and the stable contract.
Python 3.11 or later is required. Linux is verified; other platforms are not yet qualified.
git clone [email protected]:blackploit/IPGlobe.git
cd IPGlobe
python3 -m venv .venv
.venv/bin/python -m pip install -e .
source .venv/bin/activate
ipglobe --help
ipglobe near "Santiago, Chile" --radius 25km
ipglobe near "London, GB" --radius 10mi --format json
ipglobe near --lat -33.4489 --lon -70.6693 --radius 25km --family ipv6
ipglobe near --lat 51.5074 --lon -0.1278 --radius 500m --source dbip-city
ipglobe --offline near --lat -33.4489 --lon -70.6693 --radius 25km
The first valid query automatically prepares all enabled account-free sources. It announces the data directory, downloads the latest available files and builds indexes. Allow several GiB of disk space and several minutes for the first import; exact requirements depend on publisher releases.
Progress goes to stderr and includes percentage, bytes, transfer speed, elapsed time and ETA when measurable. Unknown totals use an indeterminate indicator. Import counters and indexing stages are explicit; index-building ETA is not invented. Ctrl+C preserves valid snapshots and resumable downloads.
Global switches (--data-dir, --offline, --quiet) must precede the subcommand. --help, --version, source listing and doctor do not download data. --offline makes no network requests and requires installed data.
City lookup uses the locally downloaded GeoNames gazetteer. Ambiguous names return candidates: use a country, --place-id or coordinates to choose explicitly. Coverage is limited to the published cities500 dataset and its aliases, not street addresses.
ipglobe map
ipglobe map --port 8766 --no-browser
ipglobe --offline map
The command prepares enabled sources when needed, serves the bundled interface on http://127.0.0.1:8765, and opens your browser. Ctrl+C stops the server. It binds only to loopback; this is a local application, not a hosted service. The default port can be changed. A browser with WebGL2 support is required; Node.js is not needed to install or run the map.
latitude, longitude. Ambiguous names offer candidates; autocomplete uses the installed GeoNames index.The counters and table cover all matching observations whose reported source coordinates are in the visible map and within the selected radius. Totals are independent of the table's first 200 rows: zooming fetches a new sample from that area, including ranges absent from the previous sample. Source badges and clusters use the same visible scope. Moving beyond the search circle produces an empty result; use the fit-area button to see the complete radius again.
The map stays north-up without tilt so its geographic viewport matches the visible rectangle. Queries wait briefly for camera movement to settle, cancel superseded requests and prevent old responses from overwriting the new view. Results and exports are marked as updating during movement. The API filters original source coordinates before bounded display cells and browser clustering, so an aggregate's center never decides which original locations count. Very dense visible queries retain all observation/location weights; the interface identifies aggregates. JSON export includes the complete weighted visible map and the displayed range sample, with viewport bounds, totals and truncation metadata. Copied CLI commands reproduce the visible scope using --bounds.
Street cartography comes from OpenFreeMap / OpenMapTiles / OpenStreetMap and needs a connection. --offline map uses bundled Natural Earth country geometry and Noto Sans glyphs, with no remote browser resources. Place lookup and IP queries stay local in both modes. Detailed cartography falls back to the local basemap if its resources fail. Provider license notices remain available in both modes.
The version-one schema is bundled in the wheel and served at /api/schema; the documented error envelope has stable machine codes. The read-only local API exposes /api/status, /api/places?q=..., /api/search?lat=...&lon=...&radius_km=... and API documentation at /api/docs. Supply west, south, east and north together to intersect the radius with a viewport; omitting all four returns the complete radius. Bounds are inclusive; west > east crosses the antimeridian. Geographic filters are repeated source parameters; ASN dataset filters are repeated asn_source parameters and require asn. The API validates finite coordinates, radius, family and ASN, rejects cross-origin requests/untrusted hostnames and bounds expensive concurrent queries. Query failures clear displayed results rather than leaving a stale export active.
The CLI can reproduce the same viewport intersection:
ipglobe --offline near --lat -33.4489 --lon -70.6693 --radius 25km --bounds=-70.7,-33.5,-70.65,-33.4 --format json
scope.kind distinguishes viewport from radius; query.bounds identifies an applied viewport. This is a filter on published location estimates, not an IP interval or a network boundary. Dataset licenses and ASN interval provenance are preserved.