## Lookalike segments

Demand Gen campaigns can use
[Lookalike segments](https://support.google.com/google-ads/answer/13541369)
to find customers who are similar to your existing customers, allowing you to
target new and relevant audiences. You can create Lookalike segments based on
specific interactions people have had with your business, like watching a video
or visiting a specific page on your website. Lookalike segments are
automatically refreshed every 1-2 days based on your available customer data.

To use Lookalike segments, you need to:

1. Create at least one `UserList`.
2. Set the expansion_level to `NARROW`, `BALANCED`, or `BROAD` to configure the size of the lookalike segment. Find details on each level in the [Help Center](https://support.google.com/google-ads/answer/13541369#how_lookalike_segments_work).
3. Select countries to target by setting country_codes in [`LookalikeUserListInfo`](https://developers.google.com/google-ads/api/reference/rpc/v26/LookalikeUserListInfo) to a list of ISO 3166-1 alpha-2 country codes.
4. Add a minimum of 100 active matched people across all seed lists.

Start with a [`UserListOperation`](https://developers.google.com/google-ads/api/reference/rpc/v26/UserListOperation):

    const userListOperation = {
      "userListOperation": {
        "create": {
          "resourceName": `customers/${customerId}/userLists/${getNextTempId()}`,
          "type": "LOOKALIKE",
          "name": "Demand Gen Lookalike audience",
          "lookalikeUserList": {
            "expansionLevel": "BALANCED",
            "countryCodes": [
              "US", "UM"
            ],
            "seedUserListIds": [
              1, 2, 3, 4, 5, 6, 7, 8, 9, ...
            ]
          }
        }
      }
    }
    operations.push(userListOperation);