Ads Targeting (Deprecated)

Note

Please refer to the updated Ad Targeting Documentation.

Overview

To increase the reach and effectiveness of your ad campaigns, use LinkedIn's targeting capabilities to enhance your reach across various member demographics on the platform.

Targeting is set at the campaign level, where you can specify your ideal audience by setting a list of targeting options.

To learn more, please see Targeting Options and Best Practices for LinkedIn Advertisements.

You may choose to use standardized data like seniorities, regions, industries, etc. for some of these calls.

The two core concepts for targeting on the LinkedIn ads platform are facets and entities.

Facets are the types of targeting available to you. Each facet will have entities, which are the exact values that you can select for your campaign targeting.

Discover Ad Targeting Facets

Facets describe the demographic groups of members on the LinkedIn platform. With targeting, you will see how facets can help further define your intended audience.

To discover the facets (types) of targeting available to you, simply use the following API to fetch all valid values.

GET https://api.linkedin.com/v2/adTargetingFacets

sample response

{
    "elements": [
        {
            "$URN": "urn:li:adTargetingFacet:genders",
            "availableEntityFinders": [
                "AD_TARGETING_FACET"
            ],
            "entityTypes": [
                "GENDER"
            ],
            "facetName": "genders"
        },
        {
            "$URN": "urn:li:adTargetingFacet:industries",
            "availableEntityFinders": [
                "AD_TARGETING_FACET",
                "TYPEAHEAD",
                "SIMILAR_ENTITIES"
            ],
            "entityTypes": [
                "INDUSTRY"
            ],
            "facetName": "industries"
        }
    ]
}

From the results of the API, you now have the available targeting types before you.

Each targeting type contains the name of the facet, the type, and the Finder methods available to query for more information on the type and its valid values.

To learn more, please see Ad Targeting Facets API.

Discover Targeting Options by Ad Targeting Facet

There are a few ways to get more information on a facet type. When you've identified the facet type(s) you'd like to target, you will need to fetch the valid entity values.

To discover available options within each type of targeting, simply use the following API to fetch all valid values.

GET https://api.linkedin.com/v2/adTargetingEntities?q=adTargetingFacet

Targeting Example: Seniority

**Deprecated, Please refer to the updated Ad Targeting Documentation.

Suppose you'd like your Sponsored Content to reach your audience based on targeting criteria of professional Seniority.

To find out more about the Seniority targeting facet, you can make the following API call:

GET https://api.linkedin.com/v2/adTargetingEntities?q=adTargetingFacet&entityType=SENIORITY&facet=urn:li:adTargetingFacet:seniorities

sample response

{
    "elements": [
    {
        "value": {
            "string": "urn:li:seniority:6"
        }
    },
    {
        "value": {
            "string": "urn:li:seniority:7"
        }
    },
    {
        "value": {
            "string": "urn:li:seniority:8"
        }
    },
    {
        "value": {
            "string": "urn:li:seniority:9"
        }
    },
    {
        "value": {
            "string": "urn:li:seniority:10"
        }
    }
    ..
    ]
}

Discover Targeting Options by Similar Entities

To discover similar available options within each type of targeting, simply use the following API to fetch all valid values.

GET https://api.linkedin.com/v2/adTargetingEntities?q=similarEntities

Targeting Example: Employers

**Deprecated, Please refer to the updated Ad Targeting Documentation.

Suppose you'd like your Sponsored Content to reach your audience based on targeting criteria of previous employers.

To find out more about similar entities from the Employers targeting facet, you can make the following API call:

GET https://api.linkedin.com/v2/adTargetingEntities?q=similarEntities&facet=urn:li:adTargetingFacet:employers&entityType=COMPANY&entities=urn:li:organization:1003

sample response

       {
            "value": {
                "string": "urn:li:organization:1480"
            }
        },
        {
            "value": {
                "string": "urn:li:organization:72236"
            }
        },
        {
            "value": {
                "string": "urn:li:organization:4351"
            }
        }

Note

Please note, there is a limit of 100 on the number of employers you can target using this endpoint.

However, you can use Matched audiences to target a large number of audience.

Discover Targeting Options by Typeahead

Typeahead

**Deprecated, Please refer to the updated Ad Targeting Documentation. To discover similar options using Typeahead capabilities, simply use the following API to fetch valid values.

