{"id":40626443,"url":"https://github.com/abstractapi/javascript-phone-validation","last_synced_at":"2026-01-21T07:23:12.354Z","repository":{"id":57094260,"uuid":"355126406","full_name":"abstractapi/javascript-phone-validation","owner":"abstractapi","description":"Javascript library for Abstract's Phone Validation API (free)","archived":false,"fork":false,"pushed_at":"2021-05-28T10:59:51.000Z","size":482,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-22T22:14:49.986Z","etag":null,"topics":["api","free-api","javascript-library","phone-api","phone-authentication","phone-format","phone-validation","phone-verification","verify-phone-numbers"],"latest_commit_sha":null,"homepage":"https://www.abstractapi.com/phone-validation-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:11:05.000Z","updated_at":"2021-05-28T10:59:54.000Z","dependencies_parsed_at":"2022-08-22T23:10:07.581Z","dependency_job_id":null,"html_url":"https://github.com/abstractapi/javascript-phone-validation","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/abstractapi/javascript-phone-validation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fjavascript-phone-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fjavascript-phone-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fjavascript-phone-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fjavascript-phone-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abstractapi","download_url":"https://codeload.github.com/abstractapi/javascript-phone-validation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fjavascript-phone-validation/sbom","scorecard":{"id":161902,"data":{"date":"2025-08-11","repo":{"name":"github.com/abstractapi/javascript-phone-validation","commit":"57467396d41996b3582b4a04c53930f19ed2f595"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"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":"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":"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":"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":"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-phone-validation/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-phone-validation/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-phone-validation/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-phone-validation/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-phone-validation/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":"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":"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":"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":"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":"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":"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":"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:43:01.779Z","repository_id":57094260,"created_at":"2025-08-16T13:43:01.779Z","updated_at":"2025-08-16T13:43:01.779Z"},"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","free-api","javascript-library","phone-api","phone-authentication","phone-format","phone-validation","phone-verification","verify-phone-numbers"],"created_at":"2026-01-21T07:23:11.661Z","updated_at":"2026-01-21T07:23:12.348Z","avatar_url":"https://github.com/abstractapi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AbstractAPI javascript-phone-validation library\n\nIntegrate the powerful [Phone Validation API from Abstract](https://www.abstractapi.com/phone-validation-api) in your Javascript or NodeJS project in a few lines of code.\n\nAbstract's Phone Number Validation and Verification API is a fast, lightweight, modern, and RESTful JSON API for determining the validity and other details of phone numbers from over 190 countries.\n\nIt's very simple to use: you only need to submit your API key and a phone number, and the API will respond as assessment of its validity, as well as additional details like the carrier details, line type, region and city details, and more.\n\nValidating and verifying phone numbers 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-phone-validation** 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-phone-validation --save\n```\n\nIn your project, import it and configure your `API_KEY`:\n\n```js\nimport {AbstractPhoneValidation} from 'javascript-phone-validation'\n\nAbstractPhoneValidation.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-phone-validation@latest/dist/javascript-phone-validation.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    AbstractPhoneValidation.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-phone-validation.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    AbstractPhoneValidation.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/phone-validation/pricing/select).\n\n## Quickstart\n\nAbstractAPI **javascript-phone-validation** 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 validatePhone(number) {\n  let response = await AbstractPhoneValidation.verify(number);\n  console.log(response);\n}\n```\n\n### Using .then()\n\n```js\nfunction validatePhone(number) {\n  AbstractPhoneValidation.verify(number)\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| number | String | The phone number submitted for validation and verification. |\n| valid | Boolean | Is true if the phone number submitted is valid. |\n| local_format | String | The local or national format of the submitted phone number. For example, it removes any international formatting, such as \"+1\" in the case of the US. |\n| international_format | String | The international format of the submitted phone number. This means appending the phone number's country code and a \"+\" at the beginning. |\n| country_name | String | The name of the country in which the phone number is registered. |\n| country_code | String | The country's two letter ISO 3166-1 alpha-2 code. |\n| country_prefix | The country's calling code prefix. |\n| registered_location | String | As much location details as are available from our data. This can include the region, state / province, and in some cases down to the city. |\n| carrier | String | The carrier that the number is registered with. |\n| line_type | String | The type of phone number. The possible values are: Landline, Mobile, Satellite, Premium, Paging, Special, Toll_Free, and Unknown. |\n\n## Detailed documentation\n\nYou will find additional information and request examples in the [Abstract help page](https://app.abstractapi.com/api/phone-validation/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/phone-validation/support).\n\nFor bug report and feature suggestion, please use [this repository issues page](https://github.com/abstractapi/javascript-phone-validation/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-phone-validation/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    PHONE_VALIDATION_API_KEY=(your key here) npm run test\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabstractapi%2Fjavascript-phone-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabstractapi%2Fjavascript-phone-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabstractapi%2Fjavascript-phone-validation/lists"}