Lookalike Audience

Target people most like your established customers. Lookalike audiences take several sets of people as "seeds" then Facebook builds an audience of similar people. You can use lookalikes for any business objective: Targeting people similar your customers for fan acquisition, site registration, off-Facebook purchases, coupon claims, or simply to drive awareness of a brand.

Seed audiences can be:

Facebook refreshes members in a lookalike every 3-7 days if the lookalike belongs to an adgroup.

Create

Lookalike audiences can take 1-6 hours to fully populate. While audiences populate, you can create and run ad sets targeting the audience. Once the audience is ready, Facebook delivers to people populated in the audience and ads delivery will catchup and work as normal. See Delivery Status. Create a new lookalike audience at: https://graph.facebook.com/{API_VERSION}/act_{AD_ACCOUNT_ID}/customaudiences.

Example creation call for lookalike from a custom audience:

use FacebookAds\Object\CustomAudience;
use FacebookAds\Object\Fields\CustomAudienceFields;
use FacebookAds\Object\Values\CustomAudienceSubtypes;

$lookalike = new CustomAudience(null, 'act_<AD_ACCOUNT_ID>');
$lookalike->setData(array(
  CustomAudienceFields::NAME => 'My lookalike audience',
  CustomAudienceFields::SUBTYPE => CustomAudienceSubtypes::LOOKALIKE,
  CustomAudienceFields::ORIGIN_AUDIENCE_ID => <SEED_AUDIENCE_ID>,
  CustomAudienceFields::LOOKALIKE_SPEC => array(
    'type' => 'similarity',
    'country' => 'US',
  ),
));
$lookalike->create();
from facebookads.adobjects.adaccount import AdAccount
from facebookads.adobjects.customaudience import CustomAudience

ad_account = AdAccount(fbid='act_<AD_ACCOUNT_ID>')

params = {
    CustomAudience.Field.name: 'My lookalike audience',
    CustomAudience.Field.subtype: CustomAudience.Subtype.lookalike,
    CustomAudience.Field.origin_audience_id: '<SEED_AUDIENCE_ID>',
    CustomAudience.Field.lookalike_spec: {
        'type': 'similarity',
        'country': 'US',
    },
}
lookalike = ad_account.create_custom_audience(params=params)
curl \
  -F 'name=My lookalike audience' \
  -F 'subtype=LOOKALIKE' \
  -F 'origin_audience_id=<SEED_AUDIENCE_ID>' \
  -F 'lookalike_spec={"type":"similarity","country":"US"}' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.10/act_<AD_ACCOUNT_ID>/customaudiences

To create lookalike audiences with PHP Ads SDK or Python Ads SDK, use CustomAudience.

The response has this format:

name type description

id

integer

ID of lookalike audience

Custom Audience Lookalike

If you have a Custom Audience with at least 100 people, you can build lookalike audiences based on it. This includes Custom Audiences for your Website and Custom Audiences for your Mobile App.

Name Type Description Required

name

string

Custom Audience name

Yes

origin_audience_id

long

ID of Custom Audience. Origin audiences must have at least 100 members.

Yes

lookalike_spec

array

See below

Yes

lookalike_spec.type

string

similarity or reach

Yes. Set either type or ratio

lookalike_spec.starting_ratio

float

Start percentage for lookalike. For example, starting_ratio 0.01 and ratio 0.02 creates a lookalike from 1% to 2% of a lookalike segment. starting_ratio must be less than ratio

no

lookalike_spec.ratio

float

0.01-0.20 incremented by 0.01. Top x% of original audience in a selected country

Yes. Set either type or ratio.

lookalike_spec.allow_international_seeds

boolean

At least 100 seed audience members from a country. If not, allow_international_seeds set to true means Facebook finds this minimum number of audience members in another country. Default false.

no

lookalike_spec.country

string

Find lookalike audience members in this country

Yes. Either country or location_spec required.

lookalike_spec.location_spec

array

Find audience members in these locations. List of countries or country groups such as Asia

Yes. Either country or location_spec required.

lookalike_spec.location_spec.geo_locations

array

Include these locations

At least one entry under countries or country_groups.

lookalike_spec.location_spec.geo_locations.countries

array of strings

Target countries. Array of country codes, see Targeting Search API, Countries. Example: 'countries': ['US']

No

lookalike_spec.location_spec.geo_locations.country_groups

array of strings

Target countries in global regions and free trade areas. Array of country group codes. For full options, see Targeting, Location, country_groups and Targeting Search, country_groups. Example: 'country_groups': ['asia','mercosur']

