Use responsive search ads to promote products on the
[Google Network](https://support.google.com/google-ads/answer/1752334). The main features of
[responsive search ads](https://support.google.com/google-ads/answer/7684791) are that they let you:

- Set three to 15 headlines and two to four descriptions that automatically rotate into the ad to determine which combinations perform best.
- Pin any headlines and descriptions you want so that they always appear in a designated position in the ad.
- Collect performance statistics on different combinations of headlines and descriptions so you can evaluate their effectiveness. The system automatically favors headline and description combinations that work well together.
- Display customized URLs by specifying `path1` and `path2`, which are appended to the end of your landing page domain to form the displayed URL.

## Format

Responsive search ads can display up to three headlines and up to two
descriptions at serve time, plus a customizable URL based on the landing page
domain and how you configure the `path1` and `path2` fields on your
[`ResponsiveSearchAdInfo`](https://developers.google.com/google-ads/api/reference/rpc/v26/ResponsiveSearchAdInfo) object.

Here's an example of what a responsive search ad looks like:

![Example of a responsive search ad format](https://developers.google.com/static/google-ads/api/images/responsive-search-ads.png)

Headlines and descriptions are configured as arrays of
[`AdTextAsset`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdTextAsset) message objects inside
[`ResponsiveSearchAdInfo`](https://developers.google.com/google-ads/api/reference/rpc/v26/ResponsiveSearchAdInfo).

### Pin assets to specific positions

Responsive search ads also support asset pinning. If you want finer control
than allowing the system to mix and match all headlines and descriptions, you
can pin headlines and descriptions to specific positions using the
[`pinned_field`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdTextAsset#pinned_field) property on [`AdTextAsset`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdTextAsset) (or
`pinnedField` in JSON requests). Valid
[`ServedAssetFieldType`](https://developers.google.com/google-ads/api/reference/rpc/v26/ServedAssetFieldTypeEnum.ServedAssetFieldType) values for
[`pinned_field`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdTextAsset#pinned_field) are:

- **Headlines** : [`HEADLINE_1`](https://developers.google.com/google-ads/api/reference/rpc/v26/ServedAssetFieldTypeEnum.ServedAssetFieldType#headline_1), [`HEADLINE_2`](https://developers.google.com/google-ads/api/reference/rpc/v26/ServedAssetFieldTypeEnum.ServedAssetFieldType#headline_2), or [`HEADLINE_3`](https://developers.google.com/google-ads/api/reference/rpc/v26/ServedAssetFieldTypeEnum.ServedAssetFieldType#headline_3)
- **Descriptions** : [`DESCRIPTION_1`](https://developers.google.com/google-ads/api/reference/rpc/v26/ServedAssetFieldTypeEnum.ServedAssetFieldType#description_1) or [`DESCRIPTION_2`](https://developers.google.com/google-ads/api/reference/rpc/v26/ServedAssetFieldTypeEnum.ServedAssetFieldType#description_2)

> [!NOTE]
> **Note:** Other [`ServedAssetFieldType`](https://developers.google.com/google-ads/api/reference/rpc/v26/ServedAssetFieldTypeEnum.ServedAssetFieldType) enum values (such as sitelink-served positions or `TEXT_DISCLAIMER`) are output-only for reporting and cannot be set on [`pinned_field`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdTextAsset#pinned_field) when creating or mutating an ad. Setting [`pinned_field`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdTextAsset#pinned_field) to an unsupported [`ServedAssetFieldType`](https://developers.google.com/google-ads/api/reference/rpc/v26/ServedAssetFieldTypeEnum.ServedAssetFieldType) value (such as `DESCRIPTION_1` on a headline, or output-only reporting values like `TEXT_DISCLAIMER`) fails with [`AssetLinkError.INVALID_PINNED_FIELD`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetLinkErrorEnum.AssetLinkError#invalid_pinned_field).

For example, if you want a specific headline to always appear first, set its
[`pinned_field`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdTextAsset#pinned_field) to
[`ServedAssetFieldType.HEADLINE_1`](https://developers.google.com/google-ads/api/reference/rpc/v26/ServedAssetFieldTypeEnum.ServedAssetFieldType#headline_1). Whenever that ad is served,
that specific text appears in the first headline position and the remaining
positions are drawn from the pool of unpinned assets. If more than one asset is
pinned to the same position, that position rotates text among the assets pinned
to it.

When pinning assets in `headlines` or `descriptions`, every position
(`HEADLINE_1`--`HEADLINE_3` for headlines; `DESCRIPTION_1`--`DESCRIPTION_2` for
descriptions) must be fillable either by an asset pinned to that position or by
a distinct unpinned asset. For example, pinning all three headlines in a
3-headline ad to `HEADLINE_1` leaves `HEADLINE_2` and `HEADLINE_3` without
eligible assets and fails with an [`AssetLinkError`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetLinkErrorEnum.AssetLinkError) of
[`NOT_ENOUGH_AVAILABLE_ASSET_LINKS_FOR_VALID_COMBINATION`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetLinkErrorEnum.AssetLinkError#not_enough_available_asset_links_for_valid_combination) (or
[`NOT_ENOUGH_AVAILABLE_ASSET_LINKS_WITH_FALLBACK_FOR_VALID_COMBINATION`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetLinkErrorEnum.AssetLinkError#not_enough_available_asset_links_with_fallback_for_valid_combination)
when using ad customizers without default fallback values).

See [Create responsive search ads](https://developers.google.com/google-ads/api/docs/responsive-search-ads/create-responsive-search-ads) for complete code examples.

### Text customization and automatically created assets

When you enable campaign-level text customization (called automatically created
assets in the API) on a Search campaign, Google Ads can automatically generate
additional headlines and descriptions from your landing page, domain, and ads
and keywords to serve alongside your advertiser-provided assets:

- To enable text customization on a Search campaign, set [`Campaign.ai_max_setting.enable_ai_max`](https://developers.google.com/google-ads/api/reference/rpc/v26/Campaign.AiMaxSetting#enable_ai_max) to `true` to enable [AI Max for Search campaigns](https://developers.google.com/google-ads/api/docs/campaigns/ai-max-for-search-campaigns/getting-started), and set [`TEXT_ASSET_AUTOMATION`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetAutomationTypeEnum.AssetAutomationType#text_asset_automation) to `OPTED_IN` in [`Campaign.asset_automation_settings`](https://developers.google.com/google-ads/api/reference/rpc/v26/Campaign#asset_automation_settings). Setting `enable_ai_max` to `true` alone only enables search term matching by default (`TEXT_ASSET_AUTOMATION` and [`FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetAutomationTypeEnum.AssetAutomationType#final_url_expansion_text_asset_automation) both default to `OPTED_OUT` for Search campaigns). Conversely, setting either automation type to `OPTED_IN` without `enable_ai_max` set to `true` fails with [`CampaignError.AI_MAX_MUST_BE_ENABLED`](https://developers.google.com/google-ads/api/reference/rpc/v26/CampaignErrorEnum.CampaignError#ai_max_must_be_enabled).
- You can enable [`TEXT_ASSET_AUTOMATION`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetAutomationTypeEnum.AssetAutomationType#text_asset_automation) while leaving [`FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetAutomationTypeEnum.AssetAutomationType#final_url_expansion_text_asset_automation) set to `OPTED_OUT`. However, setting [`FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetAutomationTypeEnum.AssetAutomationType#final_url_expansion_text_asset_automation) to `OPTED_IN` requires [`TEXT_ASSET_AUTOMATION`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetAutomationTypeEnum.AssetAutomationType#text_asset_automation) to also be set to `OPTED_IN`; opting in to [`FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetAutomationTypeEnum.AssetAutomationType#final_url_expansion_text_asset_automation) while [`TEXT_ASSET_AUTOMATION`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetAutomationTypeEnum.AssetAutomationType#text_asset_automation) is `OPTED_OUT` fails with [`ContextError.OPERATION_NOT_PERMITTED_FOR_CONTEXT`](https://developers.google.com/google-ads/api/reference/rpc/v26/ContextErrorEnum.ContextError#operation_not_permitted_for_context).
- You can configure campaign-level [`Campaign.text_guidelines`](https://developers.google.com/google-ads/api/reference/rpc/v26/Campaign#text_guidelines) ([`TextGuidelines`](https://developers.google.com/google-ads/api/reference/rpc/v26/Campaign.TextGuidelines)) to specify exact term exclusions (`term_exclusions`) and freeform messaging restrictions (`messaging_restrictions`) for automatically generated text assets in Search campaigns with AI Max for Search campaigns enabled.
- Because automatically created assets aren't returned in `ad_group_ad.ad.responsive_search_ad` and can't be removed using `AdService.MutateAds`, you can remove unwanted ad-level automatically created headlines and descriptions using [`AdGroupAdService.RemoveAutomaticallyCreatedAssets`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdGroupAdService/RemoveAutomaticallyCreatedAssets) (or remove campaign-level Final URL expansion text assets using [`RemoveCampaignAutomaticallyCreatedAsset`](https://developers.google.com/google-ads/api/reference/rpc/v26/AutomaticallyCreatedAssetRemovalService/RemoveCampaignAutomaticallyCreatedAsset) on [`AutomaticallyCreatedAssetRemovalService`](https://developers.google.com/google-ads/api/reference/rpc/v26/AutomaticallyCreatedAssetRemovalService)).
- You can query the read-only [`Campaign.aca_migration_date_time`](https://developers.google.com/google-ads/api/reference/rpc/v26/Campaign#aca_migration_date_time) field to check when a Search campaign using automatically created assets was migrated to AI Max for Search campaigns.

For configuration details, see
[Asset automation settings](https://developers.google.com/google-ads/api/docs/assets/asset-automation-settings) and
[Get started with AI Max for Search campaigns](https://developers.google.com/google-ads/api/docs/campaigns/ai-max-for-search-campaigns/getting-started). To distinguish between
advertiser-provided and automatically created assets in reports, see
[Retrieve responsive search ads](https://developers.google.com/google-ads/api/docs/responsive-search-ads/get-responsive-search-ads).

## Additional resources

To learn more about working with responsive search ads in the Google Ads API and
Google Ads, see the following guides and Help Center articles:

- [Create responsive search ads](https://developers.google.com/google-ads/api/docs/responsive-search-ads/create-responsive-search-ads)
- [Mutate ads](https://developers.google.com/google-ads/api/docs/responsive-search-ads/mutate-ads)
- [Customize responsive search ads](https://developers.google.com/google-ads/api/docs/responsive-search-ads/customize-responsive-search-ads)
- [Retrieve responsive search ads](https://developers.google.com/google-ads/api/docs/responsive-search-ads/get-responsive-search-ads)
- [About responsive search ads](https://support.google.com/google-ads/answer/7684791)
- [Create effective Search ads](https://support.google.com/google-ads/answer/6167122)