Adwords reports with Custome dates (Python)

123 views
Skip to first unread message

Sergei S

unread,
Aug 27, 2018, 4:53:51 PM8/27/18
to AdWords API and Google Ads API Forum
Hi,

I'm trying to get a report for custom dates with the following query:
  report_query = (adwords.ReportQueryBuilder()
                  .Select(
                    'CampaignName',
                    'AdGroupName',
                    'Url',
                    'Impressions',
                    'Clicks',
                    'Cost'
                    )
                    .From('URL_PERFORMANCE_REPORT')
                    .Where('Status').In('ENABLED', 'PAUSED')
                    .During('20180801','20180802')
                    .Build())

I can't figure out how do i set a custom date, tried all possible variations from what i could find online.

What am i doing wrong?

Thanks!

Luis Xander Talag (AdWords API Team)

unread,
Aug 28, 2018, 1:38:12 AM8/28/18
to AdWords API and Google Ads API Forum
Hi Sergei,

Since you are using the Python client library, the implementation here is quite different for setting up the date range. Could you try using the below code snippet instead?

.During(start_date='20180801', end_date='20180802')

Let me know if it works.

Thanks and regards,
Luis
AdWords API Team 

Sergei S

unread,
Aug 28, 2018, 5:27:29 AM8/28/18
to AdWords API and Google Ads API Forum
Thanks, works perfectly!
Reply all
Reply to author
Forward
0 new messages