{"id":19096913,"url":"https://github.com/zocker-160/geoloc-api","last_synced_at":"2025-09-08T02:31:16.716Z","repository":{"id":106358333,"uuid":"528528746","full_name":"zocker-160/Geoloc-API","owner":"zocker-160","description":"Simple HTTP API for requesting location of an IPv4","archived":false,"fork":false,"pushed_at":"2024-01-09T19:03:47.000Z","size":44,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-09T03:39:14.309Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zocker-160.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,"publiccode":null,"codemeta":null}},"created_at":"2022-08-24T17:35:31.000Z","updated_at":"2024-10-26T08:07:28.000Z","dependencies_parsed_at":"2024-11-09T03:38:14.120Z","dependency_job_id":"d09e9edf-e1f8-4455-b70a-4b18bcc9f7a7","html_url":"https://github.com/zocker-160/Geoloc-API","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zocker-160%2FGeoloc-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zocker-160%2FGeoloc-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zocker-160%2FGeoloc-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zocker-160%2FGeoloc-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zocker-160","download_url":"https://codeload.github.com/zocker-160/Geoloc-API/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232273967,"owners_count":18498096,"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-09T03:38:10.623Z","updated_at":"2025-01-03T00:26:12.097Z","avatar_url":"https://github.com/zocker-160.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Geoloc-API\n\n## Usage\n\n### Run (binary)\n\n- download binary from releases or compile (see Makefile in src folder)\n```bash\n./Geoloc-API \"path/to/ip-locations.txt\"\n```\n\n### Run (Docker)\n\n- `docker build . -t geolocapi`\n- `docker run -d -p 9001:9001 geolocapi`\n\n### ENV Variables\n\n- `GEOAPI_RAM_OPT`: enables low memory mode if set to `\"1\"`\n- `GEOAPI_PORT`: port HTTP server will listen to\n\n### Request\n#### CURL\n```bash\ncurl -X POST -d \"\u003cIP\u003e\" http://\u003cserverIP\u003e:\u003cport\u003e/\u003cendpoint\u003e\n```\n\n#### PHP\n```php\n\u003c?php\n\n$opts = array('http' =\u003e\n    array(\n        'method' =\u003e 'POST',\n        'header' =\u003e 'Content-type: application/x-www-form-urlencoded',\n        'content' =\u003e \"\u003cIP\u003e\"\n    )\n);\n$context = stream_context_create($opts);\n$result = file_get_contents('http://\u003cserverIP\u003e:\u003cport\u003e/\u003cendpoint\u003e', false, $context);\necho $result;\n\n?\u003e\n```\n\n### Endpoints\n- `POST /country`\n- `POST /coords`\n- `POST /all/json` example respone:\n```json\n{\n  \"Range\": {\n    \"StartIP\": 3758088960,\n    \"EndIP\": 3758089215\n  },\n  \"Country\": \"Indonesia\",\n  \"Location\": {\n    \"Latitude\": -0.22019,\n    \"Longitude\": 100.63078\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzocker-160%2Fgeoloc-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzocker-160%2Fgeoloc-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzocker-160%2Fgeoloc-api/lists"}