# ipify.js

> ![Tests](https://github.com/github/docs/actions/workflows/test.yml/badge.svg)

Latest version **2.0.3** (published 2025-01-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install ipify.js
pnpm add ipify.js
yarn add ipify.js
bun add ipify.js
```

## Health

**Score 35/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2025-01-30 |
| First published | 2020-06-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Vikramaditya Kokil |
| Maintainers | kokill |
| Keywords | public, ip, ipv4, ipv6, node, address |

## Links

- npm: https://www.npmjs.com/package/ipify.js
- Repository: https://github.com/kokill/ipify.js
- Homepage: https://github.com/kokill/ipify.js#readme
- Issues: https://github.com/kokill/ipify.js/issues
- npm.io page: https://npm.io/package/ipify.js

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 2.0.3 (latest) — 2025-01-30
- 2.0.2 — 2025-01-30
- 2.0.1 — 2025-01-30
- 1.1.6 — 2020-06-16
- 1.1.5 — 2020-06-07
- 1.1.3 — 2020-06-07

## README

# ipify.js  
![Tests](https://github.com/github/docs/actions/workflows/test.yml/badge.svg)

installation command
```
npm i ipify.js
```


ipify for browser and server
- no dependecies
- works on browser and server environment
- lightweight < 350 Bytes (minified + Gzip)
- No IE support (Promise polyfill required for IE)
- Node.js requirements (>= 0.12)

## Example 
```javascript

const { ipv4, ipv6 } = require('ipify.js');

const getIP = async () => {
  const ipv4 = await ipv4();
  // 64.233.161.147
  const ipv6 = await ipv6();
  // 2001:0db8:0000:0000:0000:ff00:0042:8329
}
getIP();
```

---
_Source: https://npm.io/package/ipify.js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
