Posted:
We have added support for AdWords API v201506 reports in AdWords Scripts. This version adds support for FINAL_URL_REPORT, the Upgraded URLs-compatible replacement for the DESTINATION_URL_REPORT.

This version also introduces several changes to the reporting columns
If you use API versioning in your reports, then you need to modify your code to use v201506 as shown below. If you don’t use API versioning, no code changes are required.
var report = AdWordsApp.report(query, {
   apiVersion: 'v201506'
});
If you have any questions about this feature or AdWords scripts in general, you can post them on our developer forum.

Posted:
AdWords Scripts now support negative keyword and excluded ad placement lists, and the ability to share them across campaigns. Follow these links for implementation details and code examples: We have also released a new solution named Master Negative List that uses this feature to maintain a master list of negative keywords and placements for AdWords accounts. The list of negative criteria can be managed from a spreadsheet. Separate versions are available for AdWords accounts and manager accounts.

Special thanks goes to Terence Nip, who implemented this feature during his summer internship at Google.

Give this feature a try and let us know what you think! You can post your questions and feedback on our developer forum.

Posted:
We have made the following changes to AdWords scripts.

Full screen mode for Scripts IDE

You can now toggle fullscreen mode for the Scripts IDE by clicking the Expand icon on the top right corner of the editor toolbar.


Clear methods for Upgraded URLs

We have added new methods to clear various fields in Upgraded URLs: Clear methods for sitelink descriptions

You can now use the clearDescription1() and clearDescription2() methods to clear the corresponding description fields in the Sitelink, AdGroupSitelink and CampaignSitelink classes.

Sunset support for updating destination URL

As previously announced, support for updating destination URL has been sunset completely. If any of your scripts use this field, make sure you upgrade your scripts to use the upgraded URL fields. We have also added clearDestinationUrl() to the Keyword class and clearLinkUrl() to various ad extension classes. These methods may be used to clear the destination URL field when you upgrade your URLs.

See our sunset tracker page for more details.

If you have any questions about this feature or AdWords scripts in general, you can post them on our developer forum.

Posted:
We are updating the Paid and Organic report to include only text ad statistics. Impressions and clicks for mobile app install ads and Product Listing Ads will be excluded from this report starting July 13, 2015.

These formats serve in places other than on search results, so we are excluding them to provide you a better comparison across paid and organic listings at the query level. If you use data from the Paid and Organic report in any of your AdWords API or Scripts applications, then make sure you update them to adjust for this data change. Historic stats for mobile app install ads and Product Listing Ads will continue to be available from this report type up to the following report dates:
  • Product Listing Ads - up to and including March 23, 2015
  • Mobile app install ads - up to and including July 13, 2015
If you have any further questions about this change, let us know via the API or scripts forum, or Google+ page.

Posted:
We have made the following changes to AdWords scripts.

Support for passing arguments into parallel functions

You can now use a string argument to pass account-specific information into a parallel function when using the MccApp.executeInParallel() method. The code snippet below shows how to use this feature:
function main() {
  // Select the accounts you want to process.
  var accountSelector = MccApp.accounts().withIds([1234567890, 3456787890]);

  // Construct a config object that contains account-specific information.
  var accountFlags = {
    '1234567890': {
       'label': 'Brand 1 campaigns',
     },
    '3456787890': {
       'label': 'Brand 2 campaigns',
     }
  };

  // Convert the config object into a string.
  var optionalInput = JSON.stringify(accountFlags);

  // Process accounts in parallel.
  accountSelector.executeInParallel("processClientAccount",
    "afterProcessAllClientAccounts", optionalInput);
}

function processClientAccount(args) {
  // Convert the account flags from string to config object.
  var accountFlags = JSON.parse(args);
  var accountConfig =
      accountFlags[AdwordsApp.currentAccount().getCustomerId()];

  // Process your client account here.
  var label = accountConfig['label'];
  ...
}

