# oschwald/geoip2-golang

Unofficial MaxMind GeoIP2 Reader for Go

Repository: https://github.com/oschwald/geoip2-golang
Canonical: https://ross.abutalabs.com/products/geoip2-golang
Language: Go
License: ISC
License Family: permissive
Topics: geoip2, maxmind-db, geoip, database, go, geolocation, maxmind
Last push: 2026-08-24T01:54:30+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 84, longevity 100
- inputs: {"age_days": 4554, "days_push": 10, "days_rel": 25, "gap_med": 83, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2332, forks 219 (observed 2026-08-28T04:06:37.779073+00:00)

## What it is
A Go library for reading MaxMind GeoIP2 and GeoLite2 databases to look up geolocation data for IP addresses. It is built on the maxminddb reader and provides typed structs for city, country, and location records.

## Use cases
- look up the country and city of an IP address in Go
- read MaxMind GeoLite2 mmdb databases
- add IP geolocation to a web server or API
- get coordinates and time zone for an IP
- map IP addresses to ISO country codes

## When to choose
- you need typed, convenient access to full GeoIP2 database records in Go
- you want a maintained wrapper over maxminddb with a modern netip.Addr-based API

## When to avoid
- you only need a few fields and want maximum performance - use maxminddb-golang's Lookup directly
- you need live IP geolocation without a local MaxMind database file

## Facets
- artifact type: library
- maturity: active
- function: database-driver, geospatial, sdk
- domain: developer-tools, apis
- platform: go, cross-platform
- tags: geoip2, maxmind, ip-geolocation, mmdb, geolite2, geolocation

## Member repositories
- oschwald/geoip2-golang (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:37.779073+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:37:57.451634+00:00, confidence not recorded.
  - readme: https://github.com/oschwald/geoip2-golang (fetched 2026-08-28T04:06:37.779073+00:00, sha 5105cd2cbc82)
- Data as of 2026-08-30T08:39:29.467469+00:00.
