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

In October, 2025, Python 3.9 will reach end-of-life in October 2025 and will no longer be supported by the Python Software Foundation. Once Python 3.9 officially reaches end-of-life status, it will also no longer be supported by the Google Ads client library for Python. That means we will not make updates to the library, or address any issues related to compatibility with Python 3.9, outside of critical security updates.

In October, 2025, Python 3.9 will reach end-of-life in October 2025 and will no longer be supported by the Python Software Foundation. Once Python 3.9 officially reaches end-of-life status, it will also no longer be supported by the Google Ads client library for Python. That means we will not make updates to the library, or address any issues related to compatibility with Python 3.9, outside of critical security updates.

In Q4 2025 we will release a new major version of the library that is incompatible with Python 3.9. This new version will include support for Python 3.14. Users of deprecated, or soon-to-be deprecated versions of Python, are at risk of losing access to the Google Ads API. Please note the below timelines:

  • Current: Python 3.7 users cannot currently access the Google Ads API
  • Q1 2026: Python 3.8 users will lose access to the API when version v19 of the Google Ads API is sunset in Q1 2026.
  • Late 2026: Python 3.9 users will lose access to the API when version v22 of the Google Ads API is sunset in late 2026

Follow the deprecation and sunset timetable for updates around the specific timing of Google Ads API version releases and sunsets.

Any library users currently relying on Python 3.8 or 3.9 should upgrade their systems to Python 3.10 or higher as soon as possible.

If you have any questions about this change, please file an issue on the client library repository.

In October, 2024, Python 3.8 will reach end-of-life and will no longer be supported by the Python Software Foundation. Once Python 3.8 officially reaches end-of-life status, it will also no longer be supported by the Google Ads client library for Python. That means we will not make updates to the library, or address any issues related to compatibility with Python 3.8, outside of critical security updates.

In October, 2024, Python 3.8 will reach end-of-life and will no longer be supported by the Python Software Foundation. Once Python 3.8 officially reaches end-of-life status, it will also no longer be supported by the Google Ads client library for Python. That means we will not make updates to the library, or address any issues related to compatibility with Python 3.8, outside of critical security updates.

In Q1 2025 we will release a new major version of the library that is incompatible with Python 3.8. This new version will include support for Python 3.13. Users of deprecated, or soon-to-be deprecated versions of Python, are at risk of losing access to the Google Ads API. Please note the below timelines:

  • Python 3.7 users will lose access to the API when v15 is sunset on September 25, 2024
  • Python 3.8 users will lose access to the API when v18 is sunset in Q3 or Q4 2025.

Any library users currently relying on Python 3.7 or 3.8 should upgrade their systems to Python 3.9 or higher as soon as possible.

If you have any questions about this change, please file an issue on the client library repository.

In June 2023, support for Python 3.7 was deprecated in the Google Ads API Client Library for Python. In Q1 2024, a major version of the library will be released that makes it incompatible with Python 3.7. Library changes related to compatibility with Python 3.7 will be limited to critical security or stability patches.
In June 2023, support for Python 3.7 was deprecated in the Google Ads API Client Library for Python. In Q1 2024, a major version of the library will be released that makes it incompatible with Python 3.7. Library changes related to compatibility with Python 3.7 will be limited to critical security or stability patches.

Google Ads API users who depend on Python 3.7 can continue using version 22.1.0 of the library, which includes API v15 support, until v15 of the is sunset in September 2024. All Python users should upgrade to Python 3.8 or higher as soon as possible.

In the future, Python users should expect that the library will become incompatible with unsupported versions of Python as soon as they reach end-of-life status. When Python 3.8 becomes unsupported in October 2024, a major version of the library will be released that is incompatible with Python 3.8. At least two months before a Python version deprecation, we will publish a blog post to help remind users of the change.

The below resources are available to help users plan ahead for future language support removal: If you have any questions about this change, please file an issue on the client library repository on GitHub.