function afterProcessAllClientAccounts(results) {
  ...
}
Learn more about working on accounts in parallel.

Support for clearing ad group bid modifiers

You can now use the clearMobileBidModifier() method of AdGroup to clear bid modifiers at the ad group level and default to the campaign-level bid modifier.

Support for Upgraded URLs in app extensions

We have added support for Upgraded URLs in app extensions. The setLinkUrl() method in MobileApp, AccountMobileApp, CampaignMobileApp and AdGroupMobileApp classes and withLinkUrl() method of MobileAppBuilder class have been marked deprecated and will start throwing user errors on July 1, 2015. If you use any of these methods in your script, make sure you update them to use the setFinalUrl() / withFinalUrl() methods instead.

Deprecated CallOnly field in phone extensions

We have deprecated the call-only field in phone extensions. The following methods have been marked as deprecated and will start throwing user errors on June 14, 2015: If your ad extensions use the call-only feature, migrate your campaigns to call-only campaigns by following the instructions here.

Transition to viewable cost-per-thousand impression (CPM)

We’d like to remind you that later this year, all cost-per-thousand impression (CPM) bids will transition to a new type of bid called viewable CPM (vCPM), and CPM bidding will no longer be available. You can learn more about vCPM on our help center.

AdWords scripts already use the correct CPM version, based on campaign settings, so no code changes are required from your end for this transition. Our updated documentation now refers to CPM as the generic cost-per-thousand impression bidding instead of a specific flavor (e.g., maxCPM or vCPM).

If you have any questions about these changes or AdWords scripts in general, you can post them on our developer forum.

Posted:
We’re pleased to announce the first ever workshops for AdWords scripts. The workshops will be held at the following locations:

        New York: June 29th, 2015
        San Francisco: July 10th, 2015

This round of workshops will cater to both beginners and advanced scripters. We'll have code labs where you will build your own scripts from scratch, with the help from the Scripts team. Bring your laptop and an idea to get it scripted!

Whether you’re an advertiser who wants to learn about how scripts can automate your account management tasks, a developer who wants to polish your scripting skills, or a scripts enthusiast who wants to meet fellow scripts experts, you can find it all in these workshops.

Visit our website to check out the full agenda and sign up.

If you have any questions about the workshops, you can post them on our forums. Check out our Google+ page for Ads APIs updates.

Posted:
Shopping Content API
AdWords scripts now support Google Shopping Content API which gives Google Merchant Center users the ability to upload and manage their product listings and manage their Merchant Center accounts. The Shopping Content API can be enabled through the Advanced APIs dialog. See our guide and code snippets to learn more about this feature.

Account level extensions
AdWords scripts now support account-level extensions: AccountCallout, AccountMobileApp, and AccountReview. You can access these extensions using the extensions() method of the Account object. Appropriate creation and deletion methods are also available for these extensions on the Account object. See our guide for more details and usage examples.

Resolve geo names in reports
The AdWordsApp.report() method now supports an option named resolveGeoNames, which controls whether or not to convert Geo Criteria IDs (e.g., CountryCriteriaId or CityCriteriaId) into names ('United States', 'San Francisco', etc.). Set this option to true to get names, false to get numerical IDs. This option defaults to true.

Updated best practices guide
We have updated the best practices guide to cover a lot of common performance issues that your scripts may run into, and how to improve them.

New weather-based management script
The new weather-based management script improves upon the the popular bid-by-weather script by providing a framework where you can add your own campaign management logic.

If you have any questions about these features or AdWords scripts in general, you can post them on our developer forum.

Posted:
We are excited to announce two new features for AdWords scripts:

AdWords API v201502 reports

AdWords scripts now support AdWords API v201502 reports. The new version introduces two new reports: USER_AD_DISTANCE_PERFORMANCE_REPORT and LABEL_REPORT. We also introduced several new columns, renamed some columns to make them consistent with the AdWords UI, and removed some duplicate columns. See the AdWords API release notes for more details.