GET https://api.linkedin.com/v2/adTargetingEntities?q=TYPEAHEAD&entityType=FIELD_OF_STUDY&facet=urn:li:adTargetingFacet:fieldsOfStudy&query=econ

sample response

{
  "elements": [
    {
      "value": {
        "string": "urn:li:fieldOfStudy:100990"
      }
    },
    {
      "value": {
        "string": "urn:li:fieldOfStudy:101438"
      }
    },
    {
      "value": {
        "string": "urn:li:fieldOfStudy:100994"
      }
    },
    ....
  ]
}

Using Decoration to Access Targeting Facet Details

As demonstrated in the examples above, /adTargetingEntities generally returns targeting URNs. In most cases, your application will need human readable data to display in your user interface. Using response decoration, we can access additional targeting entity data like localized name.

In this section, we will append a projection parameter to your adTargetingEntities GET request which will inject additional targeting facet details in the response body. For more information on decoration, take a look at the response decoration documentation.

Default Request & Response

Without a projection parameter, the response includes an array of objects that include seniority URNs:

GET https://api.linkedin.com/v2/adTargetingEntities?q=adTargetingFacet&entityType=SENIORITY&facet=urn:li:adTargetingFacet:seniorities

sample response

{
  "elements": [
    {
      "value": {
        "string": "urn:li:seniority:1"
      }
    },
    {
      "value": {
        "string": "urn:li:seniority:2"
      }
    },
    ....
  ]
}

Decorated Request & Response

By appending a projection parameter and decorating on the string field, the response includes additional details about the targeting facet like name , id and $URN .

GET https://api.linkedin.com/v2/adTargetingEntities?q=adTargetingFacet&entityType=SENIORITY&facet=urn:li:adTargetingFacet:seniorities&projection=(elements*(value(string~)))

sample response

{
  "elements": [
    {
      "value": {
        "string": "urn:li:seniority:1",
        "string~": {
          "name": {
            "localized": {
              "en_US": "Unpaid"
            }
          },
          "id": 1,
          "$URN": "urn:li:seniority:1"
        }
      }
    },
    {
      "value": {
        "string": "urn:li:seniority:2",
        "string~": {
          "name": {
            "localized": {
              "en_US": "Training"
            }
          },
          "id": 2,
          "$URN": "urn:li:seniority:2"
        }
      }
    },
    ...
  ]
}

Taking it a step further

The projection and decoration syntax is powerful. In the adTargetingEntities use-case, appending &projection=(elements*(value(string~))) to the end of the targeting GET request returns all the default fields for the decorated object.

If you would like to trim down the response to only include the seniority's name object, you can do so by increasing the precision of the projection request. By including the name in the request's projection parameter the response no longer includes the redundant id and $URN fields.

GET https://api.linkedin.com/v2/adTargetingEntities?q=adTargetingFacet&entityType=SENIORITY&facet=urn:li:adTargetingFacet:seniorities&projection=(elements*(value(string~(name))))

sample response

{
  "elements": [
    {
      "value": {
        "string": "urn:li:seniority:1",
        "string~": {
          "name": {
            "localized": {
              "en_US": "Unpaid"
            }
          }
        }
      }
    },
    {
      "value": {
        "string": "urn:li:seniority:2",
        "string~": {
          "name": {
            "localized": {
              "en_US": "Training"
            }
          }
        }
      }
    },
    ...
  ]
}

Parameters with Projection

Note

Applying projection on TYPEAHEAD finder for entityType SKILLS requires passing in parameters - localeLanguage and localeCountry within the projection syntax:

GET https://api.linkedin.com/v2/adTargetingEntities?q=TYPEAHEAD&entityType=SKILL&facet=urn:li:adTargetingFacet:skills&query=jav&projection=(elements*(value(string~;localeLanguage=en;localeCountry=US)))

sample response

{
    "elements": [
        {
            "value": {
                "string": "urn:li:skill:147",
                "string~": {
                    "id": 147,
                    "locale": {
                        "country": "US",
                        "language": "en"
                    },
                    "standardizedName": "Java"
                }
            }
        },
        {
            "value": {
                "string": "urn:li:skill:218",
                "string~": {
                    "id": 218,
                    "locale": {
                        "country": "US",
                        "language": "en"
                    },
                    "standardizedName": "JavaScript"
                }
            }
        }
    ]
}