{"id":20347747,"url":"https://github.com/subzerobo/ip2locationmirror","last_synced_at":"2026-05-05T16:07:29.606Z","repository":{"id":144212394,"uuid":"198173043","full_name":"subzerobo/ip2locationMirror","owner":"subzerobo","description":null,"archived":false,"fork":false,"pushed_at":"2019-07-22T07:44:20.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-14T22:51:19.931Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/subzerobo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-22T07:43:58.000Z","updated_at":"2019-07-22T07:44:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f5d497c-aa9c-4a37-87db-377582514d58","html_url":"https://github.com/subzerobo/ip2locationMirror","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subzerobo%2Fip2locationMirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subzerobo%2Fip2locationMirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subzerobo%2Fip2locationMirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subzerobo%2Fip2locationMirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/subzerobo","download_url":"https://codeload.github.com/subzerobo/ip2locationMirror/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241877505,"owners_count":20035417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T22:17:55.266Z","updated_at":"2026-05-05T16:07:29.553Z","avatar_url":"https://github.com/subzerobo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/ip2location/ip2location-go)](https://goreportcard.com/report/github.com/ip2location/ip2location-go)\n\n\nIP2Location Go Package\n======================\n\nThis Go package provides a fast lookup of country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type, IDD code, area code, weather station code, station name, mcc, mnc, mobile brand, elevation, and usage type from IP address by using IP2Location database. This package uses a file based database available at IP2Location.com. This database simply contains IP blocks as keys, and other information such as country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type, IDD code, area code, weather station code, station name, mcc, mnc, mobile brand, elevation, and usage type as values. It supports both IP address in IPv4 and IPv6.\n\nThis package can be used in many types of projects such as:\n\n - select the geographically closest mirror\n - analyze your web server logs to determine the countries of your visitors\n - credit card fraud detection\n - software export controls\n - display native language and currency \n - prevent password sharing and abuse of service \n - geotargeting in advertisement\n\nThe database will be updated in monthly basis for the greater accuracy. Free LITE databases are available at https://lite.ip2location.com/ upon registration.\n\nThe paid databases are available at https://www.ip2location.com under Premium subscription package.\n\n\nInstallation\n=======\n\n```\ngo get github.com/ip2location/ip2location-go\n```\n\nExample\n=======\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/ip2location/ip2location-go\"\n)\n\nfunc main() {\n\tip2location.Open(\"./IPV6-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE.BIN\")\n\tip := \"8.8.8.8\"\n\t\n\tresults := ip2location.Get_all(ip)\n\t\n\tfmt.Printf(\"country_short: %s\\n\", results.Country_short)\n\tfmt.Printf(\"country_long: %s\\n\", results.Country_long)\n\tfmt.Printf(\"region: %s\\n\", results.Region)\n\tfmt.Printf(\"city: %s\\n\", results.City)\n\tfmt.Printf(\"isp: %s\\n\", results.Isp)\n\tfmt.Printf(\"latitude: %f\\n\", results.Latitude)\n\tfmt.Printf(\"longitude: %f\\n\", results.Longitude)\n\tfmt.Printf(\"domain: %s\\n\", results.Domain)\n\tfmt.Printf(\"zipcode: %s\\n\", results.Zipcode)\n\tfmt.Printf(\"timezone: %s\\n\", results.Timezone)\n\tfmt.Printf(\"netspeed: %s\\n\", results.Netspeed)\n\tfmt.Printf(\"iddcode: %s\\n\", results.Iddcode)\n\tfmt.Printf(\"areacode: %s\\n\", results.Areacode)\n\tfmt.Printf(\"weatherstationcode: %s\\n\", results.Weatherstationcode)\n\tfmt.Printf(\"weatherstationname: %s\\n\", results.Weatherstationname)\n\tfmt.Printf(\"mcc: %s\\n\", results.Mcc)\n\tfmt.Printf(\"mnc: %s\\n\", results.Mnc)\n\tfmt.Printf(\"mobilebrand: %s\\n\", results.Mobilebrand)\n\tfmt.Printf(\"elevation: %f\\n\", results.Elevation)\n\tfmt.Printf(\"usagetype: %s\\n\", results.Usagetype)\n\tfmt.Printf(\"api version: %s\\n\", ip2location.Api_version())\n\t\n\tip2location.Close()\n}\n```\n\nDependencies\n============\n\nThe complete database is available at https://www.ip2location.com under subscription package.\n\n\nIPv4 BIN vs IPv6 BIN\n====================\n\nUse the IPv4 BIN file if you just need to query IPv4 addresses.\nUse the IPv6 BIN file if you need to query BOTH IPv4 and IPv6 addresses.\n\n\nCopyright\n=========\n\nCopyright (C) 2019 by IP2Location.com, support@ip2location.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubzerobo%2Fip2locationmirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubzerobo%2Fip2locationmirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubzerobo%2Fip2locationmirror/lists"}