API Documentation

Free IP address API. No rate limits. No tracking.

Overview

whatsmy.fyi provides a single REST endpoint that returns IP address, geolocation, and connection metadata for the requesting IP. All data comes directly from the Cloudflare edge network β€” no third-party databases, no caching, no IP query logging.

  • Free tier β€” 10,000 requests/day per key (Enterprise for unlimited)
  • No IP query logging β€” we never store the IPs you look up
  • Powered by Cloudflare Workers β€” global sub-50ms latency
  • Three scopes: ip, geo, full

Base URL

https://whatsmy.fyi/api/v1

Authentication

All requests require an API key. Pass it as a Bearer token in the Authorization header (preferred) or as a key query parameter.

# Header (preferred)
curl https://whatsmy.fyi/api/v1/ip \
  -H "Authorization: Bearer wmf_your_api_key"

# Query parameter (fallback)
curl "https://whatsmy.fyi/api/v1/ip?key=wmf_your_api_key"

Don't have a key? Create a free account β†’

Scopes

Each API key has a scope that controls which fields are returned. You choose the scope when creating a key and can change it anytime from the dashboard.

IPIP address only

status, ip, ipv6

GeoIP address + location + networkdefault

status, ip, ipv6, city, region, region_code, country, country_name,
continent, latitude, longitude, timezone, timezone_offset, postal_code,
asn, org, as, is_eu, currency

FullGeo + connection details

Everything in Geo, plus: http_protocol, tls_version, tls_cipher, rtt, colo, proxy, hosting

Endpoint

GET/api/v1/ip

Returns IP metadata for the caller. The response shape depends on the key's scope.

Request

GET /api/v1/ip HTTP/1.1
Host: whatsmy.fyi
Authorization: Bearer wmf_your_api_key

Response by scope

{
  "status": "success",
  "ip": "203.0.113.42",
  "ipv6": null,
  "city": "Amsterdam",
  "region": "North Holland",
  "region_code": "NH",
  "country": "NL",
  "country_name": "Netherlands",
  "continent": "EU",
  "latitude": 52.374,
  "longitude": 4.8897,
  "timezone": "Europe/Amsterdam",
  "timezone_offset": 7200,
  "postal_code": "1011",
  "asn": 1101,
  "org": "SURF B.V.",
  "as": "AS1101 SURF B.V.",
  "is_eu": true,
  "currency": "EUR"
}

Response fields

The Scope column shows which key scope includes each field. ALL = all scopes, GEO+ = geo and full, FULL = full only.

FieldTypeScopeDescription
statusstringALLAlways "success" on a valid response
ipstringALLIPv4 address of the request (null if IPv6)
ipv6stringALLIPv6 address of the request (null if IPv4)
citystringGEO+City name
regionstringGEO+Region / state name
region_codestringGEO+ISO 3166-2 subdivision code (e.g. "NH", "34")
countrystringGEO+ISO 3166-1 alpha-2 country code (e.g. "NL")
country_namestringGEO+Full country name in English (e.g. "Netherlands")
continentstringGEO+Two-letter continent code (e.g. "EU")
latitudenumberGEO+Latitude (decimal degrees)
longitudenumberGEO+Longitude (decimal degrees)
timezonestringGEO+IANA timezone identifier (e.g. "Europe/Amsterdam")
timezone_offsetnumberGEO+UTC offset in seconds (e.g. 7200 = UTC+2)
postal_codestringGEO+Postal / ZIP code
asnnumberGEO+Autonomous System Number
orgstringGEO+AS organisation name (ISP)
asstringGEO+Formatted AS string (e.g. "AS1101 SURF B.V.")
is_eubooleanGEO+Whether the IP is located in the EU
currencystringGEO+ISO 4217 currency code for the country (e.g. "EUR")
http_protocolstringFULLHTTP protocol version (e.g. "HTTP/3", "HTTP/2")
tls_versionstringFULLTLS version (e.g. "TLSv1.3")
tls_cipherstringFULLTLS cipher suite
rttnumberFULLRound-trip time from client to Cloudflare edge (ms)
colostringFULLCloudflare datacenter IATA code that handled the request
proxybooleanFULLWhether the ASN is a known VPN or proxy provider
hostingbooleanFULLWhether the ASN is a known hosting or cloud provider

Error reference

StatusErrorMeaning
401missing_api_keyNo API key was provided in the request
401invalid_api_keyThe key does not exist or was deleted
403inactive_api_keyThe key exists but has been deactivated
429rate_limit_exceededFree tier limit of 10,000 req/day reached; resets at midnight UTC
500internal_errorUnexpected server error β€” please try again

Code examples

curl https://whatsmy.fyi/api/v1/ip \
  -H "Authorization: Bearer wmf_your_api_key"

Rate limits

The free tier allows 10,000 requests per day per API key. The counter resets at midnight UTC. Rate limit status is returned on every response via headers:

X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9987
X-RateLimit-Reset: 1749081600  # Unix timestamp of next reset

When the limit is exceeded, the API returns a 429 response:

{
  "error": "rate_limit_exceeded",
  "message": "You have reached the free tier limit of 10,000 requests/day. Resets at midnight UTC.",
  "docs": "https://whatsmy.fyi/docs#rate-limits",
  "enterprise": "https://whatsmy.fyi/enterprise"
}

Need more? Enterprise plan β†’

Official Node.js SDK

Install the official @whatsmyfyi/sdk package for TypeScript-first access with automatic retries and full type definitions.

npm install @whatsmyfyi/sdk
import { WhatsMyFyi } from '@whatsmyfyi/sdk'

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

// Full response
const data = await client.ip.lookup()
console.log(data.city)      // "Amsterdam"
console.log(data.country)   // "NL"

// Quick helpers
const ip  = await client.ip.address()   // "203.0.113.42"
const loc = await client.ip.location()  // { city, country, countryCode, lat, lng }
const org = await client.ip.org()       // { asn, name }
  • Zero dependencies β€” uses native fetch
  • Works in Node.js, Deno, Bun, and the browser
  • Auto-retry on 5xx with exponential backoff (max 3 attempts)
  • Typed WhatsMyFyiError with code, message, status

OpenAPI Specification

The full OpenAPI 3.1 spec is available for import into Postman, Insomnia, or any compatible tool. In Postman, go to File β†’ Import β†’ Link and paste the URL below.

https://whatsmy.fyi/openapi.json
Download OpenAPI spec

Badge

Add a badge to your README or website to show that you use the whatsmy.fyi API.

Powered by whatsmy.fyi

HTML

<a href="https://whatsmy.fyi">
  <img src="https://whatsmy.fyi/api/badge" alt="Powered by whatsmy.fyi" height="40" />
</a>

Markdown (GitHub README)

[![Powered by whatsmy.fyi](https://whatsmy.fyi/api/badge)](https://whatsmy.fyi)

Try it live

Make a real API request right here β€” no account or API key needed. You'll see your own IP data returned directly from the Cloudflare edge.

Live demo β€” no API key needed

This returns your real IP data from the Cloudflare edge.

Hit "Send Request" to see your real IP data.

Get started

Create a free account to get your API key in under a minute.

Create a free account β†’