If you use API versioning in your reports, you’ll need to modify your code to use v201502 as shown:
var report = AdWordsApp.report(query, {
    apiVersion: 'v201502'
});
If you don’t use API versioning, your scripts will now default to v201502 reports. If your scripts access one of the removed or renamed columns, you may need to fix that column name in your scripts.

JDBC

JDBC allows your scripts to connect to external databases through the JDBC service, a wrapper around the standard Java Database Connectivity technology. In Apps Script, the JDBC service supports Google Cloud SQL, MySQL, Microsoft SQL Server, and Oracle databases. See our guide for more details.

If you have any questions about these features or AdWords scripts in general, you can post them on our developer forum.

Posted:
AdWords scripts now support Upgraded URLs. Upgraded URLs provide a smarter way for you to manage URLs in AdWords by specifying which part of your URL specifies the landing page, and which part is used for tracking. You can learn more about this feature here.

Here is an example of how to create a new text ad that specifies the final URL instead of destination URL:
var adOperation = adGroup.newTextAdBuilder()
    .withHeadline("headline of ad")
    .withDescription1("first line of ad description")
    .withDescription2("second line of ad description")
    .withDisplayUrl("www.example.com")
    .withFinalUrl("http://www.example.com")
    .build();
var ad = adOperation.getResult();
You can retrieve the Upgraded URL fields of an entity using the urls() method for that entity. If you run reports, the Upgraded URL fields are also available through various performance reports.

Migrating to Upgraded URLs

We encourage all advertisers to upgrade to the new system by July 1, 2015. This involves two parts:
  1. Update your scripts to handle Upgraded URL fields.
  2. Migrate the existing entities in your accounts to Upgraded URLs.
Upgrade scripts

For any new entities that you create using AdWords scripts, we recommend that you set the final URLs instead of destination URLs.

When dealing with existing entities, keep in mind that you may encounter both upgraded and non-upgraded entities in your accounts. If your script reads destination URLs, then make sure it checks both the destination URL and final URL fields of any entity it retrieves. If your script updates destination URLs, use either setFinalUrl() or setDestinationUrl(), depending on whether the entity has been upgraded or not. AdWords scripts will raise an error if you attempt to set both final URL and destination URL for an entity.

Migrate existing entities

You should migrate existing entities to use Upgraded URLs by 1 July, 2015. Refer to our migration guide for upgrading your existing entities to the new URL framework. If you wish to use the Basic upgrade option, you can use the bulk upload feature. If you choose to use the Advanced upgrade option, then you can use Scripts.

If you choose not to upgrade now, and your destination URL does not contain a different domain than the display URL, your destination URL will be updated automatically starting on 1 July 2015. If your destination URL does contain a different domain than the display URL, you will need to manually upgrade the URL or the ad will stop serving shortly after the July 1 deadline.

If you have questions or feedback about these features, let us know on our forum.

Posted:
We have added the following new features in AdWords scripts.

Bidding

You can now manage bids for your campaigns, ad groups and criteria in AdWords scripts. Support is also provided to retrieve and update shared bidding strategies in your account. The current release allows you to use MANUAL_CPC, MANUAL_CPM, BUDGET_OPTIMIZER or CONVERSION_OPTIMIZER as bidding strategies; and set CPC, CPM or CPA bids to your biddable entities. See our guide and code snippets to learn more about this feature.

Display criteria

You can now manage the following display criteria through AdWords scripts: keywords, placements, topics, audiences. Check out our code snippets for usage examples.

New ad extensions

You can now manage review and callout extensions for your campaigns and ad groups in AdWords scripts.

If you have questions or feedback about these features, let us know on our forum.

Posted:
AdWords scripts now support bulk changes to your account through uploading data in CSV format. You can upload data from a CSV file on Google Drive, a Google spreadsheet, a Microsoft Excel spreadsheet, or construct a bulk upload request in your script at runtime.

