/ip Your Public IP
Just your public IP, on one line — the thin building block you want in a script. Need geo, ASN or reverse DNS? Pass the IP to worldip.io; curlhub keeps this one deliberately plain.
curl curlhub.sh/ip
Usage
With curl
curl curlhub.sh/ip
With the CLI
curlhub ip
Structured output for scripts
curl -s curlhub.sh/ip -H 'Accept: application/json'
Output
curl curlhub.sh/ip
203.0.113.42
# Full IP intel: curl worldip.io/203.0.113.42
Parameters
| Input | What it does |
|---|---|
(no input) | Returns the public IP the request arrived from — one line, no decoration. |
Accept: application/json | Return {"ip": "…"} as JSON. |
Recipes
Use it in a script
MYIP=$(curl -s curlhub.sh/ip)
One clean line, easy to capture into a variable.
Then look up its ASN & geo
curl worldip.io/$(curl -s curlhub.sh/ip)
curlhub stays thin on purpose; worldip.io does the enrichment.