npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gautric/node-red-ipinfo

v1.1.0

Published

Node-RED node for IP geolocation using the IPInfo.io API — retrieve city, region, country, coordinates, ISP, and more for any IP address.

Readme

@gautric/node-red-ipinfo

platform GitHub last commit Version Downloads License

A Node-RED node that retrieves geolocation, network, and organization data for any IP address using the IPInfo.io API. Powered by the official node-ipinfo client library (v4.3.0).


Features

  • IPv4 & IPv6 lookups with input validation
  • Configurable caching (LRU) to reduce API calls and improve latency
  • Customizable input/output message properties
  • Internationalized status and error messages (i18n)
  • Includes example flow importable from the Node-RED editor
  • Built on node-ipinfo 4.3.0 — the latest official IPInfo.io Node.js client

Prerequisites

| Requirement | Version | |-------------|---------| | Node.js | ≥ 18 | | Node-RED | ≥ 4.0.8 | | node-ipinfo | ≥ 4.3.0 (installed automatically) | | IPInfo.io account | Free tier available at ipinfo.io/signup |

Installation

Node-RED Palette Manager

  1. Open Node-RED → MenuManage palette
  2. Search for @gautric/node-red-ipinfo
  3. Click Install

Command Line

cd ~/.node-red
npm install @gautric/node-red-ipinfo

Quick Start

  1. Drag an ipinfo node onto your flow.
  2. Double-click it and create a new IPInfo Config node.
  3. Paste your API token into the config.
  4. Wire an inject node (payload = 8.8.8.8) → ipinfodebug.
  5. Deploy and click inject.

Node Reference

ipinfo

Looks up geolocation data for the IP address found in the incoming message.

| Property | Default | Description | |----------|-----------|-------------| | Input | msg.payload | Message property containing the IP address (string) | | Output | msg.payload | Message property where the result object is stored | | Config | — | IPInfo Config node to use |

Accepted input values

  • Valid IPv4 address, e.g. 8.8.8.8
  • Valid IPv6 address, e.g. 2001:4860:4860::8888
  • The string me (returns info for the calling machine's public IP)

Output object

{
  "ip": "8.8.8.8",
  "hostname": "dns.google",
  "city": "Mountain View",
  "region": "California",
  "country": "US",
  "loc": "37.4056,-122.0775",
  "org": "AS15169 Google LLC",
  "postal": "94043",
  "timezone": "America/Los_Angeles"
  // additional fields depend on your IPInfo.io plan
}

Status indicators

| Color / Shape | Meaning | |---------------|---------| | 🔵 dot | Lookup in progress | | 🟡 ring | Invalid IP address (skipped) | | 🔴 ring | Configuration or input error | | 🔴 dot | API / network error | | (none) | Last lookup succeeded |

ipinfo-config

Shared configuration node holding your API credentials and cache settings.

| Property | Default | Description | |--------------|---------------|-------------| | Name | IPInfo Config | Display name | | Token | — | Your IPInfo.io API token (stored as credential) | | Timeout | 1000 ms | HTTP request timeout | | Cache | false | Enable LRU caching | | Max Items | 5000 | Maximum cached entries | | TTL | 86400000 ms (24 h) | Time-to-live per cache entry |

Example Flow

An example flow is bundled with the node. Import it from:

MenuImportExamples@gautric/node-red-ipinfo

screenshot

API Rate Limits

| Plan | Requests / month | |----------|-----------------| | Free | 50,000 | | Basic | 250,000 | | Standard | 500,000 | | Business | Custom |

Enable caching in the config node to stay within limits.

Troubleshooting

| Symptom | Likely cause | Fix | |---------|-------------|-----| | Red "Missing configuration" status | Config node not linked | Double-click the ipinfo node and select a config | | Red "Error" status after deploy | Invalid or missing API token | Check your token at ipinfo.io/account/token | | Yellow "Invalid IP" status | Input is not a valid IP string | Ensure msg.payload contains a valid IPv4/IPv6 address | | Timeout errors | Slow network or low timeout | Increase the timeout value in the config node | | Rate limit errors (HTTP 429) | Too many requests | Enable caching or upgrade your IPInfo.io plan |

Dependencies

| Package | Version | Purpose | |---------|---------|---------| | node-ipinfo | ^4.3.0 | Official IPInfo.io Node.js client |

Development

# Clone the repo
git clone https://github.com/gautric/node-red-ipinfo.git
cd node-red-ipinfo

# Install dependencies
npm install

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

Contributing

Contributions are welcome. Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add or update tests for your changes
  4. Submit a pull request

Open an issue for bugs or feature requests.

Changelog

1.1.0

  • Updated node-ipinfo dependency from 4.0.1 to 4.3.0
  • Improved IPv6 validation (supports compressed and mixed notation)
  • Added input validation for empty strings and missing token warnings
  • Added nodeDone guard checks for backward compatibility with older Node-RED
  • Added files field to package.json for leaner npm package
  • Raised minimum Node.js version to ≥ 18 (12.x is EOL)
  • Added unit tests
  • Improved README with troubleshooting guide, API reference, and dependency docs
  • Added i18n keys for all config labels

1.0.0

  • Initial release

License

Apache-2.0

Support

If this project helps you, consider buying the developer a coffee. ☕