Hey yall.
As the title suggests, I want to build a query which returns the date when the total cost of an account was greater than or equal to a certain value.
So far, I have made this: $query = 'SELECT campaign.start_date FROM campaign WHERE metrics.cost_micros >= 700 LIMIT 1'; which isn't right, as it doesn't return the date where $700 were spent, but rather the start date of the campaign that surpassed $700.
Thank you in advance
Hello,
Thanks for reaching out to the Google Ads API Team.
I understand that you want to obtain the date when you spent $700. I would like to suggest adding segments.date to your query to segment your result for by day. Kindly refer to the provided segmentation guide as this will explain how segmentation will affect the data that you are pulling. Please also refer to the campaign query builder and query validator to create and validate your query.
If you have further data that you want to retrieve via the Google Ads API, then you may send us the uncropped Google Ads UI screenshot as the API mirrors the UI so our team can provide precise recommendations
I hope this information is helpful.
![]() |
Google Ads API Team |