# Buscar personas

Source: https://won.dev/es/docs/enrich/people-search

`POST https://api.won.dev/v1/enrich/people/search`

Lista las personas que trabajan en una empresa, por su sitio web o por el `company_id` de una empresa de la API de comercio exterior, o las personas de cualquier empresa que encajen: por `titles`, `seniority` y `department`, acotadas por dónde está la empresa (`company_country`), dónde está la persona (`location`), la `industry` de la empresa y `with_email`. Devuelve nombre, cargo, nivel, área, empleador y perfil de LinkedIn, sin datos de contacto. Cuesta USD 0.005 por cada persona devuelta; un resultado vacío es gratis. Necesita una empresa, o `titles`, `seniority` o `department`: los demás filtros solo acotan. En una empresa solo se devuelven las personas registradas con su dominio propio, así que nunca aparece el personal de una empresa con un nombre parecido; cuando no hay nadie registrado con él, se devuelven en su lugar las personas que su página de LinkedIn lista como empleados actuales, en una sola página, salvo que `company_country`, `location`, `industry` o `with_email` acoten la búsqueda. El `id` de cada persona se guarda para tu cuenta: después, pásalo como `person_id` a `POST /enrich/people/email/find` para su correo de trabajo, a `POST /enrich/people/phone/find` para su teléfono, o a `POST /enrich/people/find` para ambos junto con el perfil. Para obtener personas con un correo verificado en un solo paso, usa `GET /trade/companies/{id}/contacts`.