No

lookalike_spec.location_spec.excluded_geo_locations

array

Locations to exclude

No

lookalike_spec.location_spec.excluded_geo_locations.countries

array of strings

Same as countries under geo_locations

No

lookalike_spec.location_spec.excluded_geo_locations.country_groups

array of strings

Same as country_groups under geo_locations

No

Types

Optimize your audience for "Similarity" or "Greater reach".

  • Similarity - Audience includes the top 1% of people in a selected country who are most similar to the seed Custom Audience. The new audience's reach is smaller, matching is more precise.
  • Greater Reach - Audience includes the top 5% of people in the selected country that are similar to the seed Custom Audience, but with a less precise match.

Instead of using types you can manually set ratio to represent the top x% of the audience in the selected country. ratio should be from 1%-20% and in intervals of 1%.

Campaign or Ad Set Conversion Lookalikes

Facebook has campaign and ad set conversion lookalikes to target people similar to those converting from previous or current campaigns or ad sets. We measure conversions based on a campaign or ad set type in Conversion Specs. For example target people that took action on your website or installed your app within 28 days of clicking your ad.

use FacebookAds\Object\CustomAudience;
use FacebookAds\Object\Fields\CustomAudienceFields;
use FacebookAds\Object\Values\CustomAudienceSubtypes;

$lookalike = new CustomAudience(null, 'act_<AD_ACCOUNT_ID>');
$lookalike->setData(array(
  CustomAudienceFields::SUBTYPE => CustomAudienceSubtypes::LOOKALIKE,
  CustomAudienceFields::LOOKALIKE_SPEC => array(
    'origin_ids' => <CAMPAIGN_ID>,
    'starting_ratio' => 0.03,
    'ratio' => 0.05,
    'conversion_type' => 'campaign_conversions',
    'country' => 'US',
  ),
));
$lookalike->create();
from facebookads.adobjects.adaccount import AdAccount
from facebookads.adobjects.customaudience import CustomAudience

ad_account = AdAccount(fbid='act_<AD_ACCOUNT_ID>')

params = {
    CustomAudience.Field.subtype: CustomAudience.Subtype.lookalike,
    CustomAudience.Field.lookalike_spec: {
        'origin_ids': '<CAMPAIGN_ID>',
        'starting_ratio': 0.03,
        'ratio': 0.05,
        'conversion_type': 'campaign_conversions',
        'country': 'US',
    },
}
lookalike = ad_account.create_custom_audience(params=params)
curl \
  -F 'subtype=LOOKALIKE' \
  -F 'lookalike_spec={ 
    "origin_ids": "<CAMPAIGN_ID>", 
    "starting_ratio": 0.03, 
    "ratio": 0.05, 
    "conversion_type": "campaign_conversions", 
    "country": "US" 
  }' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.10/act_<AD_ACCOUNT_ID>/customaudiences

You need at least 100 unique conversions from your campaigns or ad sets. More converters result in a better predictive model and we suggest 200 or more members who converted. You should also select campaigns or ad sets with similar objectives.

To create this lookalike, specify one or more of your campaigns or ad sets. For example, specify one campaign and two ad sets of another campaign.

Facebook uses up to 180 days of past conversion data and identifies people converting on your campaigns and ad sets as examples. We train prediction model then create a lookalike audience. Facebook constantly updates the underlying prediction model as campaigns or ad sets get new conversions.

Name Type Description Required

lookalike_spec

array

See below

Yes

lookalike_spec.origin_ids

array of integers

Array of ad object ids. People who convert on these ads are used to model a lookalike. One or more campaign IDs or ad set IDs, or a mix of them.

yes

lookalike_spec.conversion_type

string

campaign_conversions. Indicates audience is a campaign conversion lookalike

Yes

lookalike_spec.country

string

Country to find lookalike members.

yes

lookalike_spec.allow_international_seeds

boolean

At least 100 seed audience members from a country. If not, allow_international_seeds set to true means Facebook finds this minimum number of members in another country. Defaults to false.

no

lookalike_spec.starting_ratio

float

Start percentage for lookalike. For example, starting_ratio 0.01 and ratio 0.02 creates a lookalike from 1% to 2% of a lookalike segment. starting_ratio must be less than ratio

no

lookalike_spec.ratio

float

Range of 0.01-0.20. Top x% of original audience in the selected country.

Yes

Page Fan Lookalikes

Create a lookalike audience based on people who like your Page:

