Campaign Budget Data Type Issue-Ads API

92 views
Skip to first unread message

Saurabh Suman

unread,
Feb 24, 2022, 5:42:47 AM2/24/22
to Google Ads API and AdWords API Forum
Hi Team,
    Earlier in Adwords API  we received campaign Budget in Long format  and we used to retrieve it as below . But now while migrating to Ads API we are unable to  save the campaign budget due to data type mismatch as Ads API is returning String. Please suggest.

Adwords API
campaign.getBudget().getAmount().getMicroAmount()

Ads API
campaign.getCampaignBudget()

Thanks,
Saurabh

Google Ads API Forum Advisor

unread,
Feb 25, 2022, 10:13:51 AM2/25/22
to saurabhs...@gmail.com, adwor...@googlegroups.com
Hi Saurabh,

Thank you for reaching out to the Google Ads API support team.

To investigate the issue further, could you please provide us with the complete logs (request and response with request-id) via the Reply privately to the author option?  Can you please share with screenshot to data type mismatch?

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Wygqg:ref

Saurabh Suman

unread,
Feb 28, 2022, 8:37:11 AM2/28/22
to Google Ads API and AdWords API Forum
Hi Team,
   In the  getAllCampaigns response we are getting the campaigns from which we are retrieving using getCampaignBudget method. We er not getting the budget amount.
campaign.getCampaignBudget()  - returns CampaignBudget :  customers/9752159705/campaignBudgets/1593117748

Google Ads API Forum Advisor

unread,
Feb 28, 2022, 11:57:55 PM2/28/22
to saurabhs...@gmail.com, adwor...@googlegroups.com
Hi Saurabh,

Thank you for providing more details to your concern.

I can see that you are receiving the resource name of your campaign budget instead of the campaign budget amount. With this, I would suggest using the campaign_budget report type and including the campaign_budget.amount_micros field.

Let me know if you have further questions.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Wygqg:ref

Bikram Bhuyan

unread,
Apr 13, 2022, 2:22:13 AM4/13/22
to Google Ads API and AdWords API Forum
Hello Saurabh,

I am trying to solve the above issue in extracting the budget amount. Could you please suggest how were you able to solve the issue in extracting the amount. I am also using Java Client. So any help on this is really appreciated.

Thanks,
Bikram.

Reply all
Reply to author
Forward
0 new messages