{"id":18457816,"url":"https://github.com/rixafy/freelocalgeoipapi","last_synced_at":"2026-01-27T20:16:15.385Z","repository":{"id":208734750,"uuid":"722354723","full_name":"Rixafy/FreeLocalGeoIpApi","owner":"Rixafy","description":"📡 Free local geo ip PHP API based on MaxMind geoip2 database.","archived":false,"fork":false,"pushed_at":"2024-09-15T19:35:38.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T06:51:08.213Z","etag":null,"topics":["api","geoip2","geolocation","geolocation-api","ip-api","maxmind","maxmind-db","maxmind-geoip","maxmind-geoip2-api","php","php-ip","php8"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rixafy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-11-23T01:01:14.000Z","updated_at":"2025-02-03T15:28:51.000Z","dependencies_parsed_at":"2023-12-13T00:13:41.890Z","dependency_job_id":"eeddf9b7-c115-4de1-b4b8-ca2373ab5ecc","html_url":"https://github.com/Rixafy/FreeLocalGeoIpApi","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"c5105f2581b6eabe9d03cf760fd5dcf52fde06db"},"previous_names":["rixafy/freelocalgeoipapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rixafy%2FFreeLocalGeoIpApi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rixafy%2FFreeLocalGeoIpApi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rixafy%2FFreeLocalGeoIpApi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rixafy%2FFreeLocalGeoIpApi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rixafy","download_url":"https://codeload.github.com/Rixafy/FreeLocalGeoIpApi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247785916,"owners_count":20995641,"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":["api","geoip2","geolocation","geolocation-api","ip-api","maxmind","maxmind-db","maxmind-geoip","maxmind-geoip2-api","php","php-ip","php8"],"created_at":"2024-11-06T08:15:48.472Z","updated_at":"2026-01-27T20:16:10.361Z","avatar_url":"https://github.com/Rixafy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Free Local Geo-IP PHP Api\nReliable and fast local geo-ip api based on MaxMind geoip2 database.\n\nDatabase can be scheduled (set up a cron) to be updated every day with `bin/update` command.\n\n## Requirements\n- PHP 8.1+\n- Composer\n- MySQL / MariaDB database\n\n## Installation\n1. Download this project and run `composer install` to install dependencies.\n2. Register at [maxmind.com](https://www.maxmind.com/en/geolite2/signup) and get your free geolite2 license key and account id.\n3. Copy `config.sample.php` to `config.php` and set your license key, account id and database credentials.\n4. Make sure you are not using tables `ip4_blocks`, `ip6_blocks` and `ip_locations` as they will be overwritten.\n5. Run `bin/update` to download and import the database to your local db (~400MB).\n5. Open a web server (for instance `php -S localhost:1234 ./public/index.php`)\n6. Make a request to `http://localhost:1234?ip=\u003cip\u003e`\n\nFeel free to dockerize this project or make PR with more customization options.\n\n## Example response\n\nFrom url `http://localhost:1234/?ip=8.8.8.8`\n\n```json\n{\n  \"continent_code\": \"NA\",\n  \"continent_name\": \"North America\",\n  \"country_iso_code\": \"US\",\n  \"country_name\": \"United States\",\n  \"city_name\": null,\n  \"subdivision_1_iso_code\": null,\n  \"subdivision_1_name\": null,\n  \"subdivision_2_iso_code\": null,\n  \"subdivision_2_name\": null,\n  \"metro_code\": null,\n  \"time_zone\": \"America/Chicago\",\n  \"latitude\": 37.751,\n  \"longitude\": -97.822,\n  \"is_anonymous_proxy\": false\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixafy%2Ffreelocalgeoipapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frixafy%2Ffreelocalgeoipapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixafy%2Ffreelocalgeoipapi/lists"}