How to add date range filter dropdown for Adwords Report using API ??

25 views
Skip to first unread message

v

unread,
Jun 13, 2017, 12:34:36 AM6/13/17
to AdWords API Forum
Hi ,

 I used Ad words API (v201702) and need to implement date drop-down for ad words different performance shown as report.png attachment. When select any value from date drop-down then change all report value as like in ad words account..how its done ??
report.png

Ivan Bautista

unread,
Jun 13, 2017, 3:41:36 AM6/13/17
to AdWords API Forum
Hi,

These are the supported date ranges, which includes setting a custom date range (ex. May 01, 2017 to May 02, 2017), that you can include in your drop-down list to filter your generated reports.

You may trigger the generation of the filtered report upon selection of a particular date range in your drop down. However, creation of a drop-down with a selection of date ranges is not available in the AdWords API. You have to do this on your end as the AdWords API is mainly for pulling and pushing data into your AdWords account.

Additionally, below is a sample code in java on how to set a custom date range via a selector.
Selector selector = new Selector();
DateRange date = new DateRange();
date.setMin("20170501");
date.setMax("20170502");
selector.setDateRange(date);
.....
ReportDefinition reportDefinition = new ReportDefinition();
....
reportDefinition.setDateRangeType(ReportDefinitionDateRangeType.CUSTOM_DATE);
Regards,
Ivan
AdWords API Team
Reply all
Reply to author
Forward
0 new messages