Hi Gábor,
Thanks for reaching out. Yasmin here from the Google Ads Scripts team.
Could you please confirm which entity you're trying to retrieve? Is it the account's budget you are looking for? It would be much appreciated if you could provide a screenshot so we're able to further check on our end and assist you properly.
Kindly send the requested information via `Reply privately to author` option. If the said option is not available on your end, you may send it through the email alias `googleadsscr...@google.com` instead.
Best regards,
|
||||||
Hi,
Thank you for reaching out to the Google Ads Scripts support team.
@Nils - Thank you for providing the solution for the user’s issue.
I would like to inform you that the method “getBalance()” you are using is not a valid one to retrieve the cost. I would suggest that you replace the code with “var accountBalance = account.getStatsFor("ALL_TIME").getCost();”. This will retrieve the cost of the account till now. If you want to get the cost for a specific date range, I would suggest you refer to this document.
I hope this helps! Kindly get back to us if you still face any issues.
![]() |
Google Ads Scripts Team |