Graph API Version

Lookalike Spec

Reading

Lookalike spec and origin

Example

Graph API Explorer
GET v5.0/...?fields={fieldname_of_type_LookalikeSpec} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '...?fields={fieldname_of_type_LookalikeSpec}',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "...?fields={fieldname_of_type_LookalikeSpec}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "...?fields={fieldname_of_type_LookalikeSpec}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"...?fields={fieldname_of_type_LookalikeSpec}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Fields

FieldDescription
country
string

Two letter country code. The country to find the lookalikes in.

is_financial_service
bool

Is this lookalike used in financial service

origin
list<IDNameType>

The ID of origin Custom Audience. The origin audience you create must have a minimum size of 100.

origin_event_name
string

The name of the origin event for value based LAL

origin_event_source_name
string

The name of the origin event source. For example, for a product catalog based lookalike, this field will be the product catalog's name.

origin_event_source_type
string

The type of the origin event sources for value based LAL

product_set_name
string

The name of the product set that is used to create the lookalike. This field only exists for a product catalog based lookalike.

ratio
float

Range 0.01-0.20. Indicates the top x% of original audience in the selected country. The default value is 0.01 which is 1%.

starting_ratio
float

Used for tiered lookalikes

target_countries
list<string>

Two letter country codes. The countries to find the lookalikes in.

target_country_names
list

Country names of corresponding two letter country code for each country used to find the lookalikes in

type
string

Type of the lookalike audience: similarity or reach

Creating

You can't perform this operation on this endpoint.

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.