/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.

GET plain HTTP ok no signupnothing stored
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

Parameters

InputWhat it does
(no input)Returns the public IP the request arrived from — one line, no decoration.
Accept: application/jsonReturn {"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.