{"id":21823801,"url":"https://github.com/onel/freegeoip","last_synced_at":"2025-04-14T04:36:11.319Z","repository":{"id":215679404,"uuid":"739481235","full_name":"onel/freegeoip","owner":"onel","description":"Free geoip info for client requests","archived":false,"fork":false,"pushed_at":"2024-04-14T11:20:14.000Z","size":7,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-15T10:33:45.743Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/onel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-01-05T17:08:13.000Z","updated_at":"2024-01-11T17:39:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"094ca774-f389-4a8a-af54-26e114140c73","html_url":"https://github.com/onel/freegeoip","commit_stats":null,"previous_names":["onel/freegeoip"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onel%2Ffreegeoip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onel%2Ffreegeoip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onel%2Ffreegeoip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onel%2Ffreegeoip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onel","download_url":"https://codeload.github.com/onel/freegeoip/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226796823,"owners_count":17683659,"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-27T17:37:55.958Z","updated_at":"2024-11-27T17:37:56.786Z","avatar_url":"https://github.com/onel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FREE GEOIP SERVICE\n\nGet free geoip data for requests for client requests.\n\nThis works thanks to some special headers added by Google App engine to each request that it serves.\n\nFor this reason, this **can only be deployed on App engine**.\n\nApp engine only returns some basic info like: **latitude, longitude, city, country** but if this is enough then you can get all this for free.\n\n## About\n\nThis is a simple Flask app that reads the special headers that Google App engine adds to each request and returns them as JSON.\n\n**Note:** This only works for requests that come directly from the client's device (no way to request for a specific IP).\n\nApp engine has a decent free tier so this service can be run for free.\n\nExample response:\n\n```json\n{\n    \"city\":\"bucharest\",\n    \"countryCode\":\"RO\",\n    \"ipAddress\":\"xx.xxx.xxx.xx\",\n    \"latitude\":\"44.426767\",\n    \"longitude\":\"26.102538\",\n    \"regionCode\":\"b\"\n}\n```\n\n## Demo\n\nTry it for free at [https://free-geoip.ey.r.appspot.com/](https://free-geoip.ey.r.appspot.com/)\n\n## How to deploy\n\n1. Pull repo\n\n```sh\ngit clone https://github.com/onel/freegeoip .\ncd freegeoip\n```\n\n2. Create a new project in [Google cloud console](https://console.cloud.google.com) and an [App engine app](https://console.cloud.google.com/appengine).\n\n3. Setup local configurations for this new project\n\n```sh\ngcloud config configurations create [project_id]\ngcloud config set project [project_id]\ngcloud auth login\ngcloud app deploy . --version 1\n```\n\n4. Make requests to that endpoint to get getip info\n\n```javascript\nconst url = '[your freegeoip endpoint]'\nfetch(url)\n    .then(response =\u003e response.json())\n    .then(data =\u003e {\n        console.log('JSON data:', data);\n    })\n    .catch(error =\u003e {\n        console.error('Fetch error:', error);\n    })\n```\n\n\n\n## Stack\n\nPython 3.9\n\nFlask\n\n## Licence\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonel%2Ffreegeoip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonel%2Ffreegeoip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonel%2Ffreegeoip/lists"}