Popularity
2.8
Stable
Activity
0.5
Declining
211
11
14

Monthly Downloads: 0
Programming language: JavaScript
License: MIT License
Tags: Network     CLI     Cli-app     External     Public     Address     Ipv6     Ipv4     Ip     Bin     Own    
Latest version: v5.0.0

ipify alternatives and similar modules

Based on the "Network" category.
Alternatively, view ipify alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of ipify or a related project?

Add another 'Network' Module

README

ipify

Get your public IP address

Using the Ipify API or a custom Ipify instance.

Install

$ npm install ipify

Usage

const ipify = require('ipify');

(async () => {
    console.log(await ipify());
    //=> '2001:0db8:85a3:0000:0000:8a2e:0370:7334'

    console.log(await ipify({useIPv6: false}));
    //=> '82.142.31.236'
})();

API

ipify(options?)

Returns a Promise<string> with an IP address.

options

Type: object

useIPv6

Type: boolean\ Default: true

Use the IPv6 API endpoint. The IPv6 endpoint will return an IPv6 address if available, IPv4 address otherwise.

Setting the endpoint option will override this.

endpoint

Type: string\ Default: 'https://api6.ipify.org'

Custom API endpoint.

FAQ

How is this different from public-ip?

This package only targets the Ipify service, while public-ip targets multiple services, is faster, and more resilient. Unless you run your own Ipify instance, you probably want public-ip instead.

Related