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

@whatsmyfyi/sdk

v0.2.0

Published

Official TypeScript SDK for the whatsmy.fyi IP API — get your public IP with zero config, add free geolocation with an API key.

Readme

@whatsmyfyi/sdk

npm version CI license

Official TypeScript SDK for the whatsmy.fyi IP API.

Get your public IP with zero config — no API key, no signup. Add a free key when you need geolocation, ASN, and timezone data.

import { WhatsMyFyi } from '@whatsmyfyi/sdk'

// No API key needed for the bare IP
const client = new WhatsMyFyi()
const ip = await client.ip.address()  // "203.0.113.42"

That's the whole setup. No account required for the line above.

Installation

npm install @whatsmyfyi/sdk

Works in Node.js (≥18), Deno, Bun, Cloudflare Workers, and the browser. Zero dependencies — it's a thin, typed wrapper around fetch.

With an API key — free geolocation

A free API key (10,000 requests/day) unlocks the full response: city, country, coordinates, timezone, ASN, ISP, currency, and more.

const client = new WhatsMyFyi({ apiKey: 'wmf_your_key' })

// Full response
const data = await client.ip.lookup()
data.ip        // "203.0.113.42"
data.city      // "Amsterdam"
data.country   // "NL"
data.asn       // 13335
data.timezone  // "Europe/Amsterdam"

// Or just the part you need
const location = await client.ip.location()  // { city, country, countryCode, lat, lng }
const org      = await client.ip.org()       // { asn, name }

Error handling

Every API error becomes a typed WhatsMyFyiError with the server's error code:

import { WhatsMyFyi, WhatsMyFyiError } from '@whatsmyfyi/sdk'

try {
  const data = await client.ip.lookup()
} catch (err) {
  if (err instanceof WhatsMyFyiError) {
    err.code    // "rate_limit_exceeded", "invalid_api_key", ...
    err.status  // HTTP status code
    err.message // human-readable explanation
  }
}

5xx responses are retried automatically (3 attempts, exponential backoff).

Don't need an SDK?

Honestly, for many cases you don't. The API is one HTTP call:

# Keyless — plain text
curl https://whatsmy.fyi/ip

# Keyless — JSON (same response shape as api.ipify.org)
curl "https://whatsmy.fyi/ip?format=json"

# With a key — full geolocation
curl https://whatsmy.fyi/api/v1/ip -H "Authorization: Bearer wmf_your_key"

The SDK earns its place when you want types, retries, and structured errors.

About the API

  • Runs on Cloudflare's edge in 300+ cities — IP data comes from the request itself, not from an external geolocation database lookup.
  • Zero logs. We process your IP to return it to you and store nothing. The privacy policy is short because there's nothing to disclose.
  • Free tier is the product, not a trial: 10,000 requests/day per key, commercial use allowed. Enterprise exists for custom limits and SLAs.
  • Full reference: whatsmy.fyi/docs · OpenAPI 3.1 spec · how we compare to other IP APIs

Contributing

Issues and pull requests are welcome — and they get answered. See CONTRIBUTING.md.

License

MIT — built by Koray Köylü at whatsmy.fyi.