{"id":25713977,"url":"https://github.com/anoochit/whatismyip","last_synced_at":"2026-05-08T14:02:03.736Z","repository":{"id":279026642,"uuid":"937108210","full_name":"anoochit/whatismyip","owner":"anoochit","description":"A simple Dart package to find ISP IP Address and Geolocation data.","archived":false,"fork":false,"pushed_at":"2025-02-27T10:06:54.000Z","size":524,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-18T13:08:21.136Z","etag":null,"topics":["dart","flutter","geolocation","ip2location","ipify"],"latest_commit_sha":null,"homepage":"","language":"C++","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/anoochit.png","metadata":{"files":{"readme":"README.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":"2025-02-22T11:02:11.000Z","updated_at":"2025-02-27T10:06:57.000Z","dependencies_parsed_at":"2025-02-23T09:38:34.277Z","dependency_job_id":null,"html_url":"https://github.com/anoochit/whatismyip","commit_stats":null,"previous_names":["anoochit/whatismyip"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anoochit/whatismyip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoochit%2Fwhatismyip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoochit%2Fwhatismyip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoochit%2Fwhatismyip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoochit%2Fwhatismyip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anoochit","download_url":"https://codeload.github.com/anoochit/whatismyip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoochit%2Fwhatismyip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32783452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dart","flutter","geolocation","ip2location","ipify"],"created_at":"2025-02-25T12:27:42.932Z","updated_at":"2026-05-08T14:02:03.665Z","avatar_url":"https://github.com/anoochit.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WhatIsMyIP\n\nA lightweight Dart package that helps you discover your IP address and retrieve detailed geolocation information. This package integrates with Ipify for IP address lookup and IP2Location for geolocation data.\n\n## Features\n\n- Get your current IP address (ISP IP Address)\n- Retrieve detailed geolocation information including:\n  - Country code and name\n  - Region and city\n  - Latitude and longitude\n  - ZIP code\n  - Time zone\n  - ASN (Autonomous System Number) information\n  - Proxy detection\n\n## Installation\n\nAdd this to your package's `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  whatismyip: ^1.0.0\n```\n\nThen run:\n\n```bash\ndart pub get\n```\n\n## Usage\n\n### Basic Example\n\n```dart\nimport 'package:whatismyip/whatismyip.dart';\n\nFuture\u003cvoid\u003e main() async {\n  var apiKey = String.fromEnvironment(\"IP2LOCATION_API\");\n\n  var whatismyip = WhatIsMyIp();\n  var myip = await whatismyip.getIpAddress();\n  print('IP Address = $myip');\n\n  var ipgeolocation = await whatismyip.getIpGeolocation(apiKey: apiKey);\n  print('My City = ${ipgeolocation.cityName}');\n\n  print('${ipgeolocation.toJson()}');\n}\n```\n\n### Running the Example\n\nTo run the example with your IP2Location API key\n\n```bash\ndart run --define=IP2LOCATION_API=your_api_key_here main.dart\n```\n\n``bash\nflutter run --dart-define=IP2LOCATION_API=$env:your_api_key_here\n```\n\n### Sample Output\n\n```text\nIP Address = 171.101.99.209\nMy City = Nakhon Ratchasima\n{\n  ip: 171.101.99.209,\n  country_code: TH,\n  country_name: Thailand,\n  region_name: Nakhon Ratchasima,\n  city_name: Nakhon Ratchasima,\n  latitude: 14.97066,\n  longitude: 102.10196,\n  zip_code: 30280,\n  time_zone: +07:00,\n  asn: 17552,\n  as: True Online,\n  is_proxy: false\n}\n```\n\n## API Reference\n\n### WhatIsMyIp Class\n\n#### `getIpAddress()`\nReturns the current IP address as a string.\n\n#### `getIpGeolocation({required String apiKey})`\nReturns detailed geolocation information for the current IP address.\n\nParameters:\n- `apiKey`: Your IP2Location API key (required)\n\nReturns an `IpGeolocation` object containing:\n- `ip`: The IP address\n- `countryCode`: Two-letter country code\n- `countryName`: Full country name\n- `regionName`: Region/state name\n- `cityName`: City name\n- `latitude`: Location latitude\n- `longitude`: Location longitude\n- `zipCode`: Postal/ZIP code\n- `timeZone`: Time zone\n- `asn`: Autonomous System Number\n- `ipGeolocationAs`: AS name/description\n- `isProxy`: Proxy detection status\n\n## Prerequisites\n\n- Sign up for an [IP2Location API key](https://www.ip2location.io/) to access geolocation data\n- Dart SDK version 2.12.0 or higher\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Acknowledgments\n\n- [Ipify](https://www.ipify.org/) for IP address lookup service\n- [IP2Location](https://www.ip2location.io/) for geolocation data","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanoochit%2Fwhatismyip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanoochit%2Fwhatismyip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanoochit%2Fwhatismyip/lists"}