---
title: "People Data Labs / Search people (POST)"
description: "People Data Labs tool people-data-labs-person-search-post on looot: input fields, $0.28 per result, output shape, and code to run it with curl, JavaScript or Python."
sidebar:
  hidden: true
---

{/* Generated by scripts/generate-api-reference.mjs from data/api-reference.json. Do not edit. */}

The same person search as people-data-labs-person-search-get, sent as a POST body: exactly one of sql or query, with size. Returns data, full person records. Priced per record returned.

- **Tool id:** `people-data-labs-person-search-post`
- **Provider:** [People Data Labs](/providers/people-data-labs)
- **Job:** [Find people matching a filter](/reference/jobs/people-search) (`people.search`)
- **Price:** $0.28 per result. A call that fails at the provider costs $0.

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `data_include` | string | no | A comma-separated string of fields that you would like the response to include. Begin the string with a - if you would instead like to exclude the specified fields. If you would like to exclude all data from being returned, use data_include="". Example: "full_name,emails.address" |
| `dataset` | string | no | Specifies which dataset(s) the API should search against. Example: "all" |
| `from` | integer | no | An offset value for pagination. Can be a number between 0 and 9999. Pagination can be executed up to a maximum of 10,000 records per query. Be sure to use the "total" response field to help discover how many total records exist in the dataset for your query |
| `pretty` | boolean | no | Whether the output should have human-readable indentation. |
| `query` | string | no | An Elasticsearch (v7.7) query. See our underlying Elasticsearch mapping for reference. Example: "\{\"query\": \{\"term\": \{\"industry\": \"computer software\"\}\}\}" |
| `scroll_token` | string | no | Each search API response returns a scroll_token. Include it in the next request to fetch the next size matching records. |
| `size` | integer | yes | The number of matched records to return for this query if they exist*. Must be between 1 and 100 |
| `sql` | string | no | A SQL query of the format: SELECT * FROM person WHERE XXX, where XXX is a standard SQL boolean query involving our person fields. Example: "SELECT * FROM person WHERE industry ='computer software'" |
| `titlecase` | boolean | no | Setting titlecase to true will titlecase any records returned |

## Output

Shape of the run's `result`, the expected shape, not yet checked against real answers:

```txt
{ data: { id, sex, emails, skills: string[], regions, industry, profiles: { id, ... ...
```

The shape is cut here. Signed in, `looot inspect people-data-labs-person-search-post` prints all of it.

## Run it

Every call needs your API token in `LOOOT_TOKEN`; [Sign in](/get-started/sign-in#use-the-token-in-scripts-and-agents) shows how to get one. Each run also needs a new idempotency key, so a retry never pays twice. With `wait: 30` the answer comes back inline when the run ends within 30 seconds. Otherwise you get the running run back: poll `GET /v1/runs/<runId>`.

Example input with placeholder values:

<CodeGroup>

```bash curl
curl -X POST "https://api.looot.ai/v1/runs" \
  -H "Authorization: Bearer $LOOOT_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"endpointId":"people-data-labs-person-search-post","input":{"size":1,"sql":"SELECT * FROM person WHERE industry ='\''computer software'\''","query":"{\"query\": {\"term\": {\"industry\": \"computer software\"}}}","dataset":"all","data_include":"full_name,emails.address","scroll_token":"<scroll_token>"},"wait":30}'
```

```js JavaScript
const response = await fetch("https://api.looot.ai/v1/runs", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LOOOT_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    endpointId: "people-data-labs-person-search-post",
    input: {
      size: 1,
      sql: "SELECT * FROM person WHERE industry ='computer software'",
      query: "{\"query\": {\"term\": {\"industry\": \"computer software\"}}}",
      dataset: "all",
      data_include: "full_name,emails.address",
      scroll_token: "<scroll_token>",
    },
    wait: 30,
  }),
});
const run = await response.json();
console.log(run.status, run.result);
```

```python Python
import os
import uuid

import requests

response = requests.post(
    "https://api.looot.ai/v1/runs",
    headers={
        "Authorization": f"Bearer {os.environ['LOOOT_TOKEN']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "endpointId": "people-data-labs-person-search-post",
        "input": {
            "size": 1,
            "sql": "SELECT * FROM person WHERE industry ='computer software'",
            "query": "{\"query\": {\"term\": {\"industry\": \"computer software\"}}}",
            "dataset": "all",
            "data_include": "full_name,emails.address",
            "scroll_token": "<scroll_token>",
        },
        "wait": 30,
    },
    timeout=90,
)
run = response.json()
print(run["status"], run.get("result"))
```

</CodeGroup>

To let looot pick among every provider of this job instead, send `job:people.search` as `endpointId`; see [the job page](/reference/jobs/people-search).
