Get your public IP address
Using the ipify
API or a custom ipify
instance.
npm install --global ipify-cli
$ ipify --help
Usage
$ ipify
Options
--endpoint Custom API endpoint (can be used multiple times for redundancy)
Examples
$ ipify
2001:0db8:85a3:0000:0000:8a2e:0370:7334
$ ipify --endpoint=https://ipify.mycompany.com
2001:0db8:85a3:0000:0000:8a2e:0370:7334
$ ipify --endpoint=https://api.ipify.org --endpoint=https://ipify.example.org
2001:0db8:85a3:0000:0000:8a2e:0370:7334
You can specify multiple endpoints for redundancy. The CLI will try all endpoints concurrently and return the first successful response:
$ ipify --endpoint=https://api.ipify.org --endpoint=https://api64.ipify.org --endpoint=https://backup.example.com
- ipify - API for this package