DMP Segment Lookalike

Warning

Deprecation Notice
The unversioned APIs are going to 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.

Try in Postman

DMP Segment lookalike is typically useful for advertisers who want to increase their reach. Based on an existing audience segment, advertisers can expand the group of audience leveraging DMP Segment lookalike. DMP Segment lookalike takes in an existing adSegment as a seed and figures out an audience similar to the seed audience. The process may take up to 48 hours. After that, the resulting adSegment can be used for targeting within LinkedIn ad campaigns.

Permissions

Permission Description
rw_ads Manage and read an authenticated member's ad accounts data
rw_dmp_segments Access an authenticated member's DMP Segments. Can manage and read audience DMP Segments. This permission belongs to the Audiences program and is not granted automatically as part of the LinkedIn Marketing API Program.

Prerequisites

You will need a DMP Segment (or an adSegment for website retargeting case) in READY or UPDATING status with at least 200 audience count to be used as a seed. All API requests are represented in protocol 2.0.0 and require the header X-Restli-Protocol-Version: 2.0.0.

Steps

  1. Create Lookalike DMP Segment
  2. Attach a seed segment to generate a Lookalike
  3. Monitor status of DMP Segment
  4. Update Campaign Targeting with a Lookalike AdSegment
  5. Retrieving Seed Segments for Lookalike Segments

Create Lookalike DMP Segment

Assuming we already have a seed DMP Segment with ID 10000. This DMP Segment may have an audience size of 200, which is less than the minimum requirement of 300, and thus cannot be used in any campaign targeting directly. You may create a lookalike segment to expand the audience.

In order to accept a segment as a seed, a separate DMP Segment must be created with a specific sourcePlatform field called LINKEDIN_LOOKALIKE_SEGMENTS. The type of DMP Segment is by default USER since the algorithm is based on user similarities.

Similar to DMP List Uploads, DMP Segments where sourcePlatform=LINKEDIN_LOOKALIKE_SEGMENTS cannot be used to add or remove users dynamically.

Sample Request

POST https://api.linkedin.com/rest/dmpSegments
{
    "accessPolicy": "PRIVATE",
    "account": "urn:li:sponsoredAccount:10000000",
    "destinations": [
        {
            "destination": "LINKEDIN"
        }
    ],
    "name": "DMP Lookalike Segment of 10000",
    "sourcePlatform": "LINKEDIN_LOOKALIKE_SEGMENTS"
}
POST https://api.linkedin.com/v2/dmpSegments
{
    "accessPolicy": "PRIVATE",
    "account": "urn:li:sponsoredAccount:10000000",
    "destinations": [
        {
            "destination": "LINKEDIN"
        }
    ],
    "name": "DMP Lookalike Segment of 10000",
    "sourcePlatform": "LINKEDIN_LOOKALIKE_SEGMENTS"
}

Sample Response

A successful response returns a 201 Created HTTP status code and the segment ID in the x-restli-id response header.

HTTP/2 201
content-length: 0
etag: W/"1"
location: /dmpSegments/20000
x-restli-id: 20000

Attach a Seed Segment to Generate a Lookalike

With the DMP Segment ID got from the previous step, 20000, now you can further create a DMP lookalike. It's only possible to attach one seed segment to a lookalike segment.

Sample Request

You can create a DMP lookalike based on another DMP Segment or an ad segment of RETARGETING type.

The example below creates a DMP lookalike using another DMP Segment where the ID is 10000.

POST https://api.linkedin.com/rest/dmpSegments/20000/lookalikes
    { "seed": { "dmpSegmentUrn": "urn:li:dmpSegment:10000" } }
POST https://api.linkedin.com/v2/dmpSegments/20000/lookalikes
    { "seed": { "dmpSegmentUrn": "urn:li:dmpSegment:10000" } }

The example below creates a DMP lookalike using a retargeting segment where the AdPageSet ID is 10001. The AdPageSet ID is returned when a website targeting segment is created.

POST https://api.linkedin.com/rest/dmpSegments/20000/lookalikes
    { "seed": { "adPageSetUrn": "urn:li:adPageSet:10001" } }
POST https://api.linkedin.com/v2/dmpSegments/20000/lookalikes
    { "seed": { "adPageSetUrn": "urn:li:adPageSet:10001" } }

Note that here the value is not an ad segment ID. It's an AdPageSet ID you got when a website targeting segment gets created. Please refer to Create Ad Page Set for more.

Sample Response

A successful response returns a 201 Created HTTP status code and the DMP lookalike ID in the x-restli-id response header. In the sample response below, we have a DMP lookalike ID of 11000.

HTTP/2 201
content-length: 0
etag: W/"1"
location: /dmpSegments/20000/lookalikes/11000
x-restli-id: 11000
x-restli-protocol-version: 2.0.0

