> ## 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.

# People Data Labs: Company Search

> Search companies with structured filters or SQL, such as industry, size and location. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Search companies with structured filters or SQL, such as industry, size and location.

> [!NOTE]
>
> Tool ID: `peopledatalabs_company_search`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'peopledatalabs_company_search',
  {
    "query": {},
    "sql": "SELECT * FROM company WHERE location_country=\"united states\" AND website IS NOT NULL",
    "size": 123
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute peopledatalabs_company_search --input '{
  "query": {},
  "sql": "SELECT * FROM company WHERE location_country=\"united states\" AND website IS NOT NULL",
  "size": 123
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "data": [
      {}
    ],
    "total": 123,
    "scroll_token": "example"
  }
}
```

Use `deepline describe peopledatalabs_company_search --json` for the latest machine-readable contract.

## Input reference

People Data Labs company search input.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `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 company WHERE ...`. Use single quotes for string literals. You must use valid PDL field names and nested subfields (e.g., `location.country`, not `location`). 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 company WHERE See the live schema for the complete constraint. |
| `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.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={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "People Data Labs company 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 company WHERE ...`. Use single quotes for string literals. You must use valid PDL field names and nested subfields (e.g., `location.country`, not `location`). 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 company WHERE location_country='mexico' AND phone 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."
      },
      "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 reference

People Data Labs company search result.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.data` | `array` | No | — | — |
| `result.data.total` | `number` | No | — | — |
| `result.data.scroll_token` | `string \| null` | No | — | — |
| `result.data.warnings` | `array` | No | — | — |
| `result.data.error` | `string` | No | — | — |
| `result.data.status` | `number` | No | — | — |
| `result.meta` | `record` | No | — | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "People Data Labs company 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>

## Deepline cost

* Pricing model: `per_result` (per result).
* Estimated Deepline credits: `1.19` per pricing unit.

## Related documentation

* [People Data Labs provider guide](https://deepline.com/docs/providers/peopledatalabs/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.