On June 27, 2023, Python 3.7 will reach end-of-life and will no longer be supported by the Python Software Foundation. Once Python 3.7 officially reaches end-of-life status, it will also no longer be supported by the ...
On June 27, 2023, Python 3.7 will reach end-of-life and will no longer be supported by the Python Software Foundation. Once Python 3.7 officially reaches end-of-life status, it will also no longer be supported by the Google Ads client library for Python.

While this will not change the functionality of the client library, any issues or bugs related to the library's compatibility with Python 3.7 will not be addressed, and any documentation related to Python 3.7 will be removed.

We recommend library users upgrade their systems to Python 3.8 or higher as soon as possible.

If you have any questions about this change, please file an issue on the client library repository.

If you are using an Ads API Client Library and Apache Log4j, please see below.

NIST has announced a recent vulnerability in the Apache Log4j library.

The Apache Log4j utility is a commonly used component for logging requests. On December 9, 2021, a vulnerability was reported that could allow a system running older Apache Log4j versions to be compromised.
If you are using an Ads API Client Library and Apache Log4j, please see below.

NIST has announced a recent vulnerability in the Apache Log4j library.

The Apache Log4j utility is a commonly used component for logging requests. On December 9, 2021, a vulnerability was reported that could allow a system running older Apache Log4j versions to be compromised.

What do you need to do?
If you are using an Ads API Client Library and affected Apache Log4j versions, please upgrade to the latest version as indicated in the Apache Log4j Security Vulnerabilities website.

If you have any questions or need additional help, contact us through this forum.

As part of Google’s effort to foster inclusivity in our products and communities, we will be changing the name of the default branch to main in the Google Ads API ...
As part of Google’s effort to foster inclusivity in our products and communities, we will be changing the name of the default branch to main in the Google Ads API client libraries. This change is a small but important step towards making diversity, equity, and inclusion central to our work on the Google Ads API.

This change won’t affect most client library users who access the libraries through a distribution platform like PyPi for Python or Maven for Java. Users who access the libraries directly from the default branch on GitHub should start using the new main branch once it’s available. We encourage contributors who own forks of these client libraries to update them accordingly.

If you have any questions about this change, please file an issue on the issues tracker for your client library of choice (like Python). As always, please feel free to contact us through the forum or at googleadsapi-support@google.com for additional help.


The Google Ads API Developer Relations team will be hosting a live webinar on Migrating to the Google Ads API, on June 16 at 10 AM EST (2 PM GMT).

The Google Ads API Developer Relations team will be hosting a live webinar on Migrating to the Google Ads API, on June 16 at 10 AM EST (2 PM GMT).

Agenda

This webinar helps AdWords API developers jumpstart their migrations to the new and improved Google Ads API. The webinar builds upon our Migration Guide, so we recommend reading that guide before watching this webinar. We will also host a Q&A at the end with members of the Google Ads Developer Relations and Engineering teams. The webinar will cover the following topics:
  • High level differences between the AdWords and Google Ads APIs
  • Migrating Reporting
  • Migrating Mutates
  • New & Improved Features
  • Migration Best Practices

Reminders

Feel free to add the event to your calendar. In addition, you can set a reminder for the event on YouTube by clicking the “Set reminder” button on the YouTube event page.

We look forward to sharing our knowledge of the Google Ads API with you and answering your questions. If you have any questions or need additional help, contact us via the forum or at googleadsapi-support@google.com.


The Google Ads API Developer Relations team will be hosting a live webinar covering Error Handling, Retry, and Timeouts, on June 3 at 10 AM EST (2 PM GMT).
The Google Ads API Developer Relations team will be hosting a live webinar covering Error Handling, Retry, and Timeouts, on June 3 at 10 AM EST (2 PM GMT).

Agenda

The webinar will cover the topics below and include code walkthroughs to demonstrate how to perform different actions with the Google Ads API client libraries. We will also host a Q&A at the end with members of the Google Ads Developer Relations and Engineering teams.
  • Types of errors returned by the Google Ads API
  • Catching and deciphering Google Ads API errors
  • Identifying failed operations using partial failure mode
  • Setting HTTP timeouts
  • Best practices for retrying failed requests

