How to get and update campaign budget via API

99 views
Skip to first unread message

Laurie McIntosh

unread,
Feb 6, 2020, 5:36:39 PM2/6/20
to AdWords API and Google Ads API Forum
Hi there,

What I'm REALLY trying to do is, day by day, run or NOT run (activate or deactivate, spend budget or NOT spend budget) a campaign based on certain operational criteria. Using python.

I can connect to the API and get campaign details. I'm just working out the best way to (daily) turn a particular campaign off or on. One suggestion is, set the budget to $0.01 ($1, $0, whatever) to turn it off, set it to $1000 to turn it on. Another way would be to set campaign to Active True or False.

I'm told the Active/Inactive has performance issues. Hence the budget idea. But can't see where the Budget (or I suspect, the Average Daily Budget) is stored.

Basically, I'm trying to, like flicking a light switch, make a campaign (effectively) active or inactive by setting a parameter via the API.

Any ideas?

Cheers,

---=L

Google Ads API Forum Advisor Prod

unread,
Feb 7, 2020, 2:30:08 PM2/7/20
to laurie....@mimeanalytics.com, adwor...@googlegroups.com

Hi Laurie,

Thank you for reaching out. From the shared details, what I understand is that you are trying to enable or disable campaigns based on certain parameters via API and you are looking to set this status based on the budget of the campaign. Could you please confirm if my understanding is correct? If yes, you need to implement the logic on your end to use mutate method of CampaignService to enable or pause campaign by setting the status field of campaign based on the budget field where you can use the amount field as predicate which will give you the average daily budget amount. Let me know if this clarifies your concerns.

Regards,
Nikisha Patel, Google Ads API Team



ref:_00D1U1174p._5001UV07iH:ref
Reply all
Reply to author
Forward
0 new messages