---
title: "People Data Labs / Search companies (POST)"
description: "People Data Labs tool people-data-labs-company-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 company search as people-data-labs-company-search-get, sent as a POST body: exactly one of sql or query, with size. Returns data, full company records. Priced per record returned.

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

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `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 company WHERE XXX, where XXX is a standard SQL boolean query involving our company 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`, checked against 1 real answer:

```txt
{ data: { id, sic: { sic_code, major_group, industry_group, industry_sector }[], name, size, tags: string[], type, naics: { sector, naics_code, sub_sector, industry_group, naics_industry, national_industry }[], ticker, founded, summary, website, headline, industry, location: { geo, name, metro, region, country, locality, continent, postal_code, address_line_2, street_address }, profiles: string[], industry_v2, linkedin_id, twitter_url, display_name, facebook_url, linkedin_url, mic_exchange, linkedin_slug, employee_count, funding_stages: string[], dataset_version, alternative_names: string[], l... ...
```

The shape is cut here. Signed in, `looot inspect people-data-labs-company-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-company-search-post","input":{"size":1,"sql":"SELECT * FROM person WHERE industry ='\''computer software'\''","query":"{\"query\": {\"term\": {\"industry\": \"computer software\"}}}","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-company-search-post",
    input: {
      size: 1,
      sql: "SELECT * FROM person WHERE industry ='computer software'",
      query: "{\"query\": {\"term\": {\"industry\": \"computer software\"}}}",
      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-company-search-post",
        "input": {
            "size": 1,
            "sql": "SELECT * FROM person WHERE industry ='computer software'",
            "query": "{\"query\": {\"term\": {\"industry\": \"computer software\"}}}",
            "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:company.search` as `endpointId`; see [the job page](/reference/jobs/company-search).
