{"id":18990659,"url":"https://github.com/ilyhalight/ip-geolocation","last_synced_at":"2025-08-16T13:47:35.232Z","repository":{"id":261700294,"uuid":"884755406","full_name":"ilyhalight/ip-geolocation","owner":"ilyhalight","description":"A library for free (and not only free) use of the ip geolocation APIs","archived":false,"fork":false,"pushed_at":"2024-12-17T09:40:40.000Z","size":159,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-24T19:19:30.224Z","etag":null,"topics":["free","geolocation","ip","ip2geo","lookup"],"latest_commit_sha":null,"homepage":"https://ilyhalight.github.io/ip-geolocation/","language":"TypeScript","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/ilyhalight.png","metadata":{"files":{"readme":"README-RU.md","changelog":"changelog.md","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":"2024-11-07T10:31:17.000Z","updated_at":"2024-11-24T17:55:05.000Z","dependencies_parsed_at":"2024-11-08T00:27:01.354Z","dependency_job_id":"b9905cfc-1508-49b0-9711-e1e3e4daaeb5","html_url":"https://github.com/ilyhalight/ip-geolocation","commit_stats":null,"previous_names":["ilyhalight/ip-geolocation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilyhalight%2Fip-geolocation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilyhalight%2Fip-geolocation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilyhalight%2Fip-geolocation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilyhalight%2Fip-geolocation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilyhalight","download_url":"https://codeload.github.com/ilyhalight/ip-geolocation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232088672,"owners_count":18471004,"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":["free","geolocation","ip","ip2geo","lookup"],"created_at":"2024-11-08T17:10:51.482Z","updated_at":"2025-01-01T14:25:46.746Z","avatar_url":"https://github.com/ilyhalight.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IP Geolocation\n\n[![GitHub Actions](https://github.com/ilyhalight/ip-geolocation/actions/workflows/ci.yml/badge.svg)](https://github.com/ilyhalight/ip-geolocation/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/bundlejs/size/@toil/ip-geolocation)](https://www.npmjs.com/package/@toil/ip-geolocation)\n[![en](https://img.shields.io/badge/lang-English%20%F0%9F%87%AC%F0%9F%87%A7-white)](README.md)\n[![ru](https://img.shields.io/badge/%D1%8F%D0%B7%D1%8B%D0%BA-%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9%20%F0%9F%87%B7%F0%9F%87%BA-white)](README-RU.md)\n\nБиблиотека для бесплатного (и не только бесплатного) использования IP Geolocation APIs, которая поддерживает работу с JavaScript, TypeScript, а также имеет встроенные типы для Typebox.\n\n## Установка\n\nУстановка с Bun:\n\n```bash\nbun add @toil/ip-geolocation\n```\n\nУстановка с Node:\n\n```bash\nnpm install @toil/ip-geolocation\n```\n\n## Начало работы\n\nЧтобы начать работу с API, вам необходимо создать IPGeolocation клиент. Это можно сделать, воспользовавшись приведенным ниже кодом.\n\n```ts\nconst client = new IPGeolocationClient({\n  service: IPGeolocationService.freeipapi,\n});\n\nconst result = await client.lookup(\"103.21.244.0\");\n```\n\nВы можете увидеть больше примеров кода [здесь](https://github.com/ilyhalight/ip-geolocation/tree/main/examples)\n\n## Доступные сервисы\n\nВ некоторых сервисах передача зарезервированных диапазонов айпи адресов может вызывать ошибку - это нормально.\n\nЕсли вам не хватает каких-то данных в методе lookup, и они должны быть у сервиса, рекомендуется рассмотреть использование провайдера напрямую, используя метод rawLookup\n\n| Статус | Сервис                              | Лимиты     | Функции                               |\n| ------ | ----------------------------------- | ---------- | ------------------------------------- |\n| ✅     | [FreeIPAPI](https://freeipapi.com/) | 60 req/min | [подробнее](SERVICES-RU.md#freeipapi) |\n| ✅     | [IPAPICom](https://ip-api.com)      | 45 req/min | [подробнее](SERVICES-RU.md#ipapicom)  |\n\nБолее подробная информация о поддерживаемых сервисах доступа [тут](SERVICES-RU.md)\n\n## Сборка\n\nДля сборки необходимо наличие:\n\n- [Bun](https://bun.sh/)\n\nНе забудьте установить зависимости:\n\n```bash\nbun install\n```\n\n#### Обычная сборка\n\nСборка всего пакета:\n\n```bash\nbun build:bun\n```\n\n#### Сборка TypeBox типов\n\nВы можете воспользоваться данным вариантом сборки, если вы хотите собрать, только, типы для TypeBox:\n\n```bash\nbun build:typebox\n```\n\n## Тесты\n\nБиблиотека имеет минимальное покрытие тестами для проверки ее работоспособности.\n\nЗапустить тесты:\n\n```bash\nbun test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filyhalight%2Fip-geolocation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filyhalight%2Fip-geolocation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filyhalight%2Fip-geolocation/lists"}