# Enrich a person — People Data Labs

> The Person Enrichment API provides a one-to-one match, retrieving up-to-date information on a unique individual. See the docs here

- Key: `people_data_labs-enrich-person`
- Type: Action (Write)
- Version: 0.0.6
- App: People Data Labs (`people_data_labs`) — https://pipedream.com/apps/people-data-labs.md
- This page (HTML): https://pipedream.com/apps/people-data-labs/actions/enrich-person
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/people_data_labs/actions/enrich-person/enrich-person.mjs

## Description

The Person Enrichment API provides a one-to-one match, retrieving up-to-date information on a unique individual. [See the docs here](https://docs.peopledatalabs.com/docs/reference-person-enrichment-api)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | No | The person's full name, at least first and last. |
| `firstName` | `string` | No | The person's first name. |
| `lastName` | `string` | No | The person's last name. |
| `middleName` | `string` | No | The person's middle name. |
| `location` | `string` | No | The location in which a person lives. Can be anything from a street address to a country name. |
| `streetAddress` | `string` | No | A street address in which the person lives. |
| `locality` | `string` | No | A locality in which the person lives. |
| `region` | `string` | No | A state or region in which the person lives. |
| `country` | `string` | No | A country in which the person lives. |
| `postalCode` | `string` | No | The postal code in which the person lives, must be used with either a country or a region. |
| `company` | `string` | No | A name, website, or social url of a company where the person has worked. |
| `school` | `string` | No | A name, website, or social url of a university or college the person has attended. |
| `phone` | `string` | No | A phone number the person has used. |
| `email` | `string` | No | An email the person has used. |
| `emailHash` | `string` | No | A sha256 email hash. |
| `profile` | `string` | No | A social profile the person has used. List of available social profiles. |
| `lid` | `integer` | No | A LinkedIn numerical ID. |
| `birthDate` | `string` | No | The person's birth date. Either the year, or a full birth date. |
| `required` | `string` | No | Parameter specifying the fields and data points a response must have to return a 200. See docs. |
| `pretty` | `boolean` | No | Whether the output should have human-readable indentation. |
| `minLikelihood` | `integer` | No | The minimum likelihood score a response must have to return a 200. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "people_data_labs",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "people_data_labs-enrich-person",
  arguments: {
    name: "Name",
    firstName: "First name",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "people_data_labs-enrich-person",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    people_data_labs: { authProvisionId: "apn_xxxxxxx" },
    name: "Name",
    firstName: "First name",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "people_data_labs-enrich-person",
    "configured_props": {
      "people_data_labs": { "authProvisionId": "apn_xxxxxxx" },
      "name": "Name",
      "firstName": "First name"
    }
  }'
```

---

- App: https://pipedream.com/apps/people-data-labs.md · All apps: https://pipedream.com/apps
