GoogleAds API - Is there a way to retrieve the start date of a client's data?

22 views
Skip to first unread message

smac16

unread,
Jan 7, 2025, 7:30:41 PMJan 7
to Google Ads API and AdWords API Forum
Most questions receive a reply within 24 hours. We'll send you an email notification when this happens.

We execute the following query to fetch metrics on a monthly basis. 

SELECT metrics.cost_micros,metrics.impressions,metrics.clicks,metrics.all_conversions,metrics.search_budget_lost_impression_share,metrics.search_rank_lost_impression_share FROM customer WHERE segments.month = '{0}'

The problem is when we onboard a new client we want to fetch their historical data, how do we know when their data starts, is there a query we could use to fetch that? Because if I pass in a start date that is older than the data that exists I get a bad request error.  Thanks

Google Ads API Forum Advisor

unread,
Jan 7, 2025, 11:45:32 PMJan 7
to scottandre...@gmail.com, adwor...@googlegroups.com
Hi,

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

There is no feature in the Google Ads API that can help you fetch the date from when the data is available. You may check the corresponding report in the Google Ads UI and can fetch the data accordingly.

I executed the query that you provided at my end, and I am not encountering any error, though I passed a start date that is older than the data that exists. If the data is not available over the date range that you passed, the query returns an empty result but not an error.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vGro6:ref" (ADR-00280778)

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5



Reply all
Reply to author
Forward
0 new messages