Here's code I most copy from the
sample(https://developers.google.com/adwords/api/docs/samples/python/reporting#download-a-criteria-performance-report-with-awql)
import sys
from googleads import adwords
def main(client):
# Initialize appropriate service.
report_downloader = client.GetReportDownloader(version='v201809')
# Create report query.
report_query = (adwords.ReportQueryBuilder()
.Select('CampaignId', 'AdGroupId', 'Id', 'Criteria',
'CriteriaType', 'FinalUrls', 'Impressions', 'Clicks',
'Cost')
.From('CRITERIA_PERFORMANCE_REPORT')
.Where('Status').In('ENABLED', 'PAUSED')
.During('LAST_30_DAYS')
.Build())
# You can provide a file object to write the output to. For this
# demonstration we use sys.stdout to write the report to the screen.
report_downloader.DownloadReportWithAwql(
report_query, 'CSV', sys.stdout, skip_report_header=False,
skip_column_header=False, skip_report_summary=False,
include_zero_impressions=True)
if __name__ == '__main__':
# Initialize client object.
adwords_client = adwords.AdWordsClient.LoadFromStorage('googleads.yaml')
main(adwords_client)
After I ran the script, I got these info below:
"CRITERIA_PERFORMANCE_REPORT (Oct 8, 2018-Nov 6, 2018)"
Campaign ID,Ad group ID,Keyword ID,Keyword / Placement,Criteria Type,Final
URL,Impressions,Clicks,Cost
Total, --, --, --, --, --,0,0,0
Is that something I missed or type wrong?
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/9362302e-3b4a-4613-a662-201803d93cc2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.