Adwords API Reports

54 views
Skip to first unread message

Construtiva Sis

unread,
Sep 17, 2015, 3:18:18 PM9/17/15
to AdWords API Forum
Good afternoon, today when I ask report adwords he performs downloading, but I wanted to fetch the data as campaign name and saves this value to display in an html but do not know if you are doing this, and what way.

example:

Selector selector selector = new ();
             selector.fields = new string [] {"CampaignId", "CampaignName", "Clicks", "Cost"};

Take that data and store pair sampled in a html page and not download as it is today ...

Umesh Dengale

unread,
Sep 17, 2015, 4:02:40 PM9/17/15
to AdWords API Forum
Hello,

In the AdWords API, the reports could be downloaded only in these supported formats. You need to process the report file (e.g. report downloaded as the XML file.) to display report data in the HTML. Please check out reporting basic guide for more details.

Thanks,
Umesh, AdWords API Team.

Construtiva Sis

unread,
Sep 17, 2015, 4:14:13 PM9/17/15
to AdWords API Forum
Hi Umesh,

Today i do this:

  try
            {
                ReportUtilities utilities = new ReportUtilities(user, "v201506", definition);
                using (ReportResponse response = utilities.GetResponse())
                {
                    response.Save(filePath);
                }
            }
            catch (Exception ex)
            {
                throw new System.ApplicationException("Failed to download report.", ex);
            }
            Response.AddHeader("content-disposition", "attachment;filename=report.gzip");
            Response.WriteFile(filePath);
            Response.End();
        }

Then i have a download of Report but i want the Example(CampaignID) in the html, how i can get XML of response with data that I requested? 

Thanks.

Umesh Dengale

unread,
Sep 18, 2015, 9:32:16 AM9/18/15
to AdWords API Forum
Hello,

You could download the report in XML format by setting the DownloadFormat.XML and change report download file extension to XML (e.g. report.xml). Please check out our DownloadCriteriaReport or DownloadCriteriaReportWithAwql example code from Java client library.
Reply all
Reply to author
Forward
0 new messages