(Translated by https://www.hiragana.jp/)
Google Ads Developer Blog: google_ads_scripts

What’s changing?

As announced last year, Google will stop serving political advertising in the European Union ahead of a new regulation taking effect in October 2025. On September 3, 2025, the Google Ads API and Google Ads scripts will roll out enforcements related to this change. If you use either of these products to create or manage campaigns, you may need to update your application to handle these enforcements before September 3, 2025.

What’s changing?

As announced last year, Google will stop serving political advertising in the European Union ahead of a new regulation taking effect in October 2025. On September 3, 2025, the Google Ads API and Google Ads scripts will roll out enforcements related to this change. If you use either of these products to create or manage campaigns, you may need to update your application to handle these enforcements before September 3, 2025.

API support for self-declaration of EU political ads

Google Ads API and Google Ads scripts have added support for self-declaration as to whether a campaign has EU political ads. Learn how an EU political ad is defined here. Versions v19.2, v20.1, and v21 of the API contain a new field named contains_eu_political_advertising in the Campaign object. The possible values and their meaning are shown in the table below.
Value Meaning
CONTAINS_EU_POLITICAL_ADVERTISING The campaign has EU political ads.
DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING The campaign does not have EU political ads.
UNSPECIFIED The campaign is missing self-declaration about EU political ads.

You can retrieve the self-declaration status of a campaign in Google Ads API by running the following query using either the Search or SearchStream methods of the GoogleAdsService. For Google Ads Scripts, use the AdsApp.search or AdsApp.report methods.

select campaign.id, campaign.contains_eu_political_advertising from campaign

If you use the Google Ads API client libraries, you may need to download the latest library version to use this functionality in versions v19 and v20 of the API.

API validation & enforcement changes

On September 3, 2025, Google Ads API and Google Ads scripts will start enforcing the following checks in versions v19 and v20 of the API.

These checks are already enforced in version v21 of the Google Ads API.

How will this affect my campaign serving?

Any campaign that has declared EU political ads by setting contains_eu_political_advertising to true will stop serving ads in the EU on September 22, 2025. Refer to our Help Center to learn more.

Existing campaigns without a declaration will remain unaffected for now. We recommend updating the existing campaigns in your accounts with an appropriate declaration as soon as possible. You can retrieve campaigns without a declaration using the following GAQL query using either the Search or SearchStream methods of the GoogleAdsService.

select campaign.id, campaign.contains_eu_political_advertising
  from
    campaign
  where 
    campaign.contains_eu_political_advertising NOT IN
    (
       'CONTAINS_EU_POLITICAL_ADVERTISING',
       'DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING'
    )

What do I need to do?

If your application uses either Google Ads API or Google Ads scripts to create or manage campaigns, make sure to update your application to handle these enforcements before September 3, 2025.

How do I get help?

Reach out to the Google Ads API support or Google Ads scripts support channels if you have more questions about this change.

We’re launching our new “Google Advertising and Measurement Community” Discord server! To join, just click this invite link and follow the onboarding guide.

The current products available on this server are Analytics, Google Ads, Google AdMob, and Google Ad Manager.

We’re launching our new “Google Advertising and Measurement Community” Discord server! To join, just click this invite link and follow the onboarding guide.

The current products available on this server are Analytics, Google Ads, Google AdMob, and Google Ad Manager.

The Ads Developer Relations team will be on this server regularly to discuss your feedback or questions using Google’s Advertising and Analytics APIs/SDKs, as well as to let you know what’s new with our products.

We’ll be hosting a “Meet the Team” in August, where we’ll go over who we are, and how you can expect to engage with us in Discord. Stay tuned as we add other events, and more channels.

Looking forward to chatting with you on Discord!

Starting July 14, 2025, Google Ads scripts will begin to throw errors for requests related to ad customizers for expanded text ads and feed-based legacy ad extensions.

Ad customizer changes

Starting July 14, 2025, Google Ads scripts will begin to throw errors for requests related to ad customizers for expanded text ads and feed-based legacy ad extensions.

Ad customizer changes

Any requests related to Ad Customizer entities, such as AdsApp.AdCustomizerSource or AdsApp.newAdCustomizerSourceBuilder, will begin to return sunset errors. These entities have been read-only since deprecation in 2022 and haven’t been served on any ads since May 2024. They were also fully removed from the Google Ads API in the v19 release.

Ad extension changes

Feed-based Ad Extensions were sunset in 2022 in favor of asset-based extensions. Users were asked to migrate, or were migrated automatically, but were able to access legacy functionality through the withOnlyLegacy() methods on various selectors. The withOnlyUpgraded() method was added to allow users to only use upgraded asset-based extensions. Starting July 14, 2025, the legacy functionality will be removed, and withOnlyLegacy() methods will begin to throw a sunset error. The withOnlyUpgraded() methods will log a warning, since it will no longer be necessary to specify the use of asset-based extensions when they are the only option.

If you have any questions, ask them in the Google Ads scripts forum. We're here to help!

As of v17 of the Google Ads API, recommendations of type LOWER_TARGET_ROAS have included a current_average_target_micros as a whole currency value instead of a micros value (where one million is equivalent to one currency unit) as indicated by the field name. On April 23, 2025, we are rolling out a fix to populate current_average_target_micros with the micros value.

As of v17 of the Google Ads API, recommendations of type LOWER_TARGET_ROAS have included a current_average_target_micros as a whole currency value instead of a micros value (where one million is equivalent to one currency unit) as indicated by the field name. On April 23, 2025, we are rolling out a fix to populate current_average_target_micros with the micros value.

Note that as a result of the incorrect unit, the currently returned current_average_target_micros value is truncated and is therefore less precise than the micros equivalent. If you were converting the existing value to micros by multiplying by 1,000,000, the resulting value wouldn't necessarily be correct because any digits past the first position are dropped. For example, a current_average_target_micros value of 5 might have been converted to 5,000,000 in micros before the change, but could be returned as 5,750,000 (more precise) after the change.

What do I need to do?

If you use the Google Ads API or Google Ads scripts to query the recommendation resource for recommendations of type LOWER_TARGET_ROAS, and your application logic uses the current_average_target_micros field, you must update your application to treat the value as micros instead of a whole budget value for when the change takes effect on April 23, 2025.

If you have any questions or need help, check out the Google Ads API support page for options.

Starting on March 3, 2025, the Google Ads API and Google Ads scripts search term insight reports will return all search subcategories as empty. The Google Ads UI already removed this field, and the API is also rolling out this change to be consistent across Google Ads.

Starting on March 3, 2025, the Google Ads API and Google Ads scripts search term insight reports will return all search subcategories as empty. The Google Ads UI already removed this field, and the API is also rolling out this change to be consistent across Google Ads.

What do I need to do?

Starting March 3, 2025, it is expected that all values for segments.search_subcategory will be empty.

If you query segments.search_subcategory in the campaign_search_term_insight or customer_search_term_insight reports, then:

  1. Check that your code can handle an empty value in segments.search_subcategory. An empty string already is a catch-all, so your code should be already handling this.
  2. We recommend removing segments.search_subcategory from your query.

If you have any questions or concerns, you can reach out to us through our support form.

Starting in January 2025, we will enable consent unbundling in Google Ads scripts. This is a new feature of OAuth that allows you to customize which specific scopes you want to authorize, rather than the current all-or-nothing approach. Consent unbundling is being rolled out in all Google OAuth applications.
Starting in January 2025, we will enable consent unbundling in Google Ads scripts. This is a new feature of OAuth that allows you to customize which specific scopes you want to authorize, rather than the current all-or-nothing approach. Consent unbundling is being rolled out in all Google OAuth applications.

Google Ads scripts already runs a static analysis on your code before presenting the OAuth consent screen, and only requests the specific features that are required to run the script. Therefore, when you authorize Google Ads scripts, ensure that you select all the boxes on that screen, or else you will experience execution errors.

Any existing scripts you already have will continue to work without any user action needed when this feature rolls out, unless you make changes that require reauthorization. Existing unmodified scripts will continue to run as usual.

If you have any questions about consent unbundling or other Google Ads scripts features, please post them in the Google Ads scripts forum.

If you want all new blog posts sent directly to your inbox, we have good news. The blog includes a customizable RSS feed that you can subscribe to with your favorite RSS service. Just paste the URL above into your RSS service and get the blog contents delivered in whatever way you prefer. If you're new to RSS, check out this ...
If you want all new blog posts sent directly to your inbox, we have good news. The blog includes a customizable RSS feed that you can subscribe to with your favorite RSS service. Just paste the URL above into your RSS service and get the blog contents delivered in whatever way you prefer. If you're new to RSS, check out this community resource on GitHub describing how it works and providing a list of well-supported services.

If you want to filter to specific products that interest you, that's possible too. Here are some quick links to the RSS feeds for the products supported by this blog:

We recently published a new suite of guides on how to create Performance Max campaigns in Google Ads scripts. You can check them out on our developers site.

These guides focus on using the new ...
We recently published a new suite of guides on how to create Performance Max campaigns in Google Ads scripts. You can check them out on our developers site.

These guides focus on using the new mutate function, which lets you access most of the features from the full Google Ads API.

By following the pattern established in these guides, you can customize the operations to perform all sorts of tasks automatically with scripts. Check out the mutate strategy section specifically for some general advice applicable to many use cases.

If you have any questions or concerns, you can reach out to us on our forum.

Google Ads is rolling out a new feature that allows the account administrator to request its users to switch from a regular personal email address (for example john.doe@gmail.com) to a business email address (for example john.doe@example.com). We are making this change to improve account security and reduce potential surface for abuse. This is an informational post to highlight how this feature could affect the Google Ads API and Google Ads scripts developers.

Google Ads is rolling out a new feature that allows the account administrator to request its users to switch from a regular personal email address (for example john.doe@gmail.com) to a business email address (for example john.doe@example.com). We are making this change to improve account security and reduce potential surface for abuse. This is an informational post to highlight how this feature could affect the Google Ads API and Google Ads scripts developers.

How does this feature work?

To use this feature, the account administrator sends a request to an account user from the Google Ads UI to switch their personal email to a business email. If the user accepts, then the following steps are bundled behind the scenes:

  • A business email address is added to the Google Ads account.
  • A grace period of one month starts, where both the personal email address and business email address are active users in the Google Ads account.
  • The personal email address is removed from the Google Ads account at the end of the grace period.

Refer to our help center guide to learn more about this feature.

How does this affect API developers?

As a developer, you may need to do the following additional steps:

  1. If the user has authorized your application to make API calls to the Google Ads account using their personal email address, then the OAuth 2.0 refresh token will stop working once the personal email address is removed from the Google Ads account. You need to authorize the user with the new business email address.
  2. This change only works with Google Ads accounts. If the user manages other accounts, such as Google Analytics or Google Merchant Center, then the email address needs to be switched manually in those accounts. See the help center page for a more comprehensive list of locations where you might have to make a change.
  3. If you have authorized and scheduled Google Ads Scripts with the personal email address, you need to authorize the scripts with the business email address after this change.

How to get help

If you have any questions or need help, check out the Google Ads API support page or Google Ads scripts support page for options.

In April 2024, we are releasing a new version of Google Ads scripts that is updated to use Google Ads API v15.

Note: Our generic search and mutate methods allow for new API features as soon as they become available, and have been supporting ...
In April 2024, we are releasing a new version of Google Ads scripts that is updated to use Google Ads API v15.

Note: Our generic search and mutate methods allow for new API features as soon as they become available, and have been supporting Google Ads API v15 since its release.

As a result of this change, several features that were removed from v15 of the Google Ads API will no longer be available in Google Ads scripts:
  • AdsApp.adMedia() will throw a sunset error. Media is no longer supported. Assets are used instead.
  • ResponsiveDisplayAd would previously return a Media when fetching its marketing image or logo image. Instead, this will now return null.
  • ImageAd.getImage() previously returned a Media. It will now return an Asset instead. This will be a breaking change if you depend on this method.
In addition to these changes, we will be increasing the default reporting version to v15 if you don't manually specify a version.
If you have any questions or concerns, you can reach out to us on our forum.

Today, we’re announcing the publishing of a new pre-written Script for reporting on Performance Max campaign performance in Google Ads scripts. This script will report on your conversions and other performance related metrics for your campaigns. The only thing needed to get it running is to copy the source code into your account and schedule the script to run daily.
Today, we’re announcing the publishing of a new pre-written Script for reporting on Performance Max campaign performance in Google Ads scripts. This script will report on your conversions and other performance related metrics for your campaigns. The only thing needed to get it running is to copy the source code into your account and schedule the script to run daily.

How can I get started?
Find the script here.

If you have any questions or need additional help, contact us via the forum.

We are announcing support for new generic mutate functionality in Google Ads scripts, available today. Most mutate operations that are supported by the Google Ads API can now be performed directly in scripts.
We are announcing support for new generic mutate functionality in Google Ads scripts, available today. Most mutate operations that are supported by the Google Ads API can now be performed directly in scripts.


For example, to create a simple budget:
const budgetResult = AdsApp.mutate({
    campaignBudgetOperation: {
        create: {
            amountMicros: 10000000,
            explicitlyShared: false
        }
    }
});
The new functionality enables you to create full campaign hierarchies, new conversion actions, and more that previously was not possible in scripts. For a full list of available operations, check out the MutateOperation reference documentation for the Google Ads API. Note that a few operation types are still restricted in scripts.

Check out the new guide for a complete overview of how to use the feature, including update and remove operations and performing multiple operations in a single call.

Please contact us on our forum or at googleadsscripts-support@google.com if you have any questions.

Starting in April, we will be rolling out a change to the way you create experiments in Google Ads scripts to bring the process more in line with the Google Ads API. Previously, you would create a draft, modify the draft, and then create an experiment from the modified draft. Now, you will create the experiment directly, which will automatically create the underlying drafts and allow you to modify them before scheduling the experiment.
Starting in April, we will be rolling out a change to the way you create experiments in Google Ads scripts to bring the process more in line with the Google Ads API. Previously, you would create a draft, modify the draft, and then create an experiment from the modified draft. Now, you will create the experiment directly, which will automatically create the underlying drafts and allow you to modify them before scheduling the experiment.

You can read more about this feature in our Drafts and Experiments guide.

To summarize the new changes in a simple example, if you had code such as:
const draft = campaign.newDraftBuilder()
  .withName(newDraftName)
  .build()
  .getResult();
// Modify the draft campaign before beginning the experiment.
const draftCampaign = draft.getDraftCampaign();
const experiment = draft.newExperimentBuilder()
  .withName(newExperimentName)
  .withTrafficSplitPercent(50)
  .startBuilding();
The new equivalent code would be:
const experiment = AdsApp.newExperimentBuilder()
  .withCampaign(campaign)
  .withTrafficSplitPercent(50)
  // Some new fields are required.
  .withStartDate("20230501")
  .withEndDate("20230601")
  .withType("SEARCH_CUSTOM")
  // The suffix will automatically be added to the end of the name for
  // each experiment campaign.
  .withSuffix("experiment")
  // Goals have no effect on the serving of the experiment, but instead
  // just help you keep track of your intentions.
  .withGoals([{metric: 'CLICKS', direction: 'INCREASE'}])
  .build();
// The experiment campaign is the new equivalent of the draft campaign
// in the example above.
const experimentCampaign = experiment.getExperimentCampaign();
This change will allow us to bring further improvements to this feature as they are added in the Google Ads API.

If you have any questions or feedback, please leave a post on our forum or send a message to our support alias googleadsscripts-support@google.com.

On November 1, 2022, we announced our plans to sunset Similar Audiences in 2023 as we work on simplifying our existing product portfolio and strengthening our future-proof solutions in a changing privacy landscape. We expect to roll out this change in two phases for both ...
On November 1, 2022, we announced our plans to sunset Similar Audiences in 2023 as we work on simplifying our existing product portfolio and strengthening our future-proof solutions in a changing privacy landscape. We expect to roll out this change in two phases for both Google Ads API and Google Ads scripts:
  1. Starting May 2023: New similar audiences segments will stop being generated, and existing similar audiences segments will no longer be added to campaigns and ad groups. Ad groups and campaigns that already have similar audience segments attached will continue to function as expected.
  2. Starting August 2023: Similar audience segments will be removed from all ad groups and campaigns. You will continue to have access to historical reporting data for similar audience segments from past campaigns.
What is the impact on Google Ads API?
Any requests that mutate entities related to Similar Audiences will start failing with errors. This includes: The data retrieved using GoogleAdsService.Search or GoogleAdsService.SearchStream requests will gradually be depleted of any references to Similar Audiences. This includes queries relying on the reports user_list, audience, combined_audience, and any others that are based on targeting, or conversion values segments or metrics. When we get closer to the sunset date, check out the deprecation and sunset guide for the exact errors that will be thrown.

What is the impact on Google Ads scripts?
Any requests that relate to Similar Audiences are impacted. Mutating requests will start failing with errors and reporting requests will start returning data depleted of any references to Similar Audiences. This includes: What should I do?
We recommend that API users manually migrate and stop using Similar Audiences before May 2023 in their calls to avoid any disruptions. You can refer to the announcement and Help Center article to learn more about migration options.

If you have any questions or need additional help, contact us through the forum or at googleadsapi-support@google.com.

Today we're launching support for Performance Max campaigns in Google Ads scripts. This is treated as a brand new campaign type in scripts, similar to how video or shopping campaigns already work.
Today we're launching support for Performance Max campaigns in Google Ads scripts. This is treated as a brand new campaign type in scripts, similar to how video or shopping campaigns already work.

To get started, check out the performance max campaigns selector on the AdsApp. Once you've selected a PerformanceMaxCampaign, you can perform common operations like pausing or enabling the campaign, as well as selecting and modifying most asset types in asset groups. You cannot modify text assets this way, and you cannot create new campaigns or asset groups through scripts.

Performance Max retail campaigns are supported in only a limited fashion as listing groups cannot be managed via Scripts.

For more information about Performance Max campaigns in general, check out the complete help center article.

If you have any questions or feedback, please leave a post on our forum or send a message to our support alias googleadsscripts-support@google.com so that we can help.

The new experience for Google Ads scripts has been available for a while, so hopefully you've had a chance to try it out and enjoy all the benefits it has to offer. There are a few differences from the old scripts API, which we've documented in our ...
The new experience for Google Ads scripts has been available for a while, so hopefully you've had a chance to try it out and enjoy all the benefits it has to offer. There are a few differences from the old scripts API, which we've documented in our migration guide.

If you've given those a go, reached out on our forum or to our support alias for assistance, and are still having any difficulties understanding the changes or having problems migrating a particular script, we are launching a limited series of office hours sessions on a first come, first serve basis.

If you're interested, check out more information on our office hours information page.

As a reminder, we will begin migrating scripts automatically to the new experience starting in September of this year, and will be migrating all scripts to use the new scripts experience in October.

If you have any questions or feedback regarding the new experience, please leave a post on our forum or send a message to our support alias googleadsscripts-support@google.com so that we can help.

Today we’re launching scripts templates, a quick and easy way to get started with scripting in Google Ads. Instead of starting your script from scratch, you can choose from a list of templates, edit to fit your account, and deploy them.
Today we’re launching scripts templates, a quick and easy way to get started with scripting in Google Ads. Instead of starting your script from scratch, you can choose from a list of templates, edit to fit your account, and deploy them.

To get started, visit the scripts page and click on the plus (+) button, then Start from a template:

Next, pick a template and click Customize to begin editing.

If you have any questions or feedback regarding the new experience, please leave a post on our forum so that we can help.

Between April 25th 2:32 PM PT and April 26th 12:24 PM PT, there was an issue which may have impacted some read report requests across Google Ads scripts, the AdWords API, and the Google Ads API. If you were using these products to request reporting data for your accounts, then a small percentage of report downloads may have been missing rows or may have had incorrect data in a given row. This issue has been resolved. As a precaution, we recommend running again any reports that you have executed during this period as the missing data has been restored.

If you have any questions, please contact us via the Google Ads API forum or the Google Ads scripts forum.

Today we’re launching the full version of the new Google Ads scripts experience. The beta has been running since June of last year, and now the final batch of features to match the functionality of legacy scripts has been released.
Today we’re launching the full version of the new Google Ads scripts experience. The beta has been running since June of last year, and now the final batch of features to match the functionality of legacy scripts has been released.

Starting soon, all new scripts will default to the new scripts experience, although you can still disable it on a script by script basis if necessary. Existing scripts won't be affected until September of 2022. After that, we will migrate all scripts to the new experience. You should manually move your scripts over to the new experience before then to ensure continued functionality. We've tried to implement backwards compatibility, but we can't guarantee every script will work without changes, so definitely take some time to confirm yourself.

Here are some highlight features in the new experience:
  • Support for ES6, including let, classes, for..of loops, and more.
  • Improved throughput, meaning you can process more entities in the same amount of time. We've also removed the entity limits on processing, although time limits remain in place.
  • Support for new asset-based extensions.
  • Enhanced bidding strategy support.
The following features are added in this release:
  • Manager account scripts
  • Bulk upload
  • Video campaigns
See the updated Google Ads scripts site for full information on the new experience, including migration information, performance improvements, and updated best practices. This replaces the documentation for the legacy scripts experience, but if you must reference that we will preserve it at a new location until the legacy scripts sunset: https://developers.google.com/google-ads/scripts-legacy

If you have any questions or feedback regarding the new experience, please leave a post on our forum so that we can help.

On January 5, 2022, we removed all App campaign placement data from the following reports:

Google Ads API AdWords API / Google Ads scripts
On January 5, 2022, we removed all App campaign placement data from the following reports:

Google Ads API AdWords API / Google Ads scripts We made this change because the data provided didn’t fully represent the complete view of the placements that help developers monitor brand safety for their advertisers. If you use these reports, see the App Campaigns Brand Safety Placement report in the Google Ads UI.

If you have AdWords API or Google Ads API related questions about this change, please reach out to us on the API forum or at googleadsapi-support@google.com. Note: AdWords API developers must migrate to Google Ads API by April 27, 2022

If you have any Google Ads scripts related questions, please reach out to us on the scripts forum.