Hi, I have been using Adwords API with Python to fetch some numbers, all 
the metrics are correct (impressions & clicks) except for the costs. The 
costs always end with 4 zeros and no separator for decimals. 

Below is the result I got (last column is the real cost I pulled from 
Adwords interface as reference):


<https://lh3.googleusercontent.com/-NR0VyOEBHqA/Wbf_4NFBvUI/AAAAAAAAGd4/KyoJt8ufkjYbVcAuj7rpx7kYxfpI1AeXwCLcBGAs/s1600/Picture.png>











Below I attached the python code I was using, would be great if you could 
take a look and give me some advice: 

Thanks!!!

import sys
from googleads import adwords


def main(client):
  # Initialize appropriate service.
  report_downloader = client.GetReportDownloader(version='v201708')

  # Create report query.
  report_query = ('SELECT CampaignId, AdGroupId, Id, Criteria, CriteriaType, '
                  'FinalUrls, Impressions, Clicks, Cost '
                  'FROM CRITERIA_PERFORMANCE_REPORT '
                  'WHERE Status IN [ENABLED] '
                  'DURING LAST_7_DAYS')

  # 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()

  main(adwords_client)

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
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/3a9b9a4e-6098-4329-90be-9b4250d146d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Why cost export... Rui Song
    • Re: Why co... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum

Reply via email to