ReportService

ReportService enables AdSense API developers to generate the same reports as can be viewed online on the AdSense website.

Generating an AdSense Report

To generate an AdSense report, use the generateReport operation, passing in the report that defines what you want to generate:

The response to generating a report is a ReportData object, which holds the result data as a string. The format of this data is in the output format specified by the report passed in, currently only CSV_Excel. For convenience, ReportData also holds the number of rows and columns in the report. ReportData is restricted to the date range specified in the report passed in, plus any channel, unit (such as Page, Ad, or TargetingType) or referral product (such as AdSense or Firefox). The report can also specify that the data be grouped, such as by date, channel or referral product.

Note that two fields, dateRange and outputFormat, are shared by all reports (as they are inherited from a hidden Report object.)

The version 2 WSDL for this service is at https://www.google.com/api/adsense/v2/ReportService?wsdl.

The version 3 WSDL for this service is at https://www.google.com/api/adsense/v3/ReportService?wsdl.

Requests

generateReport

Gets report data from the database and returns it in a ReportData.

Parameters

Parameter nameParameter typeParameter description
report Report

Response

Response typeResponse description
ReportData the generated data as a string.

Errors

Error numberError description
801 if the report is missing or invalid.
802 if the output format of the report is not supported.
803 if the date range of the report is invalid.
804 if the date range of the report is not allowed for this type of report.
805 if there is no syndication service for this report type.
806 if the display unit of the report is invalid.
807 if the grouping of the report is invalid.
808 if, in case of a channel report, there are no channels specified.
809 if too many channel IDs were specified.
810 if one of the channel IDs does not refer to a known channel, in case of a channel report.
811 if a channel ID was specified twice.
812 if, in case of a ReferralProductReport, no products were specified.
813 if one of the referral products specified for a ReferralProductReport is invalid.
814 if one of the referral products specified for a ReferralProductReport is specified more than once.