AdWords scripts currently support the following operations for bulk upload:
  • Campaign management: You can create, edit or delete campaigns, ad groups, keywords and text ads using bulk upload. You can also edit existing ad group criteria, ads and product groups.
  • Offline conversions: You can upload offline conversions to your account using bulk upload.
Learn more about this feature on our guide, and check out our code snippets for usage examples. If you have questions or feedback about this feature, let us know on our forum.

Posted:
We are introducing Builders as the standard way to create entities in AdWords scripts. You can use Builders in either synchronous or asynchronous mode. You can also check whether the operation was successful or not, and take appropriate actions depending on the operation’s outcome. The following code snippet shows how to create a keyword using builders.

// Retrieve your ad group.
var adGroup = AdWordsApp.adGroups().get().next();

// Create a keyword operation.
var keywordOperation = adGroup.newKeywordBuilder().
    .withCpc(1.2)
    .withText("shoes")
    .withDestinationUrl("http://www.example.com/shoes")
    .build();

// Optional: examine the outcome. The call to isSuccessful()
// will block until the operation completes.
if (keywordOperation.isSuccessful()) {
   // Get the result.
   var keyword = keywordOperation.getResult();
} else {
   // Handle the errors.
   var errors = keywordOperation.getErrors();
}
The current release adds builder support for ads and keywords. The existing builders for ad groups and Ad Extensions - phone number, site links and mobile apps have also been standardized. The addSitelink, addPhoneNumber, and addMobileApp methods of AdGroup and Campaign classes will now return the resulting operation.

We are also deprecating the following creation methods. These methods will work fine for now, but they will be sunset in the future. You can learn more about this new feature on our guide. If you have questions or feedback about this feature, let us know on our forum.

Posted:
We’re excited to announce the integration of AdWords scripts with even more Google services, dubbed “Advanced APIs”, allowing you to make use of these Google services directly from your scripts. The current release allows you to connect with:
  • Google Analytics: Update your account based on your website’s performance.
  • Youtube Analytics: Update your account based on your videos’ performances.
  • YouTube: Use YouTube trends or other channels stats to update your account.
  • Big Query : Manage, upload and query big data sets to better optimize your account.
  • Fusion Tables: Store, share and query your data information.
  • Calendar: Set campaign check reminders, enable/pause ads based on events.
  • Task: Manage and read from your Gmail tasks to optimize your account.
  • Prediction: Create, train, and query prediction models on your campaign’s performance data as well as external data sets.
To learn more about advanced APIs, refer to our code snippets and guide.

We encourage you to give this new feature a try and tell us what solutions you would like to have or other API you would like us to add.

As usual please let us know your feedback on the forum - bug reports and suggestions to improve the API usability are most welcome.

Posted:
In response to your feedback, we are enhancing the MccApp.accounts() method. Starting December 3, 2014, the MccApp.accounts() method will return all accounts (e.g. Express, Video, etc.) that you see when logging in to your MCC account through the AdWords UI instead of just the ordinary AdWords accounts.

Note that once this change is live, your MCC scripts may start getting more accounts when calling the MccApp.accounts() method. You should check your MCC scripts to ensure they can handle the possible extra accounts. You can restrict the accounts that AdWords scripts return by applying an appropriate filter condition in your account selector.

Note that this change doesn’t affect the way other selectors work. For example, you cannot retrieve an AdWords Express campaign by calling AdWordsApp.campaigns() on an AdWords Express account.

If you have questions or feedback about this change, let us know on our developer forum or our Google+ page.

Posted:
We have added the following new features in AdWords scripts.

Ad customizers
AdWords scripts now support ad customizers, a more advanced version of ad params. Ad customizers adapt your text ads to the full context of a search or the webpage someone's viewing, by inserting a customized parameter within the ad. Ad customizers let you customize your ads for each query without having to create a separate ad for each variation.

