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

# Peopledatalabs Person Search: Inputs, Cost & CLI Example

> Running structured people search with PDL filters. Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=peopledatalabs_person_search:{"sql":"SELECT * FROM person WHERE location_country=\"united states\" AND job_title_role=\"engineering\""}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                   | Type      | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ---------------------- | --------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.query`        | `record`  | No       |         | Elasticsearch-style query. Use this OR `sql`, not both. If you are unsure about field names, prefer `sql` with known fields.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `payload.sql`          | `string`  | No       |         | SQL must be in the form `SELECT * FROM person WHERE ...`. Use single quotes for string literals (e.g., name='people data labs'). You must use valid PDL field names and nested subfields (e.g., `experience.title.name`, not `experience`). Only `SELECT *` is supported — column selection is not. DO NOT include a `LIMIT` clause; PDL rejects any SQL with `LIMIT` as HTTP 400 (`LIMIT is not supported inside of a SQL query`). Use the `size` input parameter (1–100) to control how many records come back. Example: SELECT \* FROM person WHERE location\_country='mexico' AND job\_title\_role='health' AND phone\_numbers IS NOT NULL. |
| `payload.size`         | `integer` | No       |         | Number of records to return (1-100).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `payload.scroll_token` | `string`  | No       |         | Token for retrieving the next page of results.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `payload.dataset`      | `string`  | No       |         | Optional dataset selector supported by PDL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `payload.titlecase`    | `boolean` | No       |         | Normalize output text casing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `payload.data_include` | `string`  | No       |         | Avoid using data\_include unless you want partial fields only.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `payload.pretty`       | `boolean` | No       |         | Pretty-print response JSON.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "People Data Labs person search input.",
    "properties": {
      "query": {
        "type": "object",
        "description": "Elasticsearch-style query. Use this OR `sql`, not both. If you are unsure about field names, prefer `sql` with known fields.",
        "additionalProperties": {}
      },
      "sql": {
        "type": "string",
        "description": "SQL must be in the form `SELECT * FROM person WHERE ...`. Use single quotes for string literals (e.g., name='people data labs'). You must use valid PDL field names and nested subfields (e.g., `experience.title.name`, not `experience`). Only `SELECT *` is supported — column selection is not. DO NOT include a `LIMIT` clause; PDL rejects any SQL with `LIMIT` as HTTP 400 (`LIMIT is not supported inside of a SQL query`). Use the `size` input parameter (1–100) to control how many records come back. Example: SELECT * FROM person WHERE location_country='mexico' AND job_title_role='health' AND phone_numbers IS NOT NULL."
      },
      "size": {
        "type": "integer",
        "description": "Number of records to return (1-100)."
      },
      "scroll_token": {
        "type": "string",
        "description": "Token for retrieving the next page of results."
      },
      "dataset": {
        "type": "string",
        "description": "Optional dataset selector supported by PDL."
      },
      "titlecase": {
        "type": "boolean",
        "description": "Normalize output text casing."
      },
      "data_include": {
        "type": "string",
        "description": "Avoid using data_include unless you want partial fields only."
      },
      "pretty": {
        "type": "boolean",
        "description": "Pretty-print response JSON."
      }
    },
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `object` | Yes      |         | Provider response payload.                     |
| `result.meta` | `record` | No       |         | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "People Data Labs person search result.",
    "properties": {
      "data": {
        "type": [
          "object",
          "null"
        ],
        "description": "Provider response payload.",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "total": {
            "type": "number"
          },
          "scroll_token": {
            "type": [
              "string",
              "null"
            ]
          },
          "warnings": {
            "type": "array",
            "items": {}
          },
          "error": {
            "type": "string"
          },
          "status": {
            "type": "number"
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": {}
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute peopledatalabs_person_search --payload '{
  "sql": "SELECT * FROM person WHERE location_country=\"united states\" AND job_title_role=\"engineering\""
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

* Pricing model: `per_result` (per result).
* Estimated Deepline credits: `3.92` per pricing unit.
* Billing mode: `post_deduct`.