Monitor status of DMP Segment

It takes up to 48 hours for a DMP lookalike segment to move from BUILDING to READY state. Use GET /dmpSegments to check its status. When the DMP Segment status is READY, the destinationSegmentId under destinations contains the target adSegment URN.

Sample Request

Check the DMP lookalike segment 20000 created in step 1.

GET https://api.linkedin.com/rest/dmpSegments/20000
GET https://api.linkedin.com/v2/dmpSegments/20000

Sample Response

{
    "accessPolicy": "PRIVATE",
    "account": "urn:li:sponsoredAccount:10000000",
    "created": 1536351127000,
    "destinations": [
        {
            "audienceSize": 10000,
            "created": 1536351127000,
            "destination": "LINKEDIN",
            "destinationSegmentId": "urn:li:adSegment:30000",
            "lastModified": 1536976381000,
            "status": "READY"
        }
    ],
    "id": 20000,
    "lastModified": 1536976381000,
    "name": "DMP Lookalike Segment of 10000",
    "sourcePlatform": "LINKEDIN_LOOKALIKE_SEGMENTS",
    "type": "USER"
}

In the response, you will be able to find the ad segment ID, 30000, in destinationSegmentId field. The ad segment ID can be used in the next step in a campaign.

Update Campaign Targeting with a Lookalike AdSegment

When a DMP Segment is in READY state, the adSegment URN is available for targeting. You can now use the segment in addition to other targeting criteria to run a campaign.

Sample Request

The following request updates an existing campaign with the new ad segment 30000. You will need to replace {campaign ID} with the ID of your campaign.

POST https://api.linkedin.com/rest/adAccounts/{adAccountId}/adCampaigns/{campaign ID}
{
 "patch":{
  "$set":{
   "targetingCriteria":{
    "include":{
     "and":[
      {
       "or":{
        "urn:li:adTargetingFacet:audienceMatchingSegments":[
         "urn:li:adSegment:30000"
        ]
       }
      },
      {
       "or":{
        "urn:li:adTargetingFacet:locations":[
         "urn:li:geo:103644278"
        ]
       }
      }
     ]
    }
   }
  }
 }
}
POST https://api.linkedin.com/rest/adCampaigns/{campaign ID}
{
 "patch":{
  "$set":{
   "targetingCriteria":{
    "include":{
     "and":[
      {
       "or":{
        "urn:li:adTargetingFacet:audienceMatchingSegments":[
         "urn:li:adSegment:30000"
        ]
       }
      },
      {
       "or":{
        "urn:li:adTargetingFacet:locations":[
         "urn:li:geo:103644278"
        ]
       }
      }
     ]
    }
   }
  }
 }
}
POST https://api.linkedin.com/v2/adCampaignsV2/{campaign ID}
{
 "patch":{
  "$set":{
   "targetingCriteria":{
    "include":{
     "and":[
      {
       "or":{
        "urn:li:adTargetingFacet:audienceMatchingSegments":[
         "urn:li:adSegment:30000"
        ]
       }
      },
      {
       "or":{
        "urn:li:adTargetingFacet:locations":[
         "urn:li:geo:103644278"
        ]
       }
      }
     ]
    }
   }
  }
 }
}

Retrieving Seed Segments for Lookalike Segments

If a lookalike segment exists, it's possible to retrieve its seed segment by calling the following API. The response returns the following fields.

Schema

Field Name Type Description
seedSourcePlatform DMPSourcePlatform The DMP source platform of the seed. Auto-populated when creating the DMP lookalike based on the seed.
seed Urn The seed type and ID used to create the DMP lookalike.
dmpSegmentId long The DMP Segment ID this DMP lookalike belongs to.
created, lastModified long Creation timestamp and last updated timestamp.
id long The DMP lookalike id.
account Urn The sponsored account that owns this DMP lookalike.

Sample Request

Assuming that we are retrieving the DMP lookalike of DMP Segment 20000 with a GET_ALL request.

GET https://api.linkedin.com/rest/dmpSegments/20000/lookalikes
GET https://api.linkedin.com/v2/dmpSegments/20000/lookalikes

Sample Response

{
    "elements": [
        {
            "seedSourcePlatform": "LINKEDIN_WEBSITE_RETARGETING",
            "seed": {
                "adPageSetUrn": "urn:li:adPageSet:10000"
            },
            "dmpSegmentId": 20000,
            "created": 1560966035000,
            "versionTag": "1",
            "lastModified": 1568630209216,
            "id": 11000,
            "account": "urn:li:sponsoredAccount:10000000"
        }
    ],
    "paging": {
        "count": 10,
        "start": 0,
        "links": []
    }
}