Prerequisites

In order to get the most out of this webinar, we suggest you develop a basic understanding of the Google Ads API. To learn more, please visit our API Overview documentation or check out this Google Ads API Overview workshop from 2019. In addition, we strongly recommend that you install and configure one of our client libraries to follow along with the live coding examples.

Reminders

Feel free to add the event to your calendar. In addition, you can set a reminder for the event on YouTube by clicking the “Set reminder” button on the YouTube event page.

We look forward to sharing our knowledge of the Google Ads API with you and answering your questions. If you have any questions or need additional help, contact us via the forum or at googleadsapi-support@google.com.


On June 11, 2019 we deprecated support for Python 2 in the AdWords/Google Ad Manager client library for Python. As part of our previously announced plans, in mid-November 2019 we will be deprecating support in the Google Ads client library for Python as well.

When version 4.0.0 of the Google Ads client library for Python is released, we will officially end support for Python 2 and versions of Python 3 prior to 3.6.0.

If you use the Google Ads client library for Python, please take note of the following:
  • If you are already using Python version 3.6.0 or later, you can upgrade to Google Ads client library 4.0.0 and no other action is needed. If not, please do not upgrade to version 4.0.0 until you’ve upgraded to Python version 3.6.0 or later.
  • Version 4.0.0 will continue to support previous API versions such as v1_3 but we won't support client library issues related to Python 2 compatibility. For example, we won't release version 4.0.1 to fix a bug that only exists for Python 2 users.

If you have questions about the Python 3 migration, please submit an issue on the Google Ads client library repository’s Issues page, and for general API support please reach out to us on the Google Ads API forum.


We have heard from users that correctly configuring a client library and provisioning OAuth2 credentials can be challenging, so today we are introducing Google Ads API Doctor, a new tool that will analyze your client library environment. The program will:
  • Verify that your OAuth2 credentials are correctly configured and ready to make API calls.
  • Guide you through fixing any OAuth2 problems it detects and verify the corrected configuration.
The initial version of this tool will help you analyze and fix issues related to OAuth2 configuration, including the following common issues:
  • Invalid refresh token: The program will identify this and guide you through the process to obtain a valid token, back up your configuration file, and write the new value to your active configuration file.
  • Permission denied: There are several OAuth errors that sound similar, such as user permission denied and permission denied. The program identifies that in the first case it is caused by an invalid refresh token and in the second it’s because the Google Ads API is disabled in the Google API Console.
If you want to send the output to support, you can run your scenario with the PII flag to hide your Personally Identifiable Information (PII) and copy the screen output. To gather even more information, you can use the verbose flag to see the low-level JSON that is returned.

We are releasing this project as open source per Google’s open source initiative, and we encourage contributions. See contributing to Google open source to learn more about how to contribute to this project. As always, share your feedback on the Google Ads API forum.

Update (Jun 12): Python client library for Google Ads API v20.0.0 is now available on GitHub.

As the official End of Life date for Python 2 approaches, we will be ending support for Python 2 in both the AdWords/Google Ad Manager and Google Ads Python client libraries in 2019. After deprecation the minimum required Python version for both libraries will be 3.6+.

Deprecation will begin with the AdWords/Google Ad Manager Python client library in May. Here’s a timeline for easy reference:
  • mid-May: version 19.0.0 is released to support Google Ad Manager API v201905. Python 2 users should not upgrade to any major version beyond this.
  • mid-May - late-June: Python 2 deprecation window.
  • Last week in June: version 20.0.0 is released that is incompatible with Python 2.
  • July 1: Support for Python 2-related issues in the library ends.
If you are a user of the AdWords/Google Ad Manager client library, please take note of the following:
  • Google Ad Manager Users:
    • If you’re already using Python 3, no need to take action.
    • If you’re using Python 2 you should remain on version 19.0.0 until you’ve migrated to Python 3.
  • AdWords Users:
    • Please migrate to the new Google Ads API.
    • If you’re using Python 2 you should remain on version 19.0.0 until you’ve migrated to the Google Ads API.
  • All Users:
    • Beginning July 1, 2019 we will discontinue prioritizing work and triaging GitHub Issues related to compatibility with Python 2. Note that we will submit patches to version 19.0.0 if any major bugs arise after this deadline.
