> ## Documentation Index
> Fetch the complete documentation index at: https://docs.peopledatalabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# JavaScript SDK

# The People Data Labs JavaScript Helper Library

The People Data Labs JavaScript Helper Library makes it easy to interact with our APIs from your JavaScript application. You can find the [most recent version of the library on npm](https://www.npmjs.com/package/peopledatalabs).

## How To Install the Library

This library is available as an [npm](https://www.npmjs.com/package/peopledatalabs) package, and you can install it like this:

```shell NPM
npm i -S peopledatalabs
```

```shell Yarn
yarn add peopledatalabs
```

## Using the Library

Make sure that you sign up for a [free PDL API key](https://www.peopledatalabs.com/signup) if you don't already have one.

```javascript
// See https://github.com/peopledatalabs/peopledatalabs-js
import PDLJS from 'peopledatalabs';

// Create a client, specifying your API key
const PDLClient = new PDLJS({ apiKey: YOUR_API_KEY });

// Chaining Implementation
PDLClient.person.enrichment({ profile: 'linkedin.com/in/seanthorne' }).then((response) => {
  // Print the API response in JSON format
  console.log(response?.data);
}).catch((error) => {
  console.log(error);
});

// Async/Await Implementation
try {
  const getPersonRecord = async () => {
    const response = await PDLClient.person.enrichment({ profile: 'linkedin.com/in/seanthorne' });
    // Print the API response in JSON format
    console.log(response?.data);
  }
  
  getPersonRecord();
} catch (error) {
  console.log(error);
}
```

## TypeScript Support

The People Data Labs JavaScript Helper Library ships with TypeScript types. You can use these to gain the benefits of using TypeScript without having to write your own types.

## More Information, Pull Requests, Feature Suggestions and Bug Reports

We've open-sourced the library, which is available on GitHub. Go there to view more information. You can also submit pull requests, feature suggestions and bug reports.

<Embed url="https://github.com/peopledatalabs/peopledatalabs-js" title="GitHub - peopledatalabs/peopledatalabs-js: A universal JS client with TypeScript support for the People Data Labs API" favicon="https://github.com/favicon.ico" image="https://opengraph.githubassets.com/caa2fbc3a2f2c0a1786cfe0cc9ddfb608cb76320f8ec725d7fed81fb1eab8693/peopledatalabs/peopledatalabs-js" provider="github.com" href="https://github.com/peopledatalabs/peopledatalabs-js" typeOfEmbed="default" />