Adwords reporting using C#

346 views
Skip to first unread message

Scott Kay

unread,
Sep 21, 2015, 9:02:42 AM9/21/15
to AdWords API Forum
Hi,

Sorry, I am new to this. I would like to get the actual cost of a campaign and, if I can, cost for each ad group. I see that there is a ReportsUtility class. It looks like I can make a request for a Campaign Performance Report but I can't find any recent examples of how to make this call. My attempts at winging it have been feeble at best. Any concrete examples would be appreciated.

Thanks,
Scott

Umesh Dengale

unread,
Sep 21, 2015, 4:11:49 PM9/21/15
to AdWords API Forum
Hi Scott,

You could use the CAMPAIGN_PERFORMANCE_REPORT. Please check out our DownloadCriteriaReport or DownloadCriteriaReportWithAwql C# example code from .NET client library and you could use the similar approach for CAMPAIGN_PERFORMANCE_REPORT.


Cheers,
Umesh, AdWords API Team.

Alpine

unread,
Feb 7, 2017, 12:26:10 PM2/7/17
to AdWords API Forum
Hello, I am trying to do the same but in those examples always export the result to a file. I need to get as a object in c# to build my own object. 
I need to get campaigns with its performances, ads, keywords,
is there an example?

Thank you

Vishal Vinayak (Adwords API Team)

unread,
Feb 7, 2017, 2:20:01 PM2/7/17
to AdWords API Forum
Hi,

You can refer to this example in C# to stream the results of Criteria Performance Report. You can, similarly, use this syntax to generate performance stats for Keywords (Keywords Performance Report), Ad Groups (Adgroup Performance Report) and Ads (Ad Performance Report). The streamed output can then be converted into an object at run-time using a separate class in your project with getters/setters defined. 

Hope this helps.  Please revert if you have additional questions. 

Regards,
Vishal, AdWords API Team

Alpine

unread,
Feb 8, 2017, 4:46:41 AM2/8/17
to AdWords API Forum
Thank you,
sorry, maybe I am not an advanced developer. Could you give me an idea how to convert the stream to an object in C#?

Vishal Vinayak (Adwords API Team)

unread,
Feb 8, 2017, 11:26:29 AM2/8/17
to AdWords API Forum
Hi,

The only way to retrieve performance metrics via AdWords API is to download a report. As shown in the example shared in my previous response, you can retrieve required fields (essentially by downloading a report and reading it as a stream) and use those fields to construct your object. Unfortunately, you cannot retrieve performance metrics related data directly as an object via the API. 
Reply all
Reply to author
Forward
0 new messages