{"id":15065332,"url":"https://github.com/avaray/gip","last_synced_at":"2026-02-02T08:40:08.248Z","repository":{"id":99480796,"uuid":"483750794","full_name":"Avaray/gip","owner":"Avaray","description":"Get your public IPv4 address","archived":false,"fork":false,"pushed_at":"2024-12-16T15:23:21.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-30T13:04:26.183Z","etag":null,"topics":["address","cli","dependency-free","echo","external-ip","fetch","fetch-api","iot","ip","ipv4","network","npm","npm-module","npm-package","npmjs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/gip","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Avaray.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"funding.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Avaray","patreon":"Avaray_","buy_me_a_coffee":"avaray"}},"created_at":"2022-04-20T17:28:57.000Z","updated_at":"2024-12-16T15:23:50.000Z","dependencies_parsed_at":"2024-09-26T19:14:06.223Z","dependency_job_id":"8922184b-4a26-4c5e-ab06-c92e88fc48f4","html_url":"https://github.com/Avaray/gip","commit_stats":{"total_commits":38,"total_committers":2,"mean_commits":19.0,"dds":0.4736842105263158,"last_synced_commit":"7b4b249828e2acdfd91d1b78a5d151f4e756abf1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Avaray/gip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avaray%2Fgip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avaray%2Fgip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avaray%2Fgip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avaray%2Fgip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Avaray","download_url":"https://codeload.github.com/Avaray/gip/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avaray%2Fgip/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263484436,"owners_count":23473758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["address","cli","dependency-free","echo","external-ip","fetch","fetch-api","iot","ip","ipv4","network","npm","npm-module","npm-package","npmjs"],"created_at":"2024-09-25T00:36:53.108Z","updated_at":"2026-02-02T08:40:08.233Z","avatar_url":"https://github.com/Avaray.png","language":"JavaScript","funding_links":["https://github.com/sponsors/Avaray","https://patreon.com/Avaray_","https://buymeacoffee.com/avaray"],"categories":[],"sub_categories":[],"readme":"# 🐷 GIP (Get IP)\n\nDependency-free, [TypeScript](https://www.typescriptlang.org/)-friendly module and\n[CLI](https://en.wikipedia.org/wiki/Command-line_interface) tool that uses the\n[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) to retrieve your real public\n[IPv4](https://en.wikipedia.org/wiki/IPv4) address from \"IP echo\" services. It fetches data concurrently from multiple services to provide\naccurate results as quickly as possible. By default, **GIP** verifies the IP address by waiting for three matching responses from different\nservices, and you can customize this number using the `ensure` option.\n\n**GIP** uses more than 20 different \"IP echo\" websites, and you can add your own with the `services` option. Because these services are\nexternal, their availability and reliability may vary. You can reduce risk by choosing a sensible `ensure` count.\n\n## Requirements\n\n[NodeJS](https://nodejs.org/en/download) version **20.0.0** or higher.\n\n## [Module](https://nodejs.org/api/esm.html#modules-ecmascript-modules) installation\n\n[NPM](https://docs.npmjs.com/cli/v10/commands/npm-install)\n\n```bash\nnpm i gip\n```\n\n[PNPM](https://pnpm.io/pnpm-cli#commands)\n\n```bash\npnpm add gip\n```\n\n[DENO](https://docs.deno.com/runtime/reference/cli/add/)\n\n```bash\ndeno add npm:gip\n```\n\n[BUN](https://bun.sh/docs/cli/add)\n\n```bash\nbun add gip\n```\n\n## [Module](https://nodejs.org/api/esm.html#modules-ecmascript-modules) usage\n\n```js\nimport gip from \"gip\";\n\ntry {\n  const ip = await gip();\n  console.log(ip);\n} catch (error) {\n  console.log(`Can't get your IP. Reason: ${error}`);\n}\n```\n\nUsage with **options**\n\n```js\nimport gip from \"gip\";\n\nconst options = {\n  services: [\"ipv4.icanhazip.com\", \"ifconfig.me/ip\"],\n  ensure: 10,\n  verbose: true,\n};\n\ntry {\n  const ip = await gip(options);\n  console.log(ip);\n} catch (error) {\n  console.log(`Can't get your IP. Reason: ${error}`);\n}\n```\n\n## [CLI](https://en.wikipedia.org/wiki/Command-line_interface) installation\n\n[NPM](https://docs.npmjs.com/downloading-and-installing-packages-globally)\n\n```bash\nnpm i -g gip\n```\n\n[PNPM](https://pnpm.io/cli/add#--global--g)\n\n```bash\npnpm add -g gip\n```\n\n[DENO](https://docs.deno.com/runtime/reference/cli/install/#global-installation)\n\n```bash\ndeno i -g npm:gip\n```\n\n[BUN](https://bun.sh/docs/cli/install#global-packages)\n\n```bash\nbun i -g gip\n```\n\n## [CLI](https://en.wikipedia.org/wiki/Command-line_interface) usage\n\n```bash\ngip\n# 133.74.20.69\n```\n\nSetting ensure option\n\n```bash\ngip --ensure 10\n# 133.74.20.69\n```\n\nPassing custom services\n\n```bash\ngip --services \"https://ipv4.icanhazip.com/\" \"https://ifconfig.me/ip\"\n# 133.74.20.69\n```\n\n## [CLI](https://en.wikipedia.org/wiki/Command-line_interface) usage without installation\n\n[NPM]()\n\n```bash\nnpx gip\n```\n\n[PNPM](https://pnpm.io/pnpm-cli#commands)\n\n```bash\npnpm dlx gip\n```\n\n[DENO](https://docs.deno.com/runtime/reference/cli/run/)\n\n```bash\ndeno run --allow-net npm:gip\n```\n\n[BUN](https://bun.sh/docs/cli/bunx)\n\n```bash\nbunx gip\n```\n\n## Additional info\n\n- Passing your own services will not prioritize them. You will get answer from the fastest services anyway.\n- If you pass service without specified [protocol](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol),\n  [HTTPS](https://en.wikipedia.org/wiki/HTTPS) will be used.\n- List of built-in services is located in file [services.mjs](https://github.com/Avaray/gip/blob/main/services.mjs). If you know any\n  reliable services, feel free to contribute.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaray%2Fgip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favaray%2Fgip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaray%2Fgip/lists"}