use FacebookAds\Object\CustomAudience;
use FacebookAds\Object\Fields\CustomAudienceFields;
use FacebookAds\Object\Values\CustomAudienceSubtypes;

$lookalike = new CustomAudience(null, 'act_<AD_ACCOUNT_ID>');
$lookalike->setData(array(
  CustomAudienceFields::SUBTYPE => CustomAudienceSubtypes::LOOKALIKE,
  CustomAudienceFields::LOOKALIKE_SPEC => array(
    'ratio' => 0.01,
    'country' => 'US',
    'page_id' => <PAGE_ID>,
    'conversion_type' => 'page_like',
  ),
));
$lookalike->create();
from facebookads.adobjects.adaccount import AdAccount
from facebookads.adobjects.customaudience import CustomAudience

ad_account = AdAccount(fbid='act_<AD_ACCOUNT_ID>')

params = {
    CustomAudience.Field.name: 'My lookalike audience',
    CustomAudience.Field.subtype: CustomAudience.Subtype.lookalike,
    CustomAudience.Field.lookalike_spec: {
        'ratio': 0.01,
        'country': 'US',
        'page_id': '<PAGE_ID>',
        'conversion_type': 'page_like',
    },
}
lookalike = ad_account.create_custom_audience(params=params)
curl \
  -F 'subtype=LOOKALIKE' \
  -F 'lookalike_spec={ 
    "ratio": 0.01, 
    "country": "US", 
    "page_id": "<PAGE_ID>", 
    "conversion_type": "page_like" 
  }' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.10/act_<AD_ACCOUNT_ID>/customaudiences
Name Type Description Required

lookalike_spec

array

See below

Yes

lookalike_spec.page_id

int

Facebook ID of the page whose fans will be used for the lookalike

Yes

lookalike_spec.conversion_type

string

page_like - Indicates that this is a page fan lookalike

Yes

lookalike_spec.country

string

The country to find the lookalike people. The default is 'US'

Yes

lookalike_spec.allow_international_seeds

boolean

You need at least 100 seed audience members from a country. If this minimum is not satisfied, allow_international_seeds set to true means Facebook finds this minimum number of seed audience members in another country. Defaults to false.

No

lookalike_spec.starting_ratio

float

Starting percentage of the lookalike. For example, a starting_ratio of 0.01 and a ratio of 0.02 would create a lookalike from the 1% to 2% lookalike segment. The value of starting_ratio should always be less than that of ratio

No

lookalike_spec.ratio

float

Range 0.01-0.20. How much of the country the lookalike should target.

Yes

Targeting

Targeting lookalikes is the same as targeting Custom Audiences. See Custom Audiences, Targeting. This also applies for exclusion targeting and conjunctive AND targeting. To target when you create an ad:

use FacebookAds\Object\AdSet;
use FacebookAds\Object\Fields\AdSetFields;
use FacebookAds\Object\Values\AdSetBillingEventValues;
use FacebookAds\Object\Values\AdSetOptimizationGoalValues;
use FacebookAds\Object\Fields\TargetingFields;
use FacebookAds\Object\Targeting;

$adset = new AdSet(null, 'act_<AD_ACCOUNT_ID>');
$adset->setData(array(
  AdSetFields::NAME => 'My AdSet',
  AdSetFields::OPTIMIZATION_GOAL => AdSetOptimizationGoalValues::REACH,
  AdSetFields::BILLING_EVENT => AdSetBillingEventValues::IMPRESSIONS,
  AdSetFields::BID_AMOUNT => 2,
  AdSetFields::DAILY_BUDGET => 1000,
  AdSetFields::CAMPAIGN_ID => <CAMPAIGN_ID>,
  AdSetFields::TARGETING => (new Targeting())->setData(array(
    TargetingFields::GEO_LOCATIONS => array(
      'countries' => array('US'),
    ),
    TargetingFields::CUSTOM_AUDIENCES => array(
      array(
        'id' => <LOOKALIKE_AUDIENCE_ID>,
      ),
    ),
  )),
));

$adset->create(array(
  AdSet::STATUS_PARAM_NAME => AdSet::STATUS_ACTIVE,
));
from facebookads.adobjects.adaccount import AdAccount
from facebookads.adobjects.adset import AdSet

ad_account = AdAccount(fbid='act_<AD_ACCOUNT_ID>')

