{"id":25935363,"url":"https://github.com/peopledatalabs/peopledatalabs-js","last_synced_at":"2026-01-05T13:16:09.464Z","repository":{"id":39909482,"uuid":"448466559","full_name":"peopledatalabs/peopledatalabs-js","owner":"peopledatalabs","description":"A universal JS client with TypeScript support for the People Data Labs API","archived":false,"fork":false,"pushed_at":"2025-03-23T17:48:23.000Z","size":1023,"stargazers_count":24,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-30T13:09:13.727Z","etag":null,"topics":["api","companies","company-data","company-enrichment","company-search","contact-data","data-enrichment","enrichment","javascript-library","npm-package","people","people-data","peopledatalabs","person-enrichment","person-search","sdk-js","search"],"latest_commit_sha":null,"homepage":"https://docs.peopledatalabs.com/docs/javascript-sdk","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/peopledatalabs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-16T05:32:34.000Z","updated_at":"2025-03-23T17:48:25.000Z","dependencies_parsed_at":"2023-10-16T11:33:28.373Z","dependency_job_id":"0e90aa66-8226-46a1-ae1b-e8f667a00c7c","html_url":"https://github.com/peopledatalabs/peopledatalabs-js","commit_stats":{"total_commits":78,"total_committers":5,"mean_commits":15.6,"dds":0.1282051282051282,"last_synced_commit":"5e8aaf8adbf65891ba60aaa977950fc92ba5c6c4"},"previous_names":[],"tags_count":70,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peopledatalabs%2Fpeopledatalabs-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peopledatalabs%2Fpeopledatalabs-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peopledatalabs%2Fpeopledatalabs-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peopledatalabs%2Fpeopledatalabs-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peopledatalabs","download_url":"https://codeload.github.com/peopledatalabs/peopledatalabs-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247492535,"owners_count":20947545,"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":["api","companies","company-data","company-enrichment","company-search","contact-data","data-enrichment","enrichment","javascript-library","npm-package","people","people-data","peopledatalabs","person-enrichment","person-search","sdk-js","search"],"created_at":"2025-03-04T01:34:28.669Z","updated_at":"2026-01-05T13:16:09.459Z","avatar_url":"https://github.com/peopledatalabs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://www.peopledatalabs.com/images/logos/company-logo.png\" style=\"background-color: white; padding: 5px 10px;\" width=\"250\" alt=\"People Data Labs Logo\"\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003ePeople Data Labs JavaScript Library\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\nJavaScript client with TypeScript support for the People Data Labs API.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/repo%20status-Active-limegreen\" alt=\"Repo Status\"\u003e\n  \u003c/a\u003e\u0026nbsp;\n  \u003ca href=\"https://www.npmjs.com/peopledatalabs\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/peopledatalabs.svg?logo=npm\u0026logoColor=fff\u0026label=NPM+package\u0026color=limegreen\" alt=\"People Data Labs on NPM\" /\u003e\n  \u003c/a\u003e\u0026nbsp;\n  \u003ca href=\"\"\u003e\n    \u003cimg src=\"https://github.com/peopledatalabs/peopledatalabs-js/actions/workflows/test.yaml/badge.svg\" alt=\"Tests Status\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n#\n\nThis is a simple JavaScript client library to access the various API endpoints provided by [People Data Labs](https://www.peopledatalabs.com/).\n\nThis library bundles up PDL API requests into simple function calls, making it easy to integrate into your projects. You can use the various [API endpoints](#endpoints) to access up-to-date, real-world data from our massive [Person](https://docs.peopledatalabs.com/docs/stats) and [Company](https://docs.peopledatalabs.com/docs/company-stats) Datasets.  \n\n## ✨ Features\n\n- Supports all People Data Labs API endpoints\n- Built-in Typescript support\n\n## Table of Contents\n\n- [🔧 Installation](#installation)\n- [🚀 Usage](#usage)\n- [🌐 Endpoints](#endpoints)\n- [📘 Documentation](#documentation)\n  - [Special Note about Search API Support](#special-note)\n  - [Upgrading to v6.X.X](#upgrading-to-v6)\n  - [Upgrading to v5.X.X](#upgrading-to-v5)\n\n## 🔧 Installation \u003ca name=\"installation\"\u003e\u003c/a\u003e\n\n1. Pull the package from the npm repository:\n\n```bash\nyarn add peopledatalabs\n```\n\nor\n\n```bash\nnpm i peopledatalabs\n```\n\n2. If you get a error while running a typescript project, add `\"esModuleInterop\": true` to your tsconfig\n\n3. Sign up for a [free PDL API key](https://www.peopledatalabs.com/signup)\n\n## 🚀 Usage \u003ca name=\"usage\"\u003e\u003c/a\u003e\n\nFirst, create the PDLJS client:\n\n```js\nimport PDLJS from 'peopledatalabs';\n\nconst PDLJSClient = new PDLJS({ apiKey: 'YOUR API KEY' })\n```\n\nThen, send requests to any PDL API Endpoint:\n\n**Using Person APIs**\n\n```js\n// By Enrichment\ntry {\n  const response = await PDLJSClient.person.enrichment({ phone: '4155688415' });\n\n  console.log(response);\n} catch (error) {\n  console.log(error);\n}\n\n// By Preview Enrichment\ntry {\n  const response = await PDLJSClient.person.enrichmentPreview({ phone: '4155688415' });\n\n  console.log(response);\n} catch (error) {\n  console.log(error);\n}\n\n// By Bulk Enrichment\nconst bulkEnrichmentRecords = {\n  requests: [\n    {\n      params: {\n        profile: ['linkedin.com/in/seanthorne'],\n      },\n    },\n    {\n      params: {\n        profile: ['linkedin.com/in/randrewn'],\n      },\n    },\n  ],\n};\n\ntry {\n  const response = await PDLJSClient.person.bulk.enrichment(bulkEnrichmentRecords);\n\n  console.log(response.items);\n} catch (error) {\n  console.log(error);\n}\n\n// By Search (SQL)\nconst sqlQuery = \"SELECT * FROM person WHERE location_country='mexico' AND job_title_role='health'AND phone_numbers IS NOT NULL;\"\n\ntry {\n  const response = await PDLJSClient.person.search.sql({ searchQuery: sqlQuery, size: 10 });\n\n  console.log(response.total);\n} catch (error) {\n  console.log(error);\n}\n\n// By Search (Elasticsearch)\nconst esQuery = {\n  query: {\n    bool: {\n      must:[\n        { term: { location_country: 'mexico' } },\n        { term: { job_title_role: 'health' } },\n        { exists: { field: 'phone_numbers' } }\n      ]\n    }\n  }\n}\n\ntry {\n  const response = await PDLJSClient.person.search.elastic({ searchQuery: esQuery, size: 10 });\n\n  console.log(response.total);\n} catch (error) {\n  console.log(error);\n}\n\n// By Fuzzy Enrichment\ntry {\n  const response = await PDLJSClient.person.identify({ name: 'sean thorne' });\n\n  console.log(response);\n} catch (error) {\n  console.log(error);\n}\n\n// By Changelog\nconst personChangelogLookup = {\n  currentVersion: '31.2',\n  originVersion: '32.0',\n  type: 'updated',\n}\n\ntry {\n  const response = await PDLJSClient.person.changelog(personChangelogLookup);\n\n  console.log(response);\n} catch (error) {\n  console.log(error);\n}\n```\n\n**Using Company APIs**\n\n```js\n// By Enrichment\ntry {\n  const response = await PDLJSClient.company.enrichment({ website: 'peopledatalabs.com' });\n\n  console.log(response);\n} catch (error) {\n  console.log(error);\n}\n\n// By Bulk Enrichment\nconst bulkEnrichmentRecords = {\n  requests: [\n    {\n      params: {\n        profile: 'linkedin.com/in/peopledatalabs',\n      },\n    },\n    {\n      params: {\n        profile: 'linkedin.com/in/apple',\n      },\n    },\n  ],\n};\n\ntry {\n  const response = await PDLJSClient.company.bulk.enrichment(bulkEnrichmentRecords);\n\n  console.log(response.items);\n} catch (error) {\n  console.log(error);\n}\n\n// By Search (SQL)\nconst sqlQuery = \"SELECT * FROM company WHERE tags='big data' AND industry='financial services' AND location.country='united states';\"\n\ntry {\n  const response = await PDLJSClient.company.search.sql({ searchQuery: sqlQuery, size: 10 });\n\n  console.log(response.total);\n} catch (error) {\n  console.log(error);\n}\n\n// By Search (Elasticsearch)\nconst esQuery = {\n  query: {\n    bool: {\n      must:[\n        { term: { tags: 'big data' } },\n        { term: { industry: 'financial services' } },\n        { term: { location_country: 'united states' } }\n      ]\n    }\n  }\n}\n\ntry {\n  const response = await PDLJSClient.company.search.elastic({ searchQuery: esQuery, size: 10 });\n\n  console.log(response.total);\n} catch (error) {\n  console.log(error);\n}\n\n```\n\n**Using Autocomplete API**\n\n```js\n// Get Autocomplete Suggestions\ntry {\n  const response = await PDLJSClient.autocomplete({ field: 'title', text: 'full', size: 10 });\n\n  console.log(response);\n} catch (error) {\n  console.log(error);\n}\n```\n\n**Using Cleaner APIs**\n\n```js\n// Clean Raw Company Strings\ntry {\n  const response = await PDLJSClient.company.cleaner({ name: 'peOple DaTa LabS' });\n\n  console.log(response);\n} catch (error) {\n  console.log(error);\n}\n\n// Clean Raw Location Strings\ntry {\n  const response = await PDLJSClient.location.cleaner({ location: '455 Market Street, San Francisco, California 94105, US' });\n\n  console.log(response);\n} catch (error) {\n  console.log(error);\n}\n\n// Clean Raw School Strings\ntry {\n  const response = await PDLJSClient.school.cleaner({ name: 'university of oregon' });\n\n  console.log(response);\n} catch (error) {\n  console.log(error);\n}\n```\n\n**Using Job Title Enrichment API**\n\n```js\n// Enrich a Job Title\ntry {\n  const response = await PDLJSClient.jobTitle({ jobTitle: 'software engineer' });\n\n  console.log(response);\n} catch (error) {\n  console.log(error);\n}\n```\n\n**Using IP Enrichment API**\n\n```js\n// Enrich an IP Address\ntry {\n  const response = await PDLJSClient.ip({ ip: '72.212.42.228' });\n\n  console.log(response);\n} catch (error) {\n  console.log(error);\n}\n```\n\n**Using Sandbox APIs**\n\n```js\n// By Person Enrichment\ntry {\n  const response = await PDLJSClient.person.enrichment({\n    email: 'reneewillis74@aol.com',\n    sandbox: true,\n  });\n\n  console.log(response);\n} catch (error) {\n  console.log(error);\n}\n\n// By Person Search (SQL)\ntry {\n  const response = await PDLJSClient.person.search.sql({\n    searchQuery: \"SELECT * FROM person WHERE location_country='united states';\",\n    size: 10,\n    sandbox: true,\n  });\n\n  console.log(response.total);\n} catch (error) {\n  console.log(error);\n}\n\n// By Person Search (Elasticsearch)\nconst esQuery = {\n  query: {\n    bool: {\n      must:[\n        { term: { location_country: 'united states' } }\n      ]\n    }\n  }\n}\n\ntry {\n  const response = await PDLJSClient.person.search.elastic({ searchQuery: esQuery, size: 10, sandbox: true });\n\n  console.log(response.total);\n} catch (error) {\n  console.log(error);\n}\n\n// By Person Fuzzy Enrichment\ntry {\n  const response = PDLJSClient.person.identify({ email: 'reneewillis74@aol.com', sandbox: true });\n\n  console.log(response);\n} catch (error) {\n  console.log(error);\n}\n\n// By Company Enrichment\ntry {\n  const response = await PDLJSClient.company.enrichment({ website: 'kohlerinteriors.com', sandbox: true });\n\n  console.log(response);\n} catch (error) {\n  console.log(error);\n}\n\n// By Company Search (SQL)\nconst sqlQuery = \"SELECT * FROM company WHERE tags='hotel consultant' AND industry='hospitality';\"\n\ntry {\n  const response = await PDLJSClient.company.search.sql({ searchQuery: sqlQuery, size: 10, sandbox: true });\n\n  console.log(response.total);\n} catch (error) {\n  console.log(error);\n}\n\n// By Company Search (Elasticsearch)\nconst esQuery = {\n  query: {\n    bool: {\n      must:[\n        { term: { tags: 'hotel consultant' } },\n        { term: { industry: 'hospitality' } }\n      ]\n    }\n  }\n}\n\ntry {\n  const response = await PDLJSClient.company.search.elastic({ searchQuery: esQuery, size: 10, sandbox: true });\n\n  console.log(response.total);\n} catch (error) {\n  console.log(error);\n}\n```\n\n## 🌐 Endpoints \u003ca name=\"endpoints\"\u003e\u003c/a\u003e\n\n**Person Endpoints**\n| API Endpoint | PDLJS Function |\n|-|-|\n| [Person Enrichment API](https://docs.peopledatalabs.com/docs/enrichment-api) | `PDLJS.person.enrichment({ ...params })` |\n| [Person Preview Enrichment API](https://docs.peopledatalabs.com/docs/preview-enrichment-api) | `PDLJS.person.enrichmentPreview({ ...params })` |\n| [Person Bulk Person Enrichment API](https://docs.peopledatalabs.com/docs/bulk-enrichment-api) | `PDLJS.person.bulk.enrichment({ ...records })` |\n| [Person Search API](https://docs.peopledatalabs.com/docs/search-api) | SQL: `PDLJS.person.search.sql({ ...params })` \u003cbr/\u003e Elasticsearch: `PDLJS.person.search.elastic({ ...params })`|\n| [Person Identify API](https://docs.peopledatalabs.com/docs/identify-api) | `PDLJS.person.identify({ ...params })` |\n| [Person Changelog API](https://docs.peopledatalabs.com/docs/person-changelog-api) | `PDLJS.person.changelog({ ...params })` |\n\n**Company Endpoints**\n| API Endpoint | PDLJS Function |\n|-|-|\n| [Company Enrichment API](https://docs.peopledatalabs.com/docs/company-enrichment-api) | `PDLJS.company.enrichment({ ...params })` |\n| [Company Bulk Enrichment API](https://docs.peopledatalabs.com/docs/bulk-company-enrichment-api) | `PDLJS.company.bulk.enrichment({ ...records })` |\n| [Company Search API](https://docs.peopledatalabs.com/docs/company-search-api) | SQL: `PDLJS.company.search.sql({ ...params })` \u003cbr/\u003e Elasticsearch: `PDLJS.company.search.elastic({ ...params })`|\n\n**Supporting Endpoints**\n| API Endpoint | PDLJS Function |\n|-|-|\n| [Autocomplete API](https://docs.peopledatalabs.com/docs/autocomplete-api) | `PDLJS.autocomplete({ ...params })` |\n| [Company Cleaner API](https://docs.peopledatalabs.com/docs/cleaner-apis#companyclean) | `PDLJS.company.cleaner({ ...params })` |\n| [Location Cleaner API](https://docs.peopledatalabs.com/docs/cleaner-apis#locationclean) | `PDLJS.location.cleaner({ ...params })` |\n| [School Cleaner API](https://docs.peopledatalabs.com/docs/cleaner-apis#schoolclean) | `PDLJS.school.cleaner({ ...params })` |\n| [Job Title Enrichment API](https://docs.peopledatalabs.com/docs/job-title-enrichment-api) | `PDLJS.jobTitle({ ...params })` |\n| [IP Enrichment API](https://docs.peopledatalabs.com/docs/ip-enrichment-api) | `PDLJS.ip({ ...params })` |\n\n**Sandbox Endpoints**\n| API Endpoint | PDLJS Function |\n|-|-|\n| [Person Enrichment Sandbox API](https://docs.peopledatalabs.com/docs/sandbox-apis) | `PDLJS.person.enrichment({ ...params, sandbox: true })` |\n| [Person Search Sandbox API](https://docs.peopledatalabs.com/docs/sandbox-apis) | SQL: `PDLJS.person.search.sql({ ...params, sandbox: true })` \u003cbr/\u003e Elasticsearch: `PDLJS.person.search.elastic({ ...params, sandbox: true })`|\n| [Person Identify Sandbox API](https://docs.peopledatalabs.com/docs/sandbox-apis) | `PDLJS.person.identify({ ...params, sandbox: true })` |\n| [Company Enrichment Sandbox API](https://docs.peopledatalabs.com/docs/sandbox-apis) | `PDLJS.company.enrichment({ ...params, sandbox: true })` |\n| [Company Search Sandbox API](https://docs.peopledatalabs.com/docs/sandbox-apis) | SQL: `PDLJS.company.search.sql({ ...params, sandbox: true })` \u003cbr/\u003e Elasticsearch: `PDLJS.company.search.elastic({ ...params, sandbox: true })`|\n\n## 📘 Documentation \u003ca name=\"documentation\"\u003e\u003c/a\u003e\n\nAll of our API endpoints are documented at: \u003chttps://docs.peopledatalabs.com/\u003e\n\nThese docs describe the supported input parameters, output responses and also provide additional technical context.\n\nAs illustrated in the [Endpoints](#endpoints) section above, each of our API endpoints is mapped to a specific method in the PDLJS class.  For each of these class methods, **all function inputs are mapped as input parameters to the respective API endpoint**, meaning that you can use the API documentation linked above to determine the input parameters for each endpoint.\n\nAs an example:\n\nThe following is **valid** because `name` is a [supported input parameter to the Person Identify API](https://docs.peopledatalabs.com/docs/identify-api-reference#input-parameters):\n\n```js\nPDLJS.person.identify({ name: 'sean thorne' })\n```\n\nConversely, this would be **invalid** because `fake_parameter` is not an input parameter to the Person Identify API:\n\n```js\nPDLJS.person.identify({ fake_parameter: 'anything' })\n```\n\n#### Special Note about Search API Support \u003ca name=\"special-note\"\u003e\u003c/a\u003e\n\nOur Person Search API and Company Search API endpoints both support two types of query syntax: you can construct search queries using either `SQL` or `Elasticsearch` syntax.\n\nIn the PDLJS class, the person and company search functions are broken out into two syntax-specific methods as follows:\n| Data Type | Search Query Syntax | Function |\n| -- | -- | -- |\n| Person | SQL | `PDLJS.person.search.sql({ ...params })` |\n| Person | Elasticsearch | `PDLJS.person.search.elastic({ ...params })` |\n| Company | SQL | `PDLJS.company.search.sql({ ...params })` |\n| Company | Elasticsearch | `PDLJS.company.search.elastic({ ...params })` |\n\nYou can pass your query to these methods using the special `searchQuery` function argument, as shown in the following example:\n\n```js\nconst sqlQuery = \"SELECT * FROM company WHERE website='peopledatalabs.com';\"\n\ntry {\n  const response = await PDLJS.company.search.sql({ searchQuery: sqlQuery, size: 10 });\n\n  console.log(response.total)\n} catch (error) {\n  console.log(error)\n}\n```\n\n#### Upgrading to v6.X.X \u003ca name=\"upgrading-to-v6\"\u003e\u003c/a\u003e\n\nNOTE: When upgrading to v6.X.X from vX.X.X and below, Retrieve and Bulk Retrieve were both changed to make the `pretty`, `titlecase` and `filter_updated` to be siblings of the `requests` parameter.\n\n#### Upgrading to v5.X.X \u003ca name=\"upgrading-to-v5\"\u003e\u003c/a\u003e\n\nNOTE: When upgrading to v5.X.X from v4.X.X and below, Bulk Enrichment was moved from `PDLJS.person.bulk({ ...records })` to `PDLJS.person.bulk.enrichment({ ...records })`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeopledatalabs%2Fpeopledatalabs-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeopledatalabs%2Fpeopledatalabs-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeopledatalabs%2Fpeopledatalabs-js/lists"}