Freigeben über


Audience Counts

Warning

Deprecation Notice
The Marketing Version 202310 (Marketing October 2023) and earlier versions (excluding 202306 and 202307) have been sunset. Additionally, the unversioned APIs will be sunset soon. We recommend that you migrate to the versioned APIs as well as migrate to the new Content and Community Management APIs to avoid disruptions. See the Migration page for more details. If you haven’t yet migrated and have questions, submit a request on the LinkedIn Developer Support Portal.

The Audience Count API provides the number of member accounts that fit your targeting criteria. As your campaign serves ads, the number of member accounts that you reach will be lower than the target audience size.

Since 300 is the minimum audience size in order to run a campaign, this endpoint is also useful to ensure your target audience is large enough.

Permissions

Any application approved for the LinkedIn Marketing API Program can make these API calls using any 3-legged access token. No additional permissions are requested during the OAuth flow.

Schema

Field Name Description
active Active audience count for the given targeting criteria. Active audience includes members that are more likely to visit LinkedIn sites.
total Total audience count for the given targeting criteria. To protect member privacy, this value is 0 when the audience size is less than 300. The total is a rounded approximation, and the degree of approximation depends upon the size of the audience segment.

Find Count by CriteriaV2

This finder gets the audience count for a given set of targeting criteria. For more information refer to Targeting Criteria.

The parameter q=targetingCriteriaV2 is always required as it represents the Finder targetingCriteriaV2 request.

All API requests are represented in protocol 2.0.0 and require the header X-Restli-Protocol-Version: 2.0.0.

Restli 2.0 requires URNs in query params to be URL encoded. For example, urn:li:skill:17 would become urn%3Ali%3Askill%3A17.

Note that Postman or similar API tools may not support these types of calls. Testing with curl is recommended if you encounter a 400 error with message Invalid query parameters passed to request.

Calls to this endpoint are structured as follows:

GET https://api.linkedin.com/rest/audienceCounts?q=targetingCriteriaV2&targetingCriteria=(include:(and:List((or:({encoded facet_URN_1}:List({encoded facet_URN_1_value_1}, {encoded facet_URN_1_value_2}))),(or:({encoded facet_URN_2}:List({encoded facet_URN_2_value_1},{encoded facet_URN_2_value_2}))))))
GET https://api.linkedin.com/v2/audienceCountsV2?q=targetingCriteriaV2&targetingCriteria=(include:(and:List((or:({encoded facet_URN_1}:List({encoded facet_URN_1_value_1}, {encoded facet_URN_1_value_2}))),(or:({encoded facet_URN_2}:List({encoded facet_URN_2_value_1},{encoded facet_URN_2_value_2}))))))

Parameters

Field Name Required Type Description
q This field should always be targetingCriteriaV2 String Yes
targetingCriteria Yes targetingCriteria object Specifies the targeting criteria that the member should match.

Sample Request

The following shows a sample request forecasting the audience count for members living in North America and skill type “Engineering”.

Any URNs included in the parameters must be URL encoded. An unencoded sample request has also been provided for readability.

Unencoded Sample Request

GET https://api.linkedin.com/rest/audienceCounts?q=targetingCriteriaV2&targetingCriteria=(include:(and:List((or:(urn:li:adTargetingFacet:locations:List(urn:li:geo:102221843))),(or:(urn:li:adTargetingFacet:skills:List(urn:li:skill:17))))))
GET https://api.linkedin.com/v2/audienceCountsV2?q=targetingCriteriaV2&targetingCriteria=(include:(and:List((or:(urn:li:adTargetingFacet:locations:List(urn:li:geo:102221843))),(or:(urn:li:adTargetingFacet:skills:List(urn:li:skill:17))))))

Encoded Sample Request

GET https://api.linkedin.com/rest/audienceCounts?q=targetingCriteriaV2&targetingCriteria=(include:(and:List((or:(urn%3Ali%3AadTargetingFacet%3Alocations:List(urn%3Ali%3Ageo%3A102221843))),(or:(urn%3Ali%3AadTargetingFacet%3Askills:List(urn%3Ali%3Askill%3A17))))))
GET https://api.linkedin.com/v2/audienceCountsV2?q=targetingCriteriaV2&targetingCriteria=(include:(and:List((or:(urn%3Ali%3AadTargetingFacet%3Alocations:List(urn%3Ali%3Ageo%3A102221843))),(or:(urn%3Ali%3AadTargetingFacet%3Askills:List(urn%3Ali%3Askill%3A17))))))

Sample Response

The API returns a list of AudienceCount results based on targetingCriteria parameters.

{
    "elements": [
        {
            "active": 0,
            "total": 25312600
        }
    ],
    "paging": {
        "count": 10,
        "links": [],
        "start": 0
    }
}