AdWords scripts allow you to create ad customizer sources, add or update items in the sources, and create parameterized ads. You can also target an ad customizer item to a specific campaign, ad group or keyword, and track the performance of ad customizers using the PLACEHOLDER_FEED_ITEM_REPORT.

To learn more about ad customizers, refer to our code snippets and guide. Also, check out the brand new ad customizers solution that shows how to use this new feature in your account.

v201409 reports
We now support AdWords API v201409 reports in AdWords scripts. See blog post for more details.

Product ads
You can now retrieve your product ads using the ads() method of the ShoppingAdGroup. You can create new product ads using the newAdBuilder() method of ShoppingAdGroup.

We hope you enjoy these new features. If you have any questions about these features or AdWords scripts in general, you can post them on the developer forum.

Posted:
We are announcing support for AdWords API v201409 reports in AdWords scripts. The new version introduces PLACEHOLDER_REPORT, a new report type that allows for retrieval of extension stats.

If you use API versioning in your reports, then you need to modify your code to use v201409 as shown below. If you don’t use API versioning, no code changes are required.
var report = AdWordsApp.report(query, {
   apiVersion: 'v201409'
});
If you have any questions about this feature or AdWords Scripts in general, you can post them on our developer forum.

Posted:
We have made the following improvements to labels in AdWords scripts based on your feedback:
  • You can now create and remove account labels using AdWords scripts. You can also apply or remove labels on child accounts under an MCC account.
  • You can now retrieve IDs for labels within an AdWords account. This feature comes in handy when you want to limit report results to entities with specific labels, since labels are filtered by label ID. You can see a code snippet here.
We have added new code snippets and updated our labels guide to explain these new features in more detail. If you have questions or feedback about these changes, let us know on our developer forum or our Google+ page.

Posted:
We recently announced that we will sunset the login email field in AdWords API. To keep our APIs consistent, we will also sunset the getLoginEmail() method in AdWords scripts on November 5, 2014. We have identified some of the common use cases for this field and have come up with some possible workarounds.

Identifying accounts

When retrieving client accounts, use their Customer IDs instead of login emails to identify the accounts. You can use the getCustomerId() method to retrieve an account’s Customer ID. When available, you may also use the getName() method to retrieve the account’s friendly name. To set an account’s name,
  • Login to your My Client Center account and navigate to My Client Center tab
  • Click on the pencil logo in the corresponding Account’s the Client column
  • Provide a new name, and click the Save button to update the account name
Maintaining customer contacts

You should maintain your customer contacts going forward. If you were relying on the login email field to manage your client contacts, then you can use the getCustomerId() and getLoginEmail() methods to create a mapping from your customer ids to their login emails before November 5, 2014.

Determining access levels of a user in an account

Scripts run with the same access levels as the user who authorized the script. You shouldn’t rely on a login email to figure out a script’s access levels--this is a bad programming practice that makes your script error prone if the user’s account access level changes. Instead, make sure that the script is authorized by a user who has enough access levels as required by the script.

If you have questions or feedback about this change, or a use case we missed, let us know on our developer forum or our Google+ page.

Posted:
We are excited to announce support for Shopping campaigns in AdWords scripts. The current release allows you to work with existing shopping campaigns, create and manage product partitions and run shopping reports. You can learn more about these features on our guide.

We encourage you to give this new API a try and let us know your feedback on the forum - bug reports and suggestions to improve the API usability are most welcome.

Posted:
We previously announced on this blog about renaming Status enumeration values in reports for removed objects from DELETED to REMOVED. To keep the rest of the API consistent, we are also renaming the isDeleted method in Campaign and AdGroup objects to isRemoved. The isDeleted method is marked as deprecated, and will continue working until November 30, 2014. To ensure that your scripts continue to work properly, make sure you fix your scripts to use the new method before November 30, 2014.

If you have questions about this change, let us know on our forum. You can also provide feedback via the Google Ads Developers Google+ page.