Ad customizers are a powerful tool that lets you customize the text content
of your [responsive search ads](https://support.google.com/google-ads/answer/7684791)
using dynamic text placeholders.

> [!IMPORTANT]
> **Key Point:** Dynamic replacements can occur in headlines and description lines, but not in display or final URLs.

You can create and use an ad customizer or use a built-in ad customizer.

## Create and use an ad customizer

Follow these steps to create an ad customizer for RSAs:

1. Create the customizer attribute.

   The customizer attribute is a broad category that describes the kind of
   change you intend to link to this customizer---for example, "product
   price" or "discount percent".
2. Link the customizer attribute with a customer, campaign, ad group, or
   keyword ad group criterion.

   Set the specific values you want to use for the specific resource.

### Create a customizer attribute

First, you need to create a new customizer attribute, represented by
[`CustomizerAttribute`](https://developers.google.com/google-ads/api/reference/rpc/v26/CustomizerAttribute) using
[`CustomizerAttributeService`](https://developers.google.com/google-ads/api/reference/rpc/v26/CustomizerAttributeService) with
two required fields:

[`name`](https://developers.google.com/google-ads/api/reference/rpc/v26/CustomizerAttribute#name)
:   The name of the customizer, which must be unique (case insensitive). Since
    there is a limit of 40 customizers, you might need to reuse customizers
    across different resources, so be sure to choose a name that represents a
    broad category of what kind of customizations this will be used for.

[`type`](https://developers.google.com/google-ads/api/reference/rpc/v26/CustomizerAttribute#type)
:   The type of the customizer---text, number, price or percent---defined
    by [`CustomizerAttributeType`](https://developers.google.com/google-ads/api/reference/rpc/v26/CustomizerAttributeTypeEnum.CustomizerAttributeType).

When you create a new customizer attribute, you get its resource name back,
which is required in the next step.

### Link the customizer attribute

You can link the previously created customizer attribute at many levels using
the following services:

- [`CustomerCustomizerService`](https://developers.google.com/google-ads/api/reference/rpc/v26/CustomerCustomizerService) to
  create [`CustomerCustomizer`](https://developers.google.com/google-ads/api/reference/rpc/v26/CustomerCustomizer) for the
  customer level.

- [`CampaignCustomizerService`](https://developers.google.com/google-ads/api/reference/rpc/v26/CampaignCustomizerService) to
  create [`CampaignCustomizer`](https://developers.google.com/google-ads/api/reference/rpc/v26/CampaignCustomizer) for the
  campaign level.

- [`AdGroupCustomizerService`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdGroupCustomizerService) to
  create [`AdGroupCustomizer`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdGroupCustomizer) for the ad
  group level.

- [`AdGroupCriterionCustomizerService`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdGroupCriterionCustomizerService)
  to create
  [`AdGroupCriterionCustomizer`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdGroupCriterionCustomizer) for
  the ad group criterion level. For this type, only keyword criteria are
  supported.

Regardless of which level you want and which corresponding service you use, the
same pieces of information are required:

`customizer_attribute`
:   The resource name of the customizer attribute that you created in the
    previous step.

`value`

:   The value that you want to insert into your ads when you reference this
    customizer attribute. This field is defined by
    [`CustomizerValue`](https://developers.google.com/google-ads/api/reference/rpc/v26/CustomizerValue).

    You need to specify [`type`](https://developers.google.com/google-ads/api/reference/rpc/v26/CustomizerValue#type) and
    [`string_value`](https://developers.google.com/google-ads/api/reference/rpc/v26/CustomizerValue#string_value) to create
    `CustomizerValue`. The `type` value should be the same as the customizer
    attribute you're linking, and `string_value` is the value that you want the
    Google Ads API to use.

Resource name of the resource you want to link the customizer attribute to

:   The name varies based on the resource type. For example, to create
    [`CampaignCustomizer`](https://developers.google.com/google-ads/api/reference/rpc/v26/CampaignCustomizer), specify the
    [`campaign`](https://developers.google.com/google-ads/api/reference/rpc/v26/CampaignCustomizer#campaign).

Once you finish this step, you're ready to use the ad customizer in responsive
search ads that are included in the resource hierarchy you linked the
customizer attribute to. For example, if you link the customizer attribute to
the campaign with an ID `A`, you can use that ad customizer in an ad created
under any ad groups inside campaign `A`. You cannot use the ad customizer in an
ad under ad groups inside campaign `B`.

## Ad customizers in responsive search ads

To use the ad customizer in **headlines** and **descriptions** of the responsive
search ads, you need to create an [`AdTextAsset`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdTextAsset)
object with `text` including the following syntax:

```
{CUSTOMIZER.CUSTOMIZER_ATTRIBUTE_NAME:DEFAULT_VALUE}
```

- `CUSTOMIZER_ATTRIBUTE_NAME` is the `name` of the customizer attribute that
  you set when you [created it](https://developers.google.com/google-ads/api/docs/responsive-search-ads/customize-responsive-search-ads#create), **not the resource name of the
  customizer attribute nor its ID**.

- `DEFAULT_VALUE` is the default value for the ad customizer.

Refer to the [responsive search ads
guide](https://developers.google.com/google-ads/api/docs/responsive-search-ads/overview) for more information about
setting up the ads.

## Rules and limitations

> [!NOTE]
> **Note:** For general information about limits, see [About your Google Ads account limits](https://support.google.com/google-ads/answer/6372658).

- There can only be one link per level---customer, campaign, ad group, or ad
  group criterion---and the most specific one will override the more general
  one. For example, if you have this customizer attribute defined at the
  campaign level and the ad group level, then ads within the linked ad group
  will use the ad group one, but ads from other ad groups in that campaign will
  use the campaign one.

- You can have up to **40** enabled `CustomizerAttribute` objects in your
  account. If you reach this limit, you need to remove the unused ones before
  creating a new one.

- There are rules for customizer attributes with type [`PRICE`](https://developers.google.com/google-ads/api/reference/rpc/v26/CustomizerAttributeTypeEnum.CustomizerAttributeType#price):

  - Currency codes and symbols can appear before or after the number. For example, `$100`, `100$`, `USD100`, `100USD` are all valid values.
  - There should be no spaces between the number and the currency codes or symbols. For example, `$ 100` is invalid.
  - See the [currency codes and
    symbols](https://developers.google.com/google-ads/api/data/codes-formats#currency_codes) that can be used as part of the [specified
    value](https://developers.google.com/google-ads/api/reference/rpc/v26/CustomizerValue#string_value).
- Dynamic text replacements (including default values) must fit within the
  character limits of headlines (30 characters) and descriptions (90
  characters). If the dynamically inserted value exceeds the character limit or
  fails to validate, the specified default value will be used as a fallback,
  provided the default value itself fits within the character limits.

## Use built-in ad customizers

You can use built-in customizer tags directly within your Responsive Search Ad
(RSA) headlines and descriptions. These tags allow you to dynamically insert
keywords, locations, and countdowns into your ad text.

### Keyword insertion

Keyword insertion dynamically updates your ad text to include the keyword that
caused your ad to show. This can make your ads more relevant to users' searches.

See [Set up keyword insertion for your ad text](https://support.google.com/google-ads/answer/6371157).

#### Syntax: `{Keyword:Default text}`

Include this tag in your headline or description fields when you create or
update an `AdGroupAd` with a `ResponsiveSearchAd` type using the API.

#### Example

Suppose you have a headline like "Buy `{Keyword:Chocolate}` Online".
If the user searches for "dark chocolate", the headline could appear as:
"Buy Dark Chocolate Online". If the keyword cannot be inserted, the
"Default text" ("Chocolate" in this case) will be used instead.

See [About keyword insertion](https://support.google.com/google-ads/answer/2454041).

### Location insertion

Tailor your ad text based on where your customers are located or the locations
they show interest in.

#### Syntax: `{LOCATION(Level):Default text}`

- `Level`: Specify the geographic level, such as `City`, `State`, or `Country`. If omitted, it defaults to the most specific level available.

#### Example

Headline: "Pizza Delivery in `{LOCATION(City):Your Area}`"

If a user is in New York City, they might see: "Pizza Delivery in New York City"
Users outside a specific area would see: "Pizza Delivery in Your Area"

See [About location insertion for responsive search ads](https://support.google.com/google-ads/answer/9773001).

### Countdown functions

Create a sense of urgency by showing a real-time countdown to a specific event
or sale.

#### Syntax

- `{COUNTDOWN(yyyy-MM-dd HH:mm:ss,daysBefore)}` - Counts down to a specific time in the advertiser's account timezone.
- `{GLOBAL_COUNTDOWN(yyyy-MM-dd HH:mm:ss,daysBefore)}` - Counts down to a specific time in the user's timezone.
- `daysBefore`: How many days before the end date the countdown should start appearing.

#### Example

Headline: "Sale Ends in `{COUNTDOWN(2027-01-31 23:59:59,5)}`"

This ad will show a countdown starting 5 days before
January 31st, 2027, 23:59:59 in the advertiser's timezone.

See [Highlight upcoming events with countdowns](https://support.google.com/google-ads/answer/6193743).

### Implementation using the API

To use these built-in customizers, include the tag syntax within the `text`
fields of the `AdTextAsset` objects for your RSA's `headlines` and
`descriptions` when mutating an `AdGroupAd` resource.

> [!NOTE]
> **Note:** Field names in REST JSON requests use `camelCase`, whereas client library objects use `snake_case`.

#### Example snippet (conceptual JSON)

    {
      "ad": {
        "responsiveSearchAd": {
          "headlines": [
            { "text": "Great Deals on {Keyword:Shoes}" },
            { "text": "Free Shipping in {LOCATION(City):Your City}" },
            { "text": "Offer Ends: {COUNTDOWN(2027-01-31 23:59:59,5)}" }
          ],
          "descriptions": [
            { "text": "Find the best {Keyword:footwear} for your needs." },
            { "text": "Limited time offer, don't miss out!" }
          ]
        },
        "finalUrls": ["https://www.example.com"]
      }
    }