{"id":40626536,"url":"https://github.com/abstractapi/javascript-ip-geolocation","last_synced_at":"2026-01-21T07:23:19.313Z","repository":{"id":47462935,"uuid":"355126229","full_name":"abstractapi/javascript-ip-geolocation","owner":"abstractapi","description":"Javascript library for IP Geolocation API (free)","archived":false,"fork":false,"pushed_at":"2021-08-30T22:04:36.000Z","size":484,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-16T03:24:32.976Z","etag":null,"topics":["api","api-service","api-wrapper","free","free-software","geolocalization","geolocate","geolocation","geolocation-api","geolocation-application","geolocation-data","geolocation-database","geolocation-plugin","ip","ipgeo","ipgeolocation","ipv4","ipv6","javascript","javascript-library"],"latest_commit_sha":null,"homepage":"https://www.abstractapi.com/ip-geolocation-api","language":"JavaScript","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/abstractapi.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}},"created_at":"2021-04-06T09:10:32.000Z","updated_at":"2024-10-03T13:56:23.000Z","dependencies_parsed_at":"2022-07-26T05:32:36.805Z","dependency_job_id":null,"html_url":"https://github.com/abstractapi/javascript-ip-geolocation","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/abstractapi/javascript-ip-geolocation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fjavascript-ip-geolocation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fjavascript-ip-geolocation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fjavascript-ip-geolocation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fjavascript-ip-geolocation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abstractapi","download_url":"https://codeload.github.com/abstractapi/javascript-ip-geolocation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fjavascript-ip-geolocation/sbom","scorecard":{"id":161901,"data":{"date":"2025-08-11","repo":{"name":"github.com/abstractapi/javascript-ip-geolocation","commit":"9b9afa1f1425605d97ff4e0890a9949651228c60"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/npm-publish.yml:1","Warn: no topLevel permission defined: .github/workflows/unittest.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/abstractapi/javascript-ip-geolocation/npm-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/abstractapi/javascript-ip-geolocation/npm-publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/abstractapi/javascript-ip-geolocation/npm-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unittest.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/abstractapi/javascript-ip-geolocation/unittest.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unittest.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/abstractapi/javascript-ip-geolocation/unittest.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/npm-publish.yml:25","Warn: npmCommand not pinned by hash: .github/workflows/unittest.yml:27","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"23 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T13:42:59.890Z","repository_id":47462935,"created_at":"2025-08-16T13:42:59.890Z","updated_at":"2025-08-16T13:42:59.890Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28629915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["api","api-service","api-wrapper","free","free-software","geolocalization","geolocate","geolocation","geolocation-api","geolocation-application","geolocation-data","geolocation-database","geolocation-plugin","ip","ipgeo","ipgeolocation","ipv4","ipv6","javascript","javascript-library"],"created_at":"2026-01-21T07:23:18.598Z","updated_at":"2026-01-21T07:23:19.300Z","avatar_url":"https://github.com/abstractapi.png","language":"JavaScript","readme":"# AbstractAPI javascript-ip-geolocation library\n\nIntegrate the powerful [IP Geolocation API from Abstract](https://www.abstractapi.com/ip-geolocation-api) in your Javascript or NodeJS project in a few lines of code.\n\nAbstract's IP Geolocation API is a fast, lightweight, modern, and RESTful JSON API allowing you to look up the location, timezone, country details, and more of an IPv4 or IPv6 address.\n\nIt's very simple to use: you only need to submit your API key and an IP address, and the API will respond with an assessment of its geographical location, as well as additional details like the timezone, if it's a VPN address, and more.\n\nValidating and verifying IP addresses is a critical step to reducing the chances of low-quality data and fraudulent or risky users in your website or application.\n\n# Documentation\n\n## Installation\n\nYou can install **javascript-ip-geolocation** via npm, from our CDN, or download the source into your project.\n\n### ES6\n\nDownload and install the library from npm:\n\n```\nnpm install @abstractapi/javascript-ip-geolocation --save\n```\n\nIn your project, import it and configure your `API_KEY`:\n\n```js\nimport {AbstractIpGeolocation} from 'javascript-ip-geolocation'\n\nAbstractIpGeolocation.configure('API_KEY')\n```\n\n### Browser, from the CDN\n\nYou can have the browser download the library from its closest location through jsDeliver CDN:\n\n```js\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@abstractapi/javascript-core@latest/dist/javascript-core.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@abstractapi/javascript-ip-geolocation@latest/dist/javascript-ip-geolocation.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    AbstractIpGeolocation.configure('API_KEY');\n\n    // use the library\n\u003c/script\u003e\n```\n\n### Browser, from the built file\n\nYou can build the library yourself, or get the already built file from the `dist` directory and load it:\n\n```js\n\u003cscript src=\"dist/javascript-ip-geolocation.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    AbstractIpGeolocation.configure('API_KEY');\n\n    // use the library\n\u003c/script\u003e\n```\n\n## API key\n\nGet your API key for free and without hassle from the [Abstact website](https://app.abstractapi.com/users/signup?target=/api/ip-geolocation/pricing/select).\n\n## Quickstart\n\nAbstractAPI **javascript-ip-geolocation** library returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) so you can use one of the following approaches:\n\n### Async/Await\n\n```js\nasync function validateIP(ipAddress) {\n  let response = await AbstractIpGeolocation.look_up(ipAddress);\n  console.log(response);\n}\n```\n\n### Using .then()\n\n```js\nfunction validateIP(ipAddress) {\n  AbstractIpGeolocation.look_up(ipAddress)\n    .then(response =\u003e {\n        console.log(response);\n    })\n}\n```\n\n## API response\n\nThe API response contains the following fields:\n\n| PARAMETER | TYPE | DETAILS |\n| - | - | - |\n| Parameter | Type | Details |\n| ip_address | String | The requested IP address |\n| city | String | City's name. |\n| city_geoname_id | String | City's geoname ID. |\n| region | String | State or province in which the the city is located. |\n| region_iso_code | Char[2] | State or province's ISO 3166-2 code. |\n| region_geoname_id | String | State or province's geoname ID. |\n| postal_code | String | ZIP or postal code. |\n| country | String | Country's name. |\n| country_code | Char[2] | Country's ISO 3166-1 alpha-2 code. |\n| country_geoname_id | String | Country's geoname ID. |\n| country_is_eu | Boolean | True if the country is in the EU, false if it is not. |\n| continent | String | Continent's name. |\n| continent_code | Char[2] | 2 letter continent code: AF, AS, EU, NA, OC, SA, AN |\n| continent_geoname_id | String | Continent's geoname ID. |\n| longitude | Float | Decimal of the longitude. |\n| latitude | Float | Decimal of the latitude. |\n| security \u003e is_vpn | Boolean | Whether the IP address is using from a VPN or using a proxy |\n| timezone \u003e name | String | Timezone's name from the IANA Time Zone Database. |\n| timezone \u003e abbreviation | String | Timezone's abbreviation, also from the IANA Time Zone Database. |\n| timezone \u003e gmt_offset | String | Timezone's offset from Greenwich Mean Time (GMT). |\n| timezone \u003e current_time | String | Current time in the local time zone. |\n| timezone \u003e is_dst | Boolean | True if the location is currently in Daylight Savings Time (DST). |\n| flag \u003e svg | String | Link to a hosted version of the country's flag in SVG format. |\n| flag \u003e png | String | Link to a hosted version of the country's flag in PNG format. |\n| flag \u003e emoji | String | Country's flag as an emoji. |\n| flag \u003e unicode | String | Country's flag in unicode. |\n| currency \u003e currency_name | String | The currency's name. |\n| currency \u003e currency_code | String | The currency's code in ISO 4217 format. |\n| connection \u003e connection_type | String | Type of network connection: Dialup, Cable/DSL, Cellular, Corporate |\n| connection \u003e autonomous_system_number | Uint32 | Autonomous System number |\n| connection \u003e autonomous_system_organization | String | Autonomous System Organization name. |\n| connection \u003e isp_name | String | Internet Service Provider (ISP) name. |\n| connection \u003e organization_name | String | Organization name. |\n\n## Detailed documentation\n\nYou will find additional information and request examples in the [Abstract help page](https://app.abstractapi.com/api/ip-geolocation/documentation).\n\n## Getting help\n\nIf you need help installing or using the library, please contact [Abstract's Support](https://app.abstractapi.com/api/ip-geolocation/support).\n\nFor bug report and feature suggestion, please use [this repository issues page](https://github.com/abstractapi/javascript-ip-geolocation/issues).\n\n# Contribution\n\nContributions are always welcome, as they improve the quality of the libraries we provide to the community.\n\nPlease provide your changes covered by the appropriate unit tests, and post them in the [pull requests page](https://github.com/abstractapi/javascript-ip-geolocation/pulls).\n\n## NPM\n\n### Installation\n\nRun `npm install` in the command line to install the dependencies. To update those dependencies you need to run `npm update`.\n\n### Building\n\nTo build the library and generate the minified file in the *dist* directory, you need to run `npm run build`.\n\nTo build the lib, you need to run `npm run build:lib`.\n\n### Test\n\nTo run the test suite, you need the API key from the abstract website and you can run:\n\n    IP_GEOLOCATION_API_KEY=(your key here) npm run test\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabstractapi%2Fjavascript-ip-geolocation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabstractapi%2Fjavascript-ip-geolocation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabstractapi%2Fjavascript-ip-geolocation/lists"}