pythongoogle-ads-api

Upgrading Google Ads API to v14


I was using Google Ads API v12 in python until today (28/08/2023). It's now deprecated and I'm not able to pull data from v13 or v14. Can someone help? My script is very similar to the one on the google documentation. Here they are simply replacing the version number and have

googleads_client = GoogleAdsClient.load_from_storage(version="v14")

https://developers.google.com/google-ads/api/samples/get-account-hierarchy?hl=it#python

Making no changes to this script and running it on my computer I have the following error:

ModuleNotFoundError: No module named 'google.ads.googleads.v14'
ValueError: Specified Google Ads API version "v14" does not exist. Valid API versions are: "v8", "v7"

I have the following packages installed: google-ads 14.0.0 and googleads 39.0.0

Thank you


Solution

  • I had the same problem and was able to solve it by updating all python libraries related to the google api to the newest version:

    google-ads==22.0.0
    google-analytics-data==0.17.1
    google-api-core==2.12.0
    google-api-python-client==2.101.0
    google-auth==2.23.1
    google-auth-httplib2==0.1.1
    google-auth-oauthlib==0.8.0
    googleapis-common-protos==1.60.0