A simple HTTP server and CLI tool that returns the visitor's IP address in Plain Text, JSON, JSONP or XML format along with optional geographic information.
- Supports IPv4 and IPv6
- Two modes: CLI lookup (
ip.8080.li 8.8.8.8) or HTTP server (ip.8080.li serve) - Response includes flag, continent, country, region, city, postal code, coordinates, timezone, ASN details, and threat score
- All-in-one binary – GeoIP database auto-updates built in (no separate updater needed)
- Threat intelligence – checks IPs against the IPsum threat feed (persisted to disk, works offline)
- No API key required. No ratelimit
- 100% Free and Open Source
Look up an IP address directly from your terminal:
# positional IP
ip.8080.li 8.8.8.8
ip.8080.li 8.8.8.8 --format json
# or --ip flag
ip.8080.li --ip 8.8.8.8| Flag | Default | Description |
|---|---|---|
--ip <addr> |
IP address to look up (or pass as positional arg) | |
--format <fmt> |
text |
Output format: text, json, jsonp, xml |
--callback <name> |
callback |
JSONP callback name |
--db-path <dir> |
~/.config/ip.8080.li |
GeoIP database directory path |
--update |
Force refresh of all data before lookup | |
-v, --version |
Show version |
$ ip.8080.li 8.8.8.8
8.8.8.8
$ ip.8080.li 8.8.8.8 --format json
{"ip":"8.8.8.8","threatScore":0}
$ ip.8080.li 8.8.8.8 --format xml
<?xml version="1.0" encoding="UTF-8"?>
<response>
<ip>8.8.8.8</ip>
<threatScore>0</threatScore>
</response>
$ ip.8080.li 8.8.8.8 --format jsonp --callback myFn
myFn({"ip":"8.8.8.8","threatScore":0});Start the HTTP server:
ip.8080.li serve
ip.8080.li serve --host 0.0.0.0 --port 3000| Flag | Default | Description |
|---|---|---|
--host <addr> |
0.0.0.0 |
Bind address |
--port <port> |
3000 (or PORT env) |
Listen port |
--db-path <dir> |
~/.config/ip.8080.li |
GeoIP database directory path |
The below APIs support programmatic access without any limits.
curl https://ip.8080.liAlternatively, visit https://ip.8080.licurl https://ip.8080.li?format=jsonAlternatively, visit https://ip.8080.li?format=jsoncurl https://ip.8080.li?format=jsonpAlternatively, visit https://ip.8080.li?format=jsonpcurl https://ip.8080.li?format=jsonp&callback=customFnAlternatively, visit https://ip.8080.li?format=jsonp&callback=customFncurl https://ip.8080.li?format=xmlAlternatively, visit https://ip.8080.li?format=xml
curl https://ip.8080.li/geoAlternatively, visit https://ip.8080.li/geocurl https://ip.8080.li/geo?format=jsonAlternatively, visit https://ip.8080.li/geo?format=jsoncurl https://ip.8080.li/geo?format=jsonpAlternatively, visit https://ip.8080.li/geo?format=jsonpcurl https://ip.8080.li/geo?format=jsonp&callback=customFnAlternatively, visit https://ip.8080.li/geo?format=jsonp&callback=customFncurl https://ip.8080.li/geo?format=xmlAlternatively, visit https://ip.8080.li/geo?format=xml
curl https://ip.8080.li/?ip=8.8.8.8Alternatively, visit https://ip.8080.li/?ip=8.8.8.8curl https://ip.8080.li/?ip=8.8.8.8&format=jsonAlternatively, visit https://ip.8080.li/?ip=8.8.8.8&format=jsoncurl https://ip.8080.li/?ip=8.8.8.8&format=jsonpAlternatively, visit https://ip.8080.li/?ip=8.8.8.8&format=jsonpcurl https://ip.8080.li/?ip=8.8.8.8&format=jsonp&callback=customFnAlternatively, visit https://ip.8080.li/?ip=8.8.8.8&format=jsonp&callback=customFncurl https://ip.8080.li/?ip=8.8.8.8&format=xmlAlternatively, visit https://ip.8080.li/?ip=8.8.8.8&format=xml
| Variable | Default | Description |
|---|---|---|
PORT |
3000 |
Server listen port |
DEBUG |
true |
Enable debug logging |
POWERED_BY |
Custom X-Powered-By header |
|
GEOIPUPDATE_DB_PATH |
~/.config/ip.8080.li |
GeoIP database and IPsum cache directory |
GEOIPUPDATE_ACCOUNT_ID |
MaxMind account ID (for auto-updates) | |
GEOIPUPDATE_LICENSE_KEY |
MaxMind license key (for auto-updates) | |
GEOIPUPDATE_EDITION_IDS |
Space-separated edition IDs (e.g. GeoLite2-ASN GeoLite2-City) |
|
GEOIPUPDATE_FREQUENCY |
168 |
Update check interval in hours |
# build for current platform
make build
./ip.8080.li -v
# build for all platforms
make build-all
# -> dist/ip.8080.li-linux-amd64
# -> dist/ip.8080.li-darwin-arm64
# -> dist/ip.8080.li-windows-amd64.exe
# ...
# or directly with go
go build -o ip.8080.li .The version is embedded at build time from git describe. Run ip.8080.li -v to see it.
git clone https://github.com/P1N2O/ip.8080.li.git
cd ip.8080.li
cp .env.example .env
# run as server
go run . serve
# or CLI lookup in one shot
go run . 8.8.8.8git clone https://github.com/P1N2O/ip.8080.li.git
cd ip.8080.li
cp .env.example .env
# build and start
docker compose up -d --build
# or use the published image
docker run -p 3000:3000 ghcr.io/p1n2o/ip.8080.li:latestNote: The GeoIP database auto-updater and IPsum threat feed run in the same process. Set
GEOIPUPDATE_ACCOUNT_ID,GEOIPUPDATE_LICENSE_KEY, andGEOIPUPDATE_EDITION_IDSin your.envto enable automatic GeoIP updates. IPsum is fetched from the public GitHub feed and cached to disk.
Tag a version to trigger the release workflow:
git tag v1.0.0
git push origin v1.0.0This automatically:
- Builds binaries for all platforms (linux, darwin, windows × amd64, arm64, arm)
- Uploads them to the GitHub Release
- Builds and pushes a multiarch Docker image to
ghcr.io/<org>/ip.8080.li
- MaxMind – GeoLite2 geolocation databases (ASN, City). GeoLite2 is distributed under the CC BY-SA 4.0 license.
- IPsum – Threat intelligence feed of known malicious IPs, maintained by Miroslav Stampar. IPsum is dedicated to the public domain (The Unlicense).