license-verify-api 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +78 -0
  2. package/index.d.ts +23 -0
  3. package/index.js +70 -0
  4. package/package.json +31 -0
package/README.md ADDED
@@ -0,0 +1,78 @@
1
+ # License Verify API
2
+
3
+ JavaScript client for the [Healthcare License Verification API](https://rapidapi.com/lulzasaur9192/api/healthcare-license) on RapidAPI.
4
+
5
+ Verify professional licenses across all 50 US states + DC. Supports 22 healthcare professions including nurses, doctors, dentists, pharmacists, therapists, and more.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install license-verify-api
11
+ ```
12
+
13
+ ## Quick Start
14
+
15
+ ```javascript
16
+ const LicenseVerifyClient = require('license-verify-api');
17
+
18
+ const client = new LicenseVerifyClient('YOUR_RAPIDAPI_KEY');
19
+
20
+ // Verify a nurse's license in California
21
+ const result = await client.verify({
22
+ state: 'CA',
23
+ lastName: 'Johnson',
24
+ licenseType: 'RN',
25
+ });
26
+ console.log(result);
27
+
28
+ // Direct NPI lookup
29
+ const provider = await client.lookupNPI('1234567890');
30
+
31
+ // Search by name
32
+ const providers = await client.searchByName('Smith', 'TX', {
33
+ licenseType: 'MD',
34
+ limit: 10,
35
+ });
36
+ ```
37
+
38
+ ## API Methods
39
+
40
+ ### `verify(options)`
41
+ Search and verify healthcare professional licenses.
42
+
43
+ | Parameter | Type | Description |
44
+ |-----------|------|-------------|
45
+ | state | string | US state code (e.g. "CA", "FL") |
46
+ | lastName | string | Provider last name (required unless using npiNumber) |
47
+ | firstName | string | Provider first name (optional) |
48
+ | licenseType | string | License type filter (see supported types below) |
49
+ | npiNumber | string | NPI number (alternative to name search) |
50
+ | limit | number | Max results (default: 50) |
51
+
52
+ ### `lookupNPI(npi)`
53
+ Direct lookup by 10-digit NPI number. Returns full provider details including taxonomies and practice locations.
54
+
55
+ ### `searchByName(lastName, state, options?)`
56
+ Convenience method for name-based provider search.
57
+
58
+ ## Supported License Types
59
+
60
+ MD, DO, RN, LPN, NP, APRN, CNA, PT, PTA, OT, OTA, SLP, CF, PSYCH, RPH, PHARMD, DDS, DMD, PA, DC, OD, DPM
61
+
62
+ ## Use Cases
63
+
64
+ - **Staffing Agencies**: Verify nurse credentials before placement
65
+ - **Background Checks**: Confirm professional license status
66
+ - **HR Compliance**: Validate healthcare worker licenses at scale
67
+ - **Credentialing**: Automate provider credentialing workflows
68
+ - **Telemedicine**: Verify cross-state licensing for remote providers
69
+
70
+ ## Get Your API Key
71
+
72
+ 1. Go to [Healthcare License API on RapidAPI](https://rapidapi.com/lulzasaur9192/api/healthcare-license)
73
+ 2. Subscribe (free tier: 200 requests/month)
74
+ 3. Copy your API key from the dashboard
75
+
76
+ ## License
77
+
78
+ MIT
package/index.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ interface VerifyOptions {
2
+ state: string;
3
+ lastName?: string;
4
+ firstName?: string;
5
+ licenseType?: string;
6
+ npiNumber?: string;
7
+ limit?: number;
8
+ }
9
+
10
+ interface SearchOptions {
11
+ firstName?: string;
12
+ licenseType?: string;
13
+ limit?: number;
14
+ }
15
+
16
+ declare class LicenseVerifyClient {
17
+ constructor(apiKey: string);
18
+ verify(options: VerifyOptions): Promise<any>;
19
+ lookupNPI(npi: string): Promise<any>;
20
+ searchByName(lastName: string, state: string, options?: SearchOptions): Promise<any>;
21
+ }
22
+
23
+ export = LicenseVerifyClient;
package/index.js ADDED
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+
3
+ const BASE_URL = 'https://healthcare-license.p.rapidapi.com';
4
+
5
+ class LicenseVerifyClient {
6
+ /**
7
+ * @param {string} apiKey - Your RapidAPI key (get one at https://rapidapi.com/lulzasaur9192/api/healthcare-license)
8
+ */
9
+ constructor(apiKey) {
10
+ if (!apiKey) throw new Error('API key required — get one at https://rapidapi.com/lulzasaur9192/api/healthcare-license');
11
+ this.apiKey = apiKey;
12
+ this.headers = {
13
+ 'x-rapidapi-key': apiKey,
14
+ 'x-rapidapi-host': 'healthcare-license.p.rapidapi.com',
15
+ };
16
+ }
17
+
18
+ async _request(path, params = {}) {
19
+ const url = new URL(BASE_URL + path);
20
+ for (const [k, v] of Object.entries(params)) {
21
+ if (v !== undefined && v !== null) url.searchParams.set(k, String(v));
22
+ }
23
+ const res = await fetch(url.toString(), { headers: this.headers });
24
+ if (!res.ok) {
25
+ const body = await res.text().catch(() => '');
26
+ throw new Error(`License Verify API error ${res.status}: ${body}`);
27
+ }
28
+ return res.json();
29
+ }
30
+
31
+ /**
32
+ * Verify a healthcare professional's license
33
+ * @param {Object} options
34
+ * @param {string} options.state - US state code (e.g. "CA", "FL", "TX")
35
+ * @param {string} [options.lastName] - Provider's last name (required unless using npiNumber)
36
+ * @param {string} [options.firstName] - Provider's first name
37
+ * @param {string} [options.licenseType] - License type (MD, DO, RN, LPN, NP, APRN, CNA, PT, PTA, OT, OTA, SLP, CF, PSYCH, RPH, PHARMD, DDS, DMD, PA, DC, OD, DPM)
38
+ * @param {string} [options.npiNumber] - NPI number (alternative to name search)
39
+ * @param {number} [options.limit=50] - Max results
40
+ * @returns {Promise<Object>}
41
+ */
42
+ async verify(options = {}) {
43
+ return this._request('/healthcare/verify', options);
44
+ }
45
+
46
+ /**
47
+ * Look up a provider by NPI number
48
+ * @param {string} npi - 10-digit NPI number
49
+ * @returns {Promise<Object>}
50
+ */
51
+ async lookupNPI(npi) {
52
+ return this._request(`/healthcare/npi/${encodeURIComponent(npi)}`);
53
+ }
54
+
55
+ /**
56
+ * Search for providers by name and state
57
+ * @param {string} lastName - Provider's last name
58
+ * @param {string} state - US state code
59
+ * @param {Object} [options]
60
+ * @param {string} [options.firstName] - First name
61
+ * @param {string} [options.licenseType] - License type filter
62
+ * @param {number} [options.limit=50] - Max results
63
+ * @returns {Promise<Object>}
64
+ */
65
+ async searchByName(lastName, state, options = {}) {
66
+ return this._request('/healthcare/verify', { lastName, state, ...options });
67
+ }
68
+ }
69
+
70
+ module.exports = LicenseVerifyClient;
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "license-verify-api",
3
+ "version": "1.0.0",
4
+ "description": "JavaScript client for Healthcare License Verification API — verify professional licenses across all 50 US states, NPI lookup, nurse/doctor/contractor license checks via RapidAPI",
5
+ "keywords": [
6
+ "license-verification",
7
+ "professional-license",
8
+ "nursing-license",
9
+ "healthcare",
10
+ "compliance",
11
+ "npi",
12
+ "nppes",
13
+ "background-check",
14
+ "api",
15
+ "rapidapi",
16
+ "hr-tech",
17
+ "credentialing"
18
+ ],
19
+ "main": "index.js",
20
+ "types": "index.d.ts",
21
+ "author": "lulzasaur9192",
22
+ "license": "MIT",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "https://github.com/lulzasaur9192/license-verify-api"
26
+ },
27
+ "homepage": "https://rapidapi.com/lulzasaur9192/api/healthcare-license",
28
+ "engines": {
29
+ "node": ">=14"
30
+ }
31
+ }