I need to have data based on Time

55 views
Skip to first unread message

cv

unread,
Nov 18, 2024, 3:02:04 AM11/18/24
to Google Ads API and AdWords API Forum
Hi,

I am in situation where I need to show data which are there in UI upto 1 hour before.
Is that possible to have data from last timestamp I fetched data for?

Can you please guide how I can do this based on times and not on date base.

I have already a system where I am fetching data upto yesterday.


Thanks,

Google Ads API Forum Advisor

unread,
Nov 18, 2024, 8:29:42 AM11/18/24
to chirag....@gmail.com, adwor...@googlegroups.com
Hi,

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

Kindly note that we cannot retrieve the data based on the last timestamp. Could you please confirm whether you want to retrieve the data based on the timestamps rather than dates ? 

You can retrieve the data from the segments.hour, I would recommend you to check this documentation for more information. You can try the following query:
SELECT segments.hour, campaign.name, campaign.id, metrics.clicks FROM campaign WHERE segments.hour = 1
You can try making a request using the Search or SearchStream by passing the customer Id. Also, you can use Query Builder to create your query and Query Validator to validate your query. 

If this is not what you are looking for, kindly provide us the uncropped UI screenshot of the Google Ads account and also highlight the fields based on hour segmentation that you require to retrieve via the API.

You can send the details via Reply privately to the author option, or direct private reply to this email.

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

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5


 


cv

unread,
Nov 19, 2024, 12:08:22 AM11/19/24
to Google Ads API and AdWords API Forum
Hi,

Kindly note that we cannot retrieve the data based on the last timestamp. Could you please confirm whether you want to retrieve the data based on the timestamps rather than dates ? 
-> I mean dates only.
For example I am in timezone where today date is 19 and according to API doc I can fetch data based on dates in this case I pass 19 as a date I might have lesser data as 19 date was running, so I might miss data for date 19. In my current system I was trying to update data only after day is over and 6 hours buffer in case any in valid clicks can be adjusted.

Now I need to see data near about it was seen in UI.

So in my case If I am selecting date as 19 I can see data upto last hour as in UI.

In your query I am adding another segments which will add more additional rows to response and makes no addition to response.

Thanks

Google Ads API Forum Advisor

unread,
Nov 19, 2024, 1:20:28 AM11/19/24
to chirag....@gmail.com, adwor...@googlegroups.com
Hi,

As mentioned earlier, we cannot retrieve data based on a timestamp. If you are still trying to retrieve it based on a timestamp, kindly provide us with the uncropped UI screenshot with a visible customer Id by highlighting the data that you are trying to retrieve using Google Ads API.

Meanwhile, I would recommend you refer to this Help Center article 'About data freshness' that helps to understand how fresh your statistics are.
Reply all
Reply to author
Forward
0 new messages