I found that the Recommendations result from Google Ads API always returns empty while on my dashboard I could see some recommendations are exists.
from google.ads.googleads.client import GoogleAdsClient
customer_id = "<redacted>"
credentials = {
"developer_token": "<redacted>",
"refresh_token": "<redacted>",
"client_id": "<redacted>",
"client_secret": "<redacted>",
"use_proto_plus": True,
"login_customer_id": "<redacted>",
}
print(f"Initializing Google Ads Client...")
client = GoogleAdsClient.load_from_dict(
credentials
)
googleads_service = client.get_service("GoogleAdsService")
query = f"""
SELECT
recommendation.campaign,
recommendation.resource_name
FROM recommendation"""
# Detects keyword recommendations that exist for the customer account.
response = googleads_service.search(customer_id=customer_id, query=query)
print(f"Recommendation Results: {response.results}")