- **Cobro:** `person_record` USD 0.005: Una persona en la lista de personas de una empresa, sin datos de contacto.
- **Modo:** `waterfall` ([qué significa cada modo](/es/docs/trade#modes))

Una clave de prueba (`won_test_...`) responde esta solicitud con la misma empresa y las mismas personas de muestra, sin costo.

## Parámetros [#parameters]

Los parámetros van en el cuerpo JSON. Las solicitudes `POST` también aceptan el encabezado `Idempotency-Key`; consulta [Idempotencia](/es/docs/idempotency).

| Parámetro | Tipo | Obligatorio | Descripción (texto original de la API) |
| --- | --- | --- | --- |
| `domain` | string | no | The company's website, such as `example.com`. |
| `company_id` | string | no | A company ID from the trade data API, such as `co_8f3k2m9x4p1q`, instead of `domain`: the company's website on record is used. |
| `titles` | string[] | no | Job title words, such as `buyer` or `purchasing manager`: someone whose title has any of them. Up to 10. |
| `seniority` | (`owner` \| `c_level` \| `executive` \| `manager` \| `senior` \| `staff`)[] | no | Only people of these levels: `owner`, `c_level`, `executive` (VP, director, head), `manager`, `senior` (a senior individual role, such as Senior Buyer), `staff` (any other role). Default: any level. |
| `department` | (`purchasing` \| `sales` \| `management` \| `operations` \| `marketing` \| `finance` \| `engineering` \| `quality` \| `it` \| `hr` \| `legal`)[] | no | Only people in these departments: `purchasing`, `sales`, `management`, `operations`, `marketing`, `finance`, `engineering`, `quality`, `it`, `hr`, `legal`. Default: any department. |
| `company_country` | string[] | no | Only people at companies headquartered in these countries: ISO codes such as `US`, or English names. Up to 10. |
| `location` | string[] | no | Only people who are in one of these places, as their profile writes it: a city, a region or a country, such as `Vietnam` or `Bavaria`. Up to 5. |
| `industry` | string[] | no | Industries, in your words or by name: `furniture` stands for every industry with that word (its makers, wholesalers and retailers), a full name such as `Furniture and Home Furnishings Manufacturing` for that one alone. Names are LinkedIn's. Up to 5; `query.industry` says which names were searched. |
| `with_email` | boolean | no | Only people a source has an email on record for, so that `POST /enrich/people/email/find` is more likely to find one. Same price. Default: `false`. |
| `company_linkedin_url` | string | no | The company's LinkedIn page, such as `https://www.linkedin.com/company/acme`, when you know it. It is used when nobody is filed under the website, or when no website is on record for `company_id`. |
| `limit` | integer | no | How many people to return, 1 to 100. You pay for the people returned. Default: `10`. |
| `cursor` | string | no | To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters. |
| `max_cost` | number | no | Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged. |
| `dry_run` | boolean | no | If true, only return the maximum cost of this call. Nothing runs, nothing is charged. Default: `false`. |

## Respuesta [#response]

Con `dry_run: true` no se ejecuta nada y `data` trae solo lo máximo que puede costar la llamada; consulta [Simulaciones](/es/docs/responses#dry-run). Los errores se describen en [Errores](/es/docs/errors).

| Campo | Tipo | Descripción (texto original de la API) |
| --- | --- | --- |
| `data` | object[] | The people of this page. |
| `data[].id` | string | Person ID, such as `per_4m7q2x9k1c8d`. It is kept for your account for 90 days after it was last returned: pass it as `person_id` to find the person's email or phone, or as `contact_id` to add them to a campaign. The same person can come back under another ID from another endpoint; each one works. To match people across calls, compare `linkedin_url`. |
| `data[].name` | string \| null | Full name. |
| `data[].first_name` | string \| null |  |
| `data[].last_name` | string \| null |  |
| `data[].title` | string \| null | Current job title. |
| `data[].seniority` | `owner` \| `c_level` \| `executive` \| `manager` \| `senior` \| `staff` \| null | Level, read from the title. |
| `data[].department` | `purchasing` \| `sales` \| `management` \| `operations` \| `marketing` \| `finance` \| `engineering` \| `quality` \| `it` \| `hr` \| `legal` \| null | Department, read from the title. |
| `data[].company` | string \| null | Current employer. |
| `data[].company_domain` | string \| null | The employer's website, such as `example.com`. |
| `data[].linkedin_url` | string \| null | The person's LinkedIn profile. |
| `data[].location` | string \| null | Where the person is, as their profile says. |
| `total` | integer \| null | How many people the source lists for the company, the title words and the other filters, before the filters by level and department. Null when not known. |
| `has_more` | boolean | Whether more people follow this page. |
| `next_cursor` | string \| null | Pass it as `cursor` to get the next page. Null on the last page. |
| `query` | object | The request as it was understood: country names as codes, the default dates filled in. |
| `notice` | string \| null | A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise. |
| `usage` | object | What this call was charged, and the balance left. |
| `usage.unit` | `person_record` \| `person_profile` \| `person_email` \| `person_phone` \| `email_verification` \| `company_listing` \| `company_record` \| `company_channels` \| `company_technologies` \| `company_funding` \| `company_news` \| `company_lookalikes` \| `job_posting` | What is counted. |
| `usage.records` | integer | How many were returned and charged. |
| `usage.already_paid` | integer | How many more were returned for free, because this organization paid for them in the last 30 days. |
| `usage.cost` | number | What this call cost, in US dollars. |
| `usage.balance` | number | The balance left after this call, in US dollars. |
| `usage.replayed` | boolean | True when this is a repeat of a request from the last 24 hours. Repeats are free. |

## Ejemplo [#example]

```bash
curl https://api.won.dev/v1/enrich/people/search \
  -H "Authorization: Bearer $WON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "domain": "northfield-home.example",
  "department": [
    "purchasing"
  ],
  "limit": 2
}'
```

```json
{
  "data": [
    {
      "id": "per_4m7q2x9k1c8d",
      "name": "Jordan Lee",
      "first_name": "Jordan",
      "last_name": "Lee",
      "title": "Director of Global Sourcing",
      "seniority": "executive",
      "department": "purchasing",
      "company": "SAMPLE Northfield Home Furnishings",
      "company_domain": "northfield-home.example",
      "linkedin_url": "https://www.linkedin.com/in/sample-jordan-lee",
      "location": "Charlotte, North Carolina, United States"
    },
    {
      "id": "per_7a0c3e6g9j2m",
      "name": "Alex Morgan",
      "first_name": "Alex",
      "last_name": "Morgan",
      "title": "Purchasing Manager",
      "seniority": "manager",
      "department": "purchasing",
      "company": "SAMPLE Northfield Home Furnishings",
      "company_domain": "northfield-home.example",
      "linkedin_url": "https://www.linkedin.com/in/sample-alex-morgan",
      "location": "Charlotte, North Carolina, United States"
    }
  ],
  "total": 37,
  "has_more": true,
  "next_cursor": "cur_Zx81kQp4b2JtMW0uMXJ6ZzQ",
  "query": {
    "domain": "northfield-home.example",
    "department": [
      "purchasing"
    ],
    "limit": 2
  },
  "notice": null,
  "usage": {
    "unit": "person_record",
    "records": 2,
    "already_paid": 0,
    "cost": 0.01,
    "balance": 48.99,
    "replayed": false
  }
}
```