{"id":51157,"library":"oschwald-geoip2-golang","title":"GeoIP2 Reader","description":"An easy-to-use API for reading MaxMind GeoIP2 and GeoLite2 databases in Go.","status":"active","version":"1.13.0","language":"go","source_language":null,"source_url":"https://github.com/oschwald/geoip2-golang","tags":["geoip","maxmind","geolocation","ip"],"install":[{"cmd":"go get github.com/oschwald/geoip2-golang","lang":"bash","label":"Install github.com/oschwald/geoip2-golang"}],"dependencies":[],"imports":[{"symbol":"geoip2","correct":"github.com/oschwald/geoip2-golang"}],"quickstart":{"code":"package main\n\nimport (\n\t\"fmt\"\n\t\"github.com/oschwald/geoip2-golang\"\n)\n\nfunc main() {\n\tdb, err := geoip2.Open(\"GeoIP2-City.mmdb\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer db.Close()\n\trecord, err := db.City(\"8.8.8.8\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Printf(\"City: %s\\n\", record.City.Names[\"en\"])\n}","lang":"go","description":"Open a GeoIP2 database and look up a city by IP address."},"warnings":[],"env_vars":null,"search_vec":"'api':8 'databas':15 'easi':5 'easy-to-us':4 'geoip':18 'geoip2':1,12 'geolite2':14 'geoloc':20 'go':17 'ip':21 'maxmind':11,19 'read':10 'reader':2 'use':7","created_at":"2026-06-15T06:02:14.990098+00:00","updated_at":"2026-06-15T06:02:14.990098+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/oschwald/geoip2-golang","github":"https://github.com/oschwald/geoip2-golang","docs":"https://pkg.go.dev/github.com/oschwald/geoip2-golang#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}