The Google Ads API client library will continue to be compatible with Python 2 until the end of 2019. We will post more information about that migration at a later date. In the meantime, Python 2 users should start planning their migration to Python 3 as soon as possible in order to avoid complications.

If you have questions about the Python 3 migration please submit an issue on the respective GitHub repository, and for general API support please reach out to us on the Google Ads API forum or the Google Ad Manager API forum.

Starting on July 1, 2018, all releases of the Google Ads API Client Library for Java will only be compatible with Java 8 (1.8) and higher.

Why this change is happening
The primary reasons for this change are:
Next steps
If you are using Java 8 or higher, no action is required.

If you are still using Java 7, you'll have to migrate your runtime to Java 8 or higher. Check out the Java 8 adoption guide from Oracle to get started.

Still have questions? Feel free to file an issue on the library's issues page or contact us via our Google+ page.

Beginning in , all new releases of the Google Ads API .NET client library will target .NET Framework 4.5.2+. Currently released client library versions will not be affected.

Why are runtime requirements changing?

Beginning in November 2016, all new releases of the Google Ads API .NET client library will target .NET Framework 4.5.2+. Currently released client library versions will not be affected.

Why are runtime requirements changing?

On January 12th, 2016, Microsoft ended support for .NET Framework versions 4, 4.5, and 4.5.1. To ensure the continued security and stability of our client library, we will also stop supporting these legacy framework versions.

Additionally, increasing the runtime requirement allows us to make use of new framework functionality, to further improve and modernize the library.

How can you prepare?

If your application currently targets .NET Framework 4.5.2+, then no action is required. Users of .NET Framework versions <= 4.5.1 will need to upgrade to 4.5.2 in advance of the November 2016 release. Users on non-Windows platforms should similarly ensure that their version of Mono supports the .NET Framework 4.5.2 target.

If you have any questions or concerns, feel free to open an issue on the client library's issue tracker.

After November 2016, all releases of the Google Ads API Java Client Library will only be compatible with Java 7 (1.7) and higher.

Why this change is happening
The primary reasons for this change are:
Next steps
If you are using Java 7 or higher, then no action is required.

If you are still using Java 6 then you'll have to migrate your runtime to Java 7 or higher. Check out the Java 7 adoption guide from Oracle to get started.

Still have questions? Feel free to file an issue on the library's issues page or contact us via our Google+ page.

What's changing?

We’ve updated the runtime requirements of some of our client libraries. Make sure to update your setup to keep your application compatible and secure.

Which libraries are affected?

.NET

As announced in 2014, the .NET client library requires a minimum of Microsoft .NET Framework 4.0 or Mono version 3.2.8.

Java

As announced in 2014, the Java client library now requires Java 1.6 or higher.

Perl

  • With the release of version 4.0.0 of the AdWords API Perl client library, the minimum version supported is Perl version 5.14.
  • AdWords API Perl client library version 3.5.0 supports Perl 5.8 and will continue to be supported until September with critical bug fixes only.
We updated the minimum required Perl version to 5.14 because the Perl community no longer officially supports the older versions of the language, and our client library relies on CPAN modules that no longer exist for older versions of Perl. With the installation of client library version 4.0.0, please make sure you use Perl 5.14 or newer on your system.

PHP

As announced in 2014, the PHP client library now requires PHP 5.3 or higher.

Python

Depending on whether you’re using Python 2 or 3, the Python client library has differing minimum requirements:
  • Python 2: Requires Python 2.7.9 or higher because this is the earliest version supporting SSL certificate validation.
  • Python 3: Requires Python 3.4 or higher for compatibility with the oauth2client dependency.
Ruby

The Ruby client library has dropped support for Ruby versions 1.8, 1.9, and 2.0, and we will no longer be fixing bugs specifically for those versions.

