AdSchedule in Google Ads API

117 views
Skip to first unread message

cv

unread,
Feb 18, 2021, 2:48:04 PM2/18/21
to AdWords API and Google Ads API Forum
Hello,

I can see that ALL_TIME is not available in Google Ads API.

I need that in case If I need to get AdSchedule.or IP Blocks Information.

How I can get all time Ip blocks or adschedule data using google Ads api.

Thanks,

Google Ads API Forum Advisor Prod

unread,
Feb 19, 2021, 7:52:24 AM2/19/21
to chirag....@gmail.com, adwor...@googlegroups.com

Hi there,

Thank you for raising this to us.

As per this Date Ranges guide, I'm afraid that the ALL_TIME range is still not supported as part of the predefined date ranges. That said, allow me to raise a feature request for this; however, there is no guarantee if this will be supported soon. In the meantime, please follow our blog for updates and new releases.

Regards,

Google Logo
Mark Kevin Albios
Google Ads API Team
 


ref:_00D1U1174p._5004Q2CSTE8:ref

cv

unread,
Feb 19, 2021, 9:09:51 AM2/19/21
to AdWords API and Google Ads API Forum
Hi Mark,

Thanks.

If I not pass any date range, does that equivalent to ALL_TIME data based on filters passed?
To more specific If I need to have AdSchedule does that return all current AdSchedule if I not pass any dates?



Thanks,

Mat

unread,
Feb 19, 2021, 11:43:08 AM2/19/21
to AdWords API and Google Ads API Forum
Hi cv,

you could check if a very old segments.date raises any errors and if that error message delivers any insights into the date limits you can use. Example

segments.date >= '1970-01-01' AND segments.date <= '2021-02-18'
(00:00:00 UTC on 1 January 1970 is the "Unix epoch")

or 

segments.date BETWEEN '2000-10-23' AND '2021-02-18'
(Google AdWords was launched on October 23, 2000)

Regards
Mat

cv

unread,
Feb 19, 2021, 2:21:15 PM2/19/21
to AdWords API and Google Ads API Forum
Hello Mat,

Thanks for message.

In this case 'segments.date'(could not support requested resources: 'CAMPAIGN_CRITERION')

So what I can do here?
I am not getting ALL_TIME data or data is there in Account.


Thanks,

Google Ads API Forum Advisor Prod

unread,
Feb 22, 2021, 5:23:16 AM2/22/21
to chirag....@gmail.com, adwor...@googlegroups.com
Hi,

Unfortunately, it would not be possible to use/include segments and metrics fields in the campaign_criterion view. 

You should be able to retrieve all the current campaign criteria associated to your campaigns via the said report, without specifying a date range.

Thanks,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2CSTE8:ref

cv

unread,
Feb 23, 2021, 4:33:05 AM2/23/21
to AdWords API and Google Ads API Forum
HI Peter,

How I can get those ALL_TIME Data which can match with Google Adwords API campaign criteria performance report?

Thanks,

cv

unread,
Feb 23, 2021, 1:00:36 PM2/23/21
to AdWords API and Google Ads API Forum
HI,

I specifically looking at criteria. Old Adwords API is giving AdSchedule data but Google Ads API is not providing any.

Thanks,

Message has been deleted

cv

unread,
Feb 23, 2021, 2:24:12 PM2/23/21
to AdWords API and Google Ads API Forum
Hi,

I am getting Data using this

Adwords API
           $campaignCriterionService = (new AdWordsServices )->get($session, CampaignCriterionService::class);     
            $selector = new Selector();                                  
            $selector->setFields(['CampaignId','DayOfWeek', 'StartHour', 'EndHour', 'CampaignCriterionStatus']);

            $selector->setPredicates([
                new Predicate('CriteriaType', PredicateOperator::IN, ['AD_SCHEDULE']),
                new Predicate('CampaignCriterionStatus', PredicateOperator::IN, ['ACTIVE'])]);

But Not Similar response using Google Ads API

I tried both campaign_criteria and ad_schedule_view, but returned 0 results.

I have done like this in Google Ads API

SELECT campaign.id, campaign_criterion.ad_schedule.day_of_week, campaign_criterion.ad_schedule.end_hour, campaign_criterion.ad_schedule.start_hour, campaign_criterion.status FROM ad_schedule_view  WHERE campaign_criterion.type IN (AD_SCHEDULE) AND metrics.impressions >= 0

SELECT campaign.id, campaign_criterion.ad_schedule.day_of_week, campaign_criterion.ad_schedule.end_hour, campaign_criterion.ad_schedule.start_hour, campaign_criterion.status FROM campaign_criterion  WHERE campaign_criterion.type IN (AD_SCHEDULE) 


Thanks,




Google Ads API Forum Advisor Prod

unread,
Feb 23, 2021, 4:22:54 PM2/23/21
to chirag....@gmail.com, adwor...@googlegroups.com
Hello,

Can you please share your client customer Id privately so we can take a closer look?

Thanks,
Anthony

Google Logo
Anthony
Google Ads API Team
 

 

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