← Back to blog

New service

How to get your external IP programmatically

Great news! I have just completed my new project, myip1.com. This handy service makes it easy to get your external IP address.

Written by {{author}} on {{date}} ETC

Why I built myip1.com

With a simple interface and ready examples in multiple programming languages, myip1.com makes getting your external address straightforward.

The service is critical when you work in containers, external environments, or through VPN routes with unpredictable paths to the public network.

Programmatic examples

Use the fast endpoint https://myip1.com/raw in scripts and apps:

curl -sS https://myip1.com/raw

python3 -c "import urllib.request; print(urllib.request.urlopen('https://myip1.com/raw').read().decode().strip())"

node -e "fetch('https://myip1.com/raw').then(r => r.text()).then(t => console.log(t.trim()))"

Service link

Open myip1.com

Tags

external ip myip