If you have any question or concerns, visit us on the forums (AdWords API, DoubleClick for Publishers API, DoubleClick Ad Exchange Buyer API), our Google+ page, or a library-specific issue tracker.

Are you using the Google Ads API Java Client Library and Java 5 (1.5)? If so, we have important news: starting April 2015, all releases of the Google Ads API Java Client Library will only be compatible with Java 1.6 and higher.

Why this change is happening
The primary reasons for this change are: Next steps
If you are using Java 6 or higher, then you're all set -- all releases of the client library on github already support your runtime.

If you are still using Java 5 and need to migrate to Java 6 or higher, check out the following adoption guides from Oracle: Still have questions? Feel free to file an issue on the library's issues page or contact us via our Google+ page.

As you may know, we announced the release of our new Python client library—googleads—in March, 2014. Since then, we’ve received a lot of feedback that has helped us further improve the library. Given the positive reception we’ve had with googleads, along with the improvements we’ve made to it over the past few months, the time is right for us to give our legacy Python client library—adspygoogle—a proper send-off. The legacy ads APIs Python client library has been deprecated and will be sunset on January 5th, 2015.

Between now and the sunset date, all upcoming API releases will be supported. The legacy client library will no longer be available on GitHub or PyPI after the sunset date. You can continue to use it while supported versions of the APIs are available, but it will eventually become obsolete and won’t be supported if any new issues are discovered. In order to smoothly transition to the new client library and have uninterrupted access to the newest versions of the APIs, we suggest you migrate to googleads as soon as possible. To help you migrate, we’ve prepared a migration guide.

If you discover any bugs, would like to contribute, or have feature requests for googleads, feel free to let us know via the library’s issue tracker. If you have any questions or feedback for us, you can reach us on the Google Ads Developers Google+ page.

We have made a few changes to the Ads API .NET client library to allow better maintenance and support.

Unified repository

For ease of maintenance and to reduce duplication, we have combined the AdWords, AdXBuyer, DFP and DFA API .NET libraries into one repository: https://github.com/googleads/googleads-dotnet-lib

Going forward, please use the new repository for downloading Ads API .NET client library releases, reporting issues, requesting features, and providing source contributions.

We have updated wiki articles, consolidated open issues, and imported source code of past releases.

New runtime requirement

We have increased the runtime requirement for the client library to Microsoft .NET Framework 4. This upgrade allows us to enhance the library using features available in newer versions of the Microsoft .NET framework, while moving away from .NET 2.0, which is past its mainstream support period.

In case you are still using Microsoft .NET Framework 2.0, you may continue using the legacy library until July 1st, 2015, at which time we will stop providing bug fixes and enhancements to the library. Major feature enhancements and support of newer versions of the APIs will be limited to the newer library that uses Microsoft .NET Framework 4.

Updates to version numbers

We have updated the version number of the Ads API .NET client library to 18.0.0. The Common library version has been updated to 3.0.0. Going forward, all the API-specific client library assemblies will share a single version number, while the Common library will continue to maintain its own version number.

The legacy library assemblies will only have minor releases, and will use the following versioning scheme on both Github and Nuget:
  • Google.Ads.Common: 2.x
  • Google.AdWords: 17.x
  • Google.Dfp: 7.x
  • Google.Dfa: 5.x
If you have questions or feedback, let us know on our forum or our Google+ page.

Since its launch in 2010, the Google Content API for Shopping has played a critical role in enabling merchants to manage product items, users, and subaccounts programmatically at scale. We’ve received a lot of feedback from you over the years, and today, we’re happy to announce a new version of this API.

Since its launch in 2010, the Google Content API for Shopping has played a critical role in enabling merchants to manage product items, users, and subaccounts programmatically at scale. We’ve received a lot of feedback from you over the years, and today, we’re happy to announce a new version of this API.

The Content API version 2:

  • introduces new core functionality, including item-level data quality information, simple inventory updates, and additional account management features
  • is easier to use thanks to high quality client library support, improved tooling, reference documentation and integration with Google’s common API infrastructure
  • has simplified request and response message formats, and now also supports JSON in addition to XML encoding

Version 2 of the API constitutes a big overhaul and we’re eager for you to try it! Version 1 of the API will continue to be available until the end of February 2015, but we recommend that you adopt the new version as early as possible to take advantage of its new and improved features.

New core functionality: Data quality, inventory and account management

In version 2 of the API, you can request full data quality reporting for the whole account as well as item-level information like disapprovals due to incorrect prices or unavailable landing pages.

The inventory service lets you update price and availability of any product without resubmitting other product details.

All existing account management features, such as linking AdWords accounts, adding authorized users, and updating settings are now available for all account types.

Client libraries, better tooling and more

If you don’t want to parse JSON or XML yourself, check out the client libraries for .NET, Dart, Go, Java, JavaScript, Objective-C, PHP, Python and Ruby. The libraries use OAuth 2.0 authorization and work with the Content API as well as many other Google APIs.

The standard Google API tools such as the API console support Content API version 2 out of the box. Additionally, in our API reference documentation, you can now scroll down to the bottom of any reference page to try the API. You can also visit the standalone API Explorer to browse a list of supported operations.

Simplified message formats

The new XML format is lighter than in version 1 of the API. JSON, which is both simpler to work with and uses fewer bytes to transfer the same data, is also supported in version 2.

Learn more

If you would like to learn more about the Content API version 2 you can check out the API documentation. We’ve also prepared a few code examples in PHP and Java if you would like to dive in straight away.

If you have any other questions or comments, please head over to our support forum.

The Ads APIs Python client library, adspygoogle, has been around for quite some time, supporting versions of Python as old as 2.4 but capping out at 2.7. We’ve been getting more and more feedback recently that our users want Python 3 support. Also, many of adspygoogle’s dependencies are dated and no longer officially supported. We heard you, and with these items in mind...

The Ads APIs Python client library, adspygoogle, has been around for quite some time, supporting versions of Python as old as 2.4 but capping out at 2.7. We’ve been getting more and more feedback recently that our users want Python 3 support. Also, many of adspygoogle’s dependencies are dated and no longer officially supported. We heard you, and with these items in mind...

A New Client Library

A completely new client library — googleads — is now available for Python 3 as well as Python 2.7. The new library has several advantages over our existing library:

  • Most of your code from the previous Python library will work with minimal modifications, listed below and in our migration guide.
  • The dependencies are all hosted on PyPI, so you do not need to use the --allow-external or --allow-unverified flags at install.
  • The constructors and attributes in the new library give you more control over client objects; for example, you can easily switch out OAuth 2.0 credentials and manage multiple accounts.
  • Data types are retained. Whereas adspygoogle uses strings for everything, googleads can send and receive numbers, booleans, datetimes, etc.
  • The library is more integrated with the Python standard library; for example, you can use the built-in logging framework to log SOAP messages.
  • The library is built on top of a fork of suds and allows users who are familiar with suds to take advantage of that library’s features.

Migrating to the New Client Library

Existing Python users can retain almost all of their logic working with the objects defined in our APIs. An important difference is that your responses from the API are now objects returned by suds instead of dictionaries. The objects support using dictionary syntax to retrieve values but you cannot use dictionary methods on them. Most importantly, this means that .get() and .update() are no longer supported. Where in adspygoogle you may have done this:

response = inventory_service.GetAdUnitsByStatement(statement.ToStatement())[0] ad_units = response.get('results')

You will now need to do this:

response = inventory_service.getAdUnitsByStatement(statement.ToStatement()) ad_units = response['results'] if 'results' in response else None

Some more minor changes that need to be made include changing your code to use the new methods for instantiating client and service objects and using the exact method names from our APIs, which are generally lower camel case.

For more information on migration, check out the migration guide we have posted in the new library’s wiki section.

The googleads library will be the primary focus of development moving forward. The existing adspygoogle library is now in maintenance mode but we will continue to add support for new AdWords and DFP API releases through December, 2014.

If you find any bugs, have a patch to contribute or just a feature request, please feel free to file an issue on the issue tracker.