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

# LinkedIn Ads Audiences: Targeting Entities

> Resolve targeting names to the URNs targetingCriteria requires: typeahead search within a facet (titles, locations, employers, skills), full dumps of small.

Resolve targeting names to the URNs targetingCriteria requires: typeahead search within a facet (titles, locations, employers, skills), full dumps of small.

<Info>
  Tool ID: `linkedin_ads_audiences_targeting_entities`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'linkedin_ads_audiences_targeting_entities',
  {
    "finder": "typeahead"
  },
);

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

### CLI

```bash theme={null}
deepline tools execute linkedin_ads_audiences_targeting_entities --input '{
  "finder": "typeahead"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "entities": [
      {
        "urn": "example",
        "name": "Example",
        "facet_urn": "example"
      }
    ]
  }
}
```

Use `deepline tools get linkedin_ads_audiences_targeting_entities --json` for the latest machine-readable contract.

## Input reference

| Name                      | Type                                                                  | Required | Default | Details                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------------- | --------------------------------------------------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.finder`          | `"typeahead" \| "ad_targeting_facet" \| "similar_entities" \| "urns"` | Yes      | —       | Which adTargetingEntities finder to run: 'typeahead' searches a facet by text (LinkedIn's recommended finder for titles, locations, employers, skills, industries); 'ad\_targeting\_facet' dumps every entity in a small facet (jobFunctions, seniorities, staffCountRanges); 'similar\_entities' expands from known entity URNs; 'urns' resolves entity URNs back to names. Allowed: `typeahead`, `ad_targeting_facet`, `similar_entities`, `urns`. |
| `payload.facet`           | `string`                                                              | No       | —       | Targeting facet, as a short name ('titles', 'locations', 'jobFunctions') or full urn:li:adTargetingFacet:\* URN. Required for every finder except 'urns'. Minimum length: 1.                                                                                                                                                                                                                                                                         |
| `payload.query`           | `string`                                                              | No       | —       | Search text. Required for the 'typeahead' finder. Minimum length: 1.                                                                                                                                                                                                                                                                                                                                                                                 |
| `payload.entities`        | `array`                                                               | No       | —       | Entity URNs to expand from. Required for the 'similar\_entities' finder. Minimum items: 1.                                                                                                                                                                                                                                                                                                                                                           |
| `payload.urns`            | `array`                                                               | No       | —       | Entity URNs to resolve to names. Required for the 'urns' finder. Minimum items: 1.                                                                                                                                                                                                                                                                                                                                                                   |
| `payload.entity_type`     | `string`                                                              | No       | —       | Optional LinkedIn entityType filter such as TITLE, SKILL, FUNCTION, SENIORITY, INDUSTRY, COMPANY. Minimum length: 1.                                                                                                                                                                                                                                                                                                                                 |
| `payload.locale_language` | `string`                                                              | No       | `"en"`  | Minimum length: 2. Maximum length: 2.                                                                                                                                                                                                                                                                                                                                                                                                                |
| `payload.locale_country`  | `string`                                                              | No       | `"US"`  | Minimum length: 2. Maximum length: 2.                                                                                                                                                                                                                                                                                                                                                                                                                |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "finder": {
        "type": "string",
        "description": "Which adTargetingEntities finder to run: 'typeahead' searches a facet by text (LinkedIn's recommended finder for titles, locations, employers, skills, industries); 'ad_targeting_facet' dumps every entity in a small facet (jobFunctions, seniorities, staffCountRanges); 'similar_entities' expands from known entity URNs; 'urns' resolves entity URNs back to names.",
        "enum": [
          "typeahead",
          "ad_targeting_facet",
          "similar_entities",
          "urns"
        ]
      },
      "facet": {
        "type": "string",
        "description": "Targeting facet, as a short name ('titles', 'locations', 'jobFunctions') or full urn:li:adTargetingFacet:* URN. Required for every finder except 'urns'.",
        "minLength": 1
      },
      "query": {
        "type": "string",
        "description": "Search text. Required for the 'typeahead' finder.",
        "minLength": 1
      },
      "entities": {
        "type": "array",
        "description": "Entity URNs to expand from. Required for the 'similar_entities' finder.",
        "minItems": 1,
        "items": {
          "type": "string",
          "minLength": 1
        }
      },
      "urns": {
        "type": "array",
        "description": "Entity URNs to resolve to names. Required for the 'urns' finder.",
        "minItems": 1,
        "items": {
          "type": "string",
          "minLength": 1
        }
      },
      "entity_type": {
        "type": "string",
        "description": "Optional LinkedIn entityType filter such as TITLE, SKILL, FUNCTION, SENIORITY, INDUSTRY, COMPANY.",
        "minLength": 1
      },
      "locale_language": {
        "type": "string",
        "default": "en",
        "minLength": 2,
        "maxLength": 2
      },
      "locale_country": {
        "type": "string",
        "default": "US",
        "minLength": 2,
        "maxLength": 2
      }
    },
    "required": [
      "finder"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name                               | Type             | Required | Default | Details |
| ---------------------------------- | ---------------- | -------- | ------- | ------- |
| `result.data`                      | `object`         | Yes      | —       | —       |
| `result.data.entities`             | `array`          | Yes      | —       | —       |
| `result.data.entities[].urn`       | `string`         | Yes      | —       | —       |
| `result.data.entities[].name`      | `string \| null` | Yes      | —       | —       |
| `result.data.entities[].facet_urn` | `string \| null` | Yes      | —       | —       |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "data": {
        "type": "object",
        "properties": {
          "entities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "urn": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "facet_urn": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "urn",
                "name",
                "facet_urn"
              ],
              "additionalProperties": true
            }
          }
        },
        "required": [
          "entities"
        ],
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": true
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.

## Related documentation

* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