params = {
    AdSet.Field.name: 'My Adset',
    AdSet.Field.daily_budget: 10000,
    AdSet.Field.campaign_id: '<CAMPAIGN_ID>',
    AdSet.Field.optimization_goal: AdSet.OptimizationGoal.link_clicks,
    AdSet.Field.billing_event: AdSet.BillingEvent.link_clicks,
    AdSet.Field.bid_amount: 150,
    AdSet.Field.daily_budget: 2000,
    AdSet.Field.targeting: {
        'geo_locations': {
            'countries': ['US'],
        },
        'custom_audiences': [
            {
                'id': <LOOKALIKE_AUDIENCE_ID>,
            },
        ],
    },
    AdSet.Field.status: AdSet.Status.active,
}
adset = ad_account.create_ad_set(params=params)
AdSet adSet = new AdAccount(act_<AD_ACCOUNT_ID>, context).createAdSet()
  .setName("My AdSet")
  .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_REACH)
  .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS)
  .setBidAmount(2L)
  .setDailyBudget(1000L)
  .setCampaignId(<CAMPAIGN_ID>)
  .setTargeting(
    new Targeting()
      .setFieldCustomAudiences(Arrays.asList(
        new IDName()
          .setFieldId(<LOOKALIKE_AUDIENCE_ID>)
      ))
      .setFieldGeoLocations(
        new TargetingGeoLocation()
          .setFieldCountries(Arrays.asList("US"))
      )
  )
  .setStatus(AdSet.EnumStatus.VALUE_ACTIVE)
  .execute();
String ad_set_id = adSet.getId();
curl \
  -F 'name=My AdSet' \
  -F 'optimization_goal=REACH' \
  -F 'billing_event=IMPRESSIONS' \
  -F 'bid_amount=2' \
  -F 'daily_budget=1000' \
  -F 'campaign_id=<CAMPAIGN_ID>' \
  -F 'targeting={ 
    "custom_audiences": [{"id":"<LOOKALIKE_AUDIENCE_ID>"}], 
    "geo_locations": {"countries":["US"]} 
  }' \
  -F 'status=ACTIVE' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.10/act_<AD_ACCOUNT_ID>/adsets

More examples at Targeting Specs.

Managing Audiences

Get details on custom audiences used to create lookalikes as well as lookalikes. We return the same fields as Custom Audiences. Below is a sample response for a Custom Audience used to create lookalikes. lookalike_audience_ids specifies which lookalike audiences were generated from this audience.

 {
  "id": "6006164557194",
  "account_id": 12345,
  "approximate_count": 816400,
  "lookalike_audience_ids": [
    6006183285954,
    6006183285955
  ],
  "name": "Boys Apparel",
  "parent_audience_id": 0,
  "parent_category": "Custom",
  "status": "ready",
  "subtype": "CUSTOM",
  "type": 4,
  "type_name": "Advertiser Generated",
  "time_updated": 1362439491
}, 

Lookalike audiences contain a subtype of 2. We also return lookalike_spec, an array in this format:

Name Type Description

type

string

similarity, reach or custom_ratio - Always returned

starting_ratio

float

Returned if starting_ratio specified

ratio

float

Multiple of 0.01. Returned if type is custom_ratio

country

string

Country code

origin

array

See below

origin.deleted

boolean

true, Returned when the origin deleted

origin.id

int

Origin ID

origin.name

string

Origin name

origin.type

string

custom_audience, conversion_pixel, page or app

target_countries

array of strings

All countries used to create audience

Another audience below where subtype is LOOKALIKE:

{
 "id": "6006183285954",
 "account_id": 12345,
 "approximate_count": 1782100,
 "name": "Boys Apparel_lookalike_US_Similarity",
 "origin_audience_id": 6006567610735,
 "parent_audience_id": 0,
 "parent_category": "Custom",
 "status": "ready",
 "subtype": "LOOKALIKE",
 "type": 4,
 "type_name": "Advertiser Generated",
 "time_updated": 1362506552
},  

Delivery Status

After you create a lookalike audience we return a Custom Audience ID. It can take about one hour to fully populate an audience. You can get the status at: /{lookalike_audience_ID}?fields=delivery_status. This returns a JSON response with delivery_status or code 200 if an audience populates:

"delivery_status": {
  "code": 200, 
  "description": "This audience is ready for use."
},

For testing, you should ceck the status of the list with Ads Manager.

To delete a lookalike audience, you do the same as you do for Custom Audiences.

Best Practices

  • Seed Custom Audience - Make it as large as possible so we have enough data to find similar people.
  • Combine Lookalikes - With other Facebook's targeting for additional demographics or interests.
  • If your seed audience has attributes such as gender or geography, the lookalikes generate may not adhere to those attributes.