gitwtfhub

wtf is public-ip-metadata?

qeeqbox/public-ip-metadata — explained in plain English

Analysis updated 2026-08-04 · repo last pushed 2022-01-08

2Audience · developerComplexity · 1/5DormantSetup · easy

TL;DR

A JSON data file that maps public IP address ranges to their associated countries, letting you look up where an IP address is registered.

Mindmap

mindmap
  root((repo))
    What it does
      Maps IP ranges to countries
      JSON lookup table
    Data format
      From and to IP fields
      Country code and ID
    Use cases
      Filter suspicious traffic
      Estimate user locations
      Analytics and security
    Audience
      Developers
      Founders
      Product managers
    Limitations
      Update frequency unclear
      No integration guide

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Filter suspicious website traffic by looking up visitor country from IP address.

REASON 2

Estimate geographic distribution of users from server logs.

REASON 3

Build analytics or security tools that respond differently based on visitor country.

What's in the stack?

JSON

How it stacks up

qeeqbox/public-ip-metadata0-bingwu-0/live-interpreter010zx00x1/faresnipe
Stars222
LanguagePythonPython
Last pushed2022-01-08
MaintenanceDormant
Setup difficultyeasymoderateeasy
Complexity1/52/52/5
Audiencedevelopergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

No setup needed beyond downloading the JSON file and parsing it in your application.

The README does not specify a license, so check the repository files for license terms before using this data.

Wtf does this do

This project provides a simple data file that maps blocks of public IP addresses to the countries they belong to. If you've ever wanted to know what country a given IP address is registered to, this file acts as a lookup table for that information. The data is stored in a JSON file, which is a common, structured text format that is easy for both humans and computers to read. Each entry in the file lists a starting IP address ("from") and an ending IP address ("to") that define a specific range. It then attaches a country code (like "cn" for China) and a three-digit country identifier (like "156") to that range. By checking which range a specific IP address falls into, you can determine its associated country. This would be useful for anyone building analytics tools, security software, or website features that need to respond differently based on where a visitor's internet traffic originates. For example, an e-commerce founder could use it to help filter out suspicious traffic, or a product manager could use it to estimate the geographic distribution of their user base from server logs. The project keeps things very minimal. It is essentially just a raw data resource compiled from public sources like Wikipedia and the creator's own open-source intelligence project. The README does not go into detail on how often the data is updated, how to technically integrate it into a specific application, or what the exact boundaries of each IP range represent beyond the country codes.

Yoink these prompts

Prompt 1
Load the public-ip-metadata JSON file and write a function that takes an IP address and returns its country code by checking which from-to range it falls into.
Prompt 2
Use the public-ip-metadata file to build a simple script that reads a list of IP addresses from a log file and outputs each IP with its associated country.
Prompt 3
Create a website middleware that uses public-ip-metadata to block or redirect traffic from specific countries.

Frequently asked questions

wtf is public-ip-metadata?

A JSON data file that maps public IP address ranges to their associated countries, letting you look up where an IP address is registered.

Is public-ip-metadata actively maintained?

Dormant — no commits in 2+ years (last push 2022-01-08).

What license does public-ip-metadata use?

The README does not specify a license, so check the repository files for license terms before using this data.

How hard is public-ip-metadata to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is public-ip-metadata for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.