{"id":18656217,"url":"https://github.com/vikramtiwari/geo-from-ip","last_synced_at":"2025-04-11T17:32:09.594Z","repository":{"id":25522051,"uuid":"28954084","full_name":"VikramTiwari/geo-from-ip","owner":"VikramTiwari","description":"Get geolocation 🌐  information about an IP 📲","archived":false,"fork":false,"pushed_at":"2023-01-06T02:05:18.000Z","size":30474,"stargazers_count":31,"open_issues_count":17,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T12:57:48.133Z","etag":null,"topics":["auto-update","geo","geo-from-ip","geolocation","geolocation-api","maxmind"],"latest_commit_sha":null,"homepage":"https://vikramtiwari.github.io/geo-from-ip/","language":"JavaScript","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/VikramTiwari.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"VikramTiwari"}},"created_at":"2015-01-08T07:23:31.000Z","updated_at":"2024-02-26T15:08:04.000Z","dependencies_parsed_at":"2023-01-14T02:53:09.720Z","dependency_job_id":null,"html_url":"https://github.com/VikramTiwari/geo-from-ip","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VikramTiwari%2Fgeo-from-ip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VikramTiwari%2Fgeo-from-ip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VikramTiwari%2Fgeo-from-ip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VikramTiwari%2Fgeo-from-ip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VikramTiwari","download_url":"https://codeload.github.com/VikramTiwari/geo-from-ip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248449896,"owners_count":21105582,"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":["auto-update","geo","geo-from-ip","geolocation","geolocation-api","maxmind"],"created_at":"2024-11-07T07:22:25.525Z","updated_at":"2025-04-11T17:32:09.159Z","avatar_url":"https://github.com/VikramTiwari.png","language":"JavaScript","funding_links":["https://github.com/sponsors/VikramTiwari"],"categories":[],"sub_categories":[],"readme":"# geo-from-ip\n\nGet geolocation 🌐 information about an IP 📲\n\n![Build Status](https://github.com/VikramTiwari/geo-from-ip/workflows/Build%20Status/badge.svg) [![NPM Version](https://img.shields.io/npm/v/geo-from-ip.svg)](https://www.npmjs.com/package/geo-from-ip) [![NPM Download](https://img.shields.io/npm/dm/geo-from-ip.svg)](https://www.npmjs.com/package/geo-from-ip)\n\n## Features\n\n- No frills install 🚀\n- Downloads GeoLite2 databases automatically during installation 🔋\n- Run `npm install` to upgrade databases which means automatic updates on deployments 💎\n\n## How to use\n\n- Include package in your project\n\n```sh\nnpm install --save geo-from-ip\n# or, if you are using yarn\nyarn add --save geo-from-ip\n```\n\n- Set `MAXMIND_LICENSE_KEY=\u003cyour_maxmind_license_key\u003e` in your environment variables. Read more about [this change on MaxMind's blog](https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/).\n\n- Use package to get geo data from IP\n\n```javascript\nconst geoip = require('geo-from-ip')\nconsole.log(geoip.allData('199.188.195.120'))\n```\n\n- And the complete response will be returned\n\n```json\n{\n  \"code\": {\n    \"state\": \"CA\",\n    \"country\": \"US\",\n    \"registeredCountry\": \"US\",\n    \"continent\": \"NA\"\n  },\n  \"geonameId\": {\n    \"city\": 5391959,\n    \"state\": 5332921,\n    \"country\": 6252001,\n    \"registeredCountry\": 6252001,\n    \"continent\": 6255149\n  },\n  \"city\": \"San Francisco\",\n  \"state\": \"California\",\n  \"country\": \"United States\",\n  \"registeredCountry\": \"United States\",\n  \"continent\": \"North America\",\n  \"postal\": \"94107\",\n  \"location\": {\n    \"accuracy_radius\": 5,\n    \"latitude\": 37.7642,\n    \"longitude\": -122.3993,\n    \"metro_code\": 807,\n    \"time_zone\": \"America/Los_Angeles\"\n  }\n}\n```\n\n- Update database\n\nDatabase will get automatically updated every time deployment happens. But if you would like to force an update, just run:\n\n```sh\nnpm install\n# or, if you are using yarn\nyarn\n```\n\nRemember that you will need to have `MAXMIND_LICENSE_KEY` set in your environment variables.\n\n## Debugging / Developing\n\nRun your code using `geo-from-ip` as debug flag. Look into `pacakge.json` for example.\n\n## Credits\n\n### Database: Max-Mind\n\nThis product includes GeoLite2 data created by MaxMind, available from \u003chttps://www.maxmind.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikramtiwari%2Fgeo-from-ip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvikramtiwari%2Fgeo-from-ip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikramtiwari%2Fgeo-from-ip/lists"}