# st.searchPeople

This action allows you to search for people applying various filtering criteria.

## Constraints

> ⏺️ **Root Start:** allowed.

> ⬆️ **Parent Actions:** N/A.

> ⬇️ **Child Actions:** [st.doForPeople](/docs/action-st-do-for-people).

## Parameters

```json
{
  "actionType": "st.searchPeople",
  "label": "johnDoeSearch1",
  "term": "John Doe",
  "limit": 2,
  "filter": {
    "firstName": "John",
    "lastName": "Doe",
    "position": "CEO",
    "locations": ["New York", "San Francisco", "London"],
    "industries": ["Software Development", "Professional Services"],
    "currentCompanies": ["Tech Solutions", "Innovatech"],
    "previousCompanies": ["FutureCorp"],
    "schools": ["Harvard University", "MIT"]
  },
  "customSearchUrl": "https://www.linkedin.com/search/results/people/?geoUrn=%5B%22103644278%22%5D&keywords=Bill%20Gates",
  "then": { ... }
}
```

- `label` (optional) – custom label for tracking this action in workflow completion.
- `term` (optional) – keyword or phrase to search. Either `term` or `customSearchUrl` must be provided; a request with neither (for example, with `filter` only) is rejected.
- `limit` (optional) – number of search results to return. Defaults to **10**, with a maximum value of **1000**.
- `filter` (optional) – object that specifies filtering criteria for people. When multiple filter fields are specified, they are combined using `AND` logic.
  - `firstName` (optional) – first name of person.
  - `lastName` (optional) – last name of person.
  - `position` (optional) – job position of person.
  - `locations` (optional) – array of free-form strings representing locations. Matches if person is located in any of the listed locations.
  - `industries` (optional) – array of enums representing industries. Matches if person works in any of the listed industries. Takes specific values available in the LinkedIn interface.
  - `currentCompanies` (optional) – array of company names. Matches if person currently works at any of the listed companies.
  - `previousCompanies` (optional) – array of company names. Matches if person previously worked at any of the listed companies.
  - `schools` (optional) – array of institution names. Matches if person currently attends or previously attended any of the listed institutions.
- `customSearchUrl` (optional) – URL copied from LinkedIn search results page after configuring desired filters. When specified, overrides term and filter parameters. Allows using any search configuration available in the LinkedIn interface. Either `term` or `customSearchUrl` must be provided.
- `then` (optional) – object or array of child actions to be executed within this action.

## Result options

1. **Successful search:**

```json
{
  "actionType": "st.searchPeople",
  "label": "johnDoeSearch1",
  "success": true,
  "data": [
    {
      "name": "John Doe",
      "publicUrl": "https://www.linkedin.com/in/johndoe",
      "headline": "Founder & CEO at Example Company",
      "location": "London",
      "avatarUrl": "https://media.licdn.com/dms/image/v2/D5603AQE/profile-displayphoto-shrink_100_100/0/1700000000000",
      "then": { ... }
    },
    {
      "name": "John Doe",
      "publicUrl": "https://www.linkedin.com/in/johnyd",
      "headline": "Product Manager at Semsoft",
      "location": "New York",
      "avatarUrl": null,
      "then": { ... }
    }
  ]
}
```

- `label` – included only if specified in the action parameters.
- `data` – array of search outputs with results of child actions execution.
  - `name` – full name of the person.
  - `publicUrl` – [public](/faq/what-are-hashed-url-and-public-url) LinkedIn URL of the person.
  - `headline` – headline of the person.
  - `location` – free-form string indicating the person's location.
  - `avatarUrl` – URL of the person's profile photo, or `null` if the person has no photo.
  - `then` – results of child actions execution.

2. **Failed search:**

```json
{
  "actionType": "st.searchPeople",
  "label": "johnDoeSearch1",
  "success": false,
  "error": {
    "type": "searchingNotAllowed",
    "message": "LinkedIn has blocked performing the search."
  }
}
```

- `label` – included only if specified in the action parameters.
- `error.type` – enum with the following possible values:
  - `searchingNotAllowed` – LinkedIn has blocked performing the search due to exceeding limits or other restrictions.
