Reports: request

Inserts a report request into the reporting system. Try it now .

Request

HTTP request

POST https://www.googleapis.com/doubleclicksearch/v2/reports

Authorization

This request requires authorization with the following scope:

Scope
https://www.googleapis.com/auth/doubleclicksearch

For more information, see the authentication and authorization page.

Request body

In the request body, supply data with the following structure:

{  
 "reportScope" 
 : 
  
{  
 "agencyId" 
 : 
  
  long 
 
 , 
  
 "advertiserId" 
 : 
  
  long 
 
 , 
  
 "engineAccountId" 
 : 
  
  long 
 
 , 
  
 "campaignId" 
 : 
  
  long 
 
 , 
  
 "adGroupId" 
 : 
  
  long 
 
 , 
  
 "keywordId" 
 : 
  
  long 
 
 , 
  
 "adId" 
 : 
  
  long 
 
  
} , 
  
 "reportType" 
 : 
  
  string 
 
 , 
  
 "columns" 
 : 
  
 [ 
  
{  
 "columnName" 
 : 
  
  string 
 
 , 
  
 "savedColumnName" 
 : 
  
  string 
 
 , 
  
 "customDimensionName" 
 : 
  
  string 
 
 , 
  
 "customMetricName" 
 : 
  
  string 
 
 , 
  
 "headerText" 
 : 
  
  string 
 
 , 
  
 "startDate" 
 : 
  
  string 
 
 , 
  
 "endDate" 
 : 
  
  string 
 
 , 
  
 "groupByColumn" 
 : 
  
  boolean 
 
 , 
  
 "platformSource" 
 : 
  
  string 
 
 , 
  
 "productReportPerspective" 
 : 
  
  string 
 
  
}  
 ], 
  
 "timeRange" 
 : 
  
{  
 "startDate" 
 : 
  
  string 
 
 , 
  
 "endDate" 
 : 
  
  string 
 
 , 
  
 "changedMetricsSinceTimestamp" 
 : 
  
  datetime 
 
 , 
  
 "changedAttributesSinceTimestamp" 
 : 
  
  datetime 
 
  
} , 
  
 "filters" 
 : 
  
 [ 
  
{  
 "column" 
 : 
  
{  
 "columnName" 
 : 
  
  string 
 
 , 
  
 "savedColumnName" 
 : 
  
  string 
 
 , 
  
 "customDimensionName" 
 : 
  
  string 
 
 , 
  
 "customMetricName" 
 : 
  
  string 
 
 , 
  
 "headerText" 
 : 
  
  string 
 
 , 
  
 "startDate" 
 : 
  
  string 
 
 , 
  
 "endDate" 
 : 
  
  string 
 
 , 
  
 "groupByColumn" 
 : 
  
  boolean 
 
 , 
  
 "platformSource" 
 : 
  
  string 
 
 , 
  
 "productReportPerspective" 
 : 
  
  string 
 
  
} , 
  
 "operator" 
 : 
  
  string 
 
 , 
  
 "values" 
 : 
  
 [ 
  
  ( 
 value 
 ) 
 
  
 ] 
  
}  
 ], 
  
 "orderBy" 
 : 
  
 [ 
  
{  
 "column" 
 : 
  
{  
 "columnName" 
 : 
  
  string 
 
 , 
  
 "savedColumnName" 
 : 
  
  string 
 
 , 
  
 "customDimensionName" 
 : 
  
  string 
 
 , 
  
 "customMetricName" 
 : 
  
  string 
 
 , 
  
 "headerText" 
 : 
  
  string 
 
 , 
  
 "startDate" 
 : 
  
  string 
 
 , 
  
 "endDate" 
 : 
  
  string 
 
 , 
  
 "groupByColumn" 
 : 
  
  boolean 
 
 , 
  
 "platformSource" 
 : 
  
  string 
 
 , 
  
 "productReportPerspective" 
 : 
  
  string 
 
  
} , 
  
 "sortOrder" 
 : 
  
  string 
 
  
}  
 ], 
  
 "includeDeletedEntities" 
 : 
  
  boolean 
 
 , 
  
 "includeRemovedEntities" 
 : 
  
  boolean 
 
 , 
  
 "verifySingleTimeZone" 
 : 
  
  boolean 
 
 , 
  
 "downloadFormat" 
 : 
  
  string 
 
 , 
  
 "statisticsCurrency" 
 : 
  
  string 
 
 , 
  
 "startRow" 
 : 
  
  integer 
 
 , 
  
 "rowCount" 
 : 
  
  integer 
 
 , 
  
 "maxRowsPerFile" 
 : 
  
  integer 
 
}
Property name
Value
Description
Notes
reportScope
object
The reportScope is a set of IDs that are used to determine which subset of entities will be returned in the report. The full lineage of IDs from the lowest scoped level desired up through agency is required.
reportScope. agencyId
long
DS agency ID.
reportScope. advertiserId
long
DS advertiser ID.
reportScope. engineAccountId
long
DS engine account ID.
reportScope. campaignId
long
DS campaign ID.
reportScope. adGroupId
long
DS ad group ID.
reportScope. keywordId
long
DS keyword ID.
reportScope. adId
long
DS ad ID.
reportType
string
Determines the type of rows that are returned in the report. For example, if you specify reportType: keyword , each row in the report will contain data about a keyword. See the Types of Reports reference for the columns that are available for each type.
columns[]
list
The columns to include in the report. This includes both DoubleClick Search columns and saved columns. For DoubleClick Search columns, only the columnName parameter is required. For saved columns only the savedColumnName parameter is required. Both columnName and savedColumnName cannot be set in the same stanza.

The maximum number of columns per request is 300.

columns[]. columnName
string
Name of a DoubleClick Search column to include in the report.
columns[]. savedColumnName
string
Name of a saved column to include in the report. The report must be scoped at advertiser or lower, and this saved column must already be created in the DoubleClick Search UI.
columns[]. headerText
string
Text used to identify this column in the report output; defaults to columnName or savedColumnName when not specified. This can be used to prevent collisions between DoubleClick Search columns and saved columns with the same name.
columns[]. startDate
string
Inclusive date in YYYY-MM-DD format. When provided, this overrides the overall time range of the report for this column only. Must be provided together with endDate .
columns[]. endDate
string
Inclusive day in YYYY-MM-DD format. When provided, this overrides the overall time range of the report for this column only. Must be provided together with startDate .
columns[]. groupByColumn
boolean
Synchronous report only. Set to true to group by this column. Defaults to false .
timeRange
object
If metrics are requested in a report, this argument will be used to restrict the metrics to a specific time range.
timeRange. startDate
string
Inclusive date in YYYY-MM-DD format.
timeRange. endDate
string
Inclusive date in YYYY-MM-DD format.
timeRange. changedMetricsSinceTimestamp
datetime
Inclusive UTC timestamp in RFC format, e.g., 2013-07-16T10:16:23.555Z . See additional references on how changed metrics reports work.
timeRange. changedAttributesSinceTimestamp
datetime
Inclusive UTC timestamp in RFC format, e.g., 2013-07-16T10:16:23.555Z . See additional references on how changed attribute reports work.
filters[]
list
A list of filters to be applied to the report.

The maximum number of filters per request is 300.

filters[]. column
nested object
Column to perform the filter on. This can be a DoubleClick Search column or a saved column.
filters[].column. columnName
string
Name of a DoubleClick Search column to include in the report.
filters[].column. savedColumnName
string
Name of a saved column to include in the report. The report must be scoped at advertiser or lower, and this saved column must already be created in the DoubleClick Search UI.
filters[]. operator
string
Operator to use in the filter. See the filter reference for a list of available operators.
filters[]. values[]
list
A list of values to filter the column value against.

The maximum number of filter values per request is 300.

orderBy[]
list
Synchronous report only. A list of columns and directions defining sorting to be performed on the report rows.

The maximum number of orderings per request is 300.

orderBy[]. column
nested object
Column to perform the sort on. This can be a DoubleClick Search-defined column or a saved column.
orderBy[].column. columnName
string
Name of a DoubleClick Search column to include in the report.
orderBy[].column. savedColumnName
string
Name of a saved column to include in the report. The report must be scoped at advertiser or lower, and this saved column must already be created in the DoubleClick Search UI.
orderBy[]. sortOrder
string
The sort direction, which is either ascending or descending .
includeDeletedEntities
boolean
Determines if removed entities should be included in the report. Defaults to false . Deprecated, please use includeRemovedEntities instead.
verifySingleTimeZone
boolean
If true , the report would only be created if all the requested stat data are sourced from a single timezone. Defaults to false .
downloadFormat
string
Format that the report should be returned in. Currently csv or tsv is supported.
statisticsCurrency
string
Specifies the currency in which monetary will be returned. Possible values are: usd , agency (valid if the report is scoped to agency or lower), advertiser (valid if the report is scoped to * advertiser or lower), or account (valid if the report is scoped to engine account or lower).
startRow
integer
Synchronous report only. Zero-based index of the first row to return. Acceptable values are 0 to 50000 , inclusive. Defaults to 0 .
rowCount
integer
Synchronous report only. The maximum number of rows to return; additional rows are dropped. Acceptable values are 0 to 10000 , inclusive. Defaults to 10000 .
maxRowsPerFile
integer
Asynchronous report only. The maximum number of rows per report file. A large report is split into many files based on this field. Acceptable values are 1000000 to 100000000 , inclusive.
includeRemovedEntities
boolean
Determines if removed entities should be included in the report. Defaults to false .
columns[]. customDimensionName
string
Segments a report by a custom dimension. The report must be scoped to an advertiser or lower, and the custom dimension must already be set up in DoubleClick Search. The custom dimension name, which appears in DoubleClick Search, is case sensitive.

If used in a conversion report, returns the value of the specified custom dimension for the given conversion, if set. This column does not segment the conversion report.

columns[]. platformSource
string
The platform that is used to provide data for the custom dimension. Acceptable values are "floodlight".
filters[].column. customDimensionName
string
Segments a report by a custom dimension. The report must be scoped to an advertiser or lower, and the custom dimension must already be set up in DoubleClick Search. The custom dimension name, which appears in DoubleClick Search, is case sensitive.

If used in a conversion report, returns the value of the specified custom dimension for the given conversion, if set. This column does not segment the conversion report.

filters[].column. headerText
string
Text used to identify this column in the report output; defaults to columnName or savedColumnName when not specified. This can be used to prevent collisions between DoubleClick Search columns and saved columns with the same name.
filters[].column. startDate
string
Inclusive date in YYYY-MM-DD format. When provided, this overrides the overall time range of the report for this column only. Must be provided together with endDate .
filters[].column. endDate
string
Inclusive day in YYYY-MM-DD format. When provided, this overrides the overall time range of the report for this column only. Must be provided together with startDate .
filters[].column. groupByColumn
boolean
Synchronous report only. Set to true to group by this column. Defaults to false .
filters[].column. platformSource
string
The platform that is used to provide data for the custom dimension. Acceptable values are "floodlight".
orderBy[].column. customDimensionName
string
Segments a report by a custom dimension. The report must be scoped to an advertiser or lower, and the custom dimension must already be set up in DoubleClick Search. The custom dimension name, which appears in DoubleClick Search, is case sensitive.

If used in a conversion report, returns the value of the specified custom dimension for the given conversion, if set. This column does not segment the conversion report.

orderBy[].column. headerText
string
Text used to identify this column in the report output; defaults to columnName or savedColumnName when not specified. This can be used to prevent collisions between DoubleClick Search columns and saved columns with the same name.
orderBy[].column. startDate
string
Inclusive date in YYYY-MM-DD format. When provided, this overrides the overall time range of the report for this column only. Must be provided together with endDate .
orderBy[].column. endDate
string
Inclusive day in YYYY-MM-DD format. When provided, this overrides the overall time range of the report for this column only. Must be provided together with startDate .
orderBy[].column. groupByColumn
boolean
Synchronous report only. Set to true to group by this column. Defaults to false .
orderBy[].column. platformSource
string
The platform that is used to provide data for the custom dimension. Acceptable values are "floodlight".
columns[]. customMetricName
string
Name of a custom metric to include in the report. The report must be scoped to an advertiser or lower, and the custom metric must already be set up in DoubleClick Search. The custom metric name, which appears in DoubleClick Search, is case sensitive.
filters[].column. customMetricName
string
Name of a custom metric to include in the report. The report must be scoped to an advertiser or lower, and the custom metric must already be set up in DoubleClick Search. The custom metric name, which appears in DoubleClick Search, is case sensitive.
orderBy[].column. customMetricName
string
Name of a custom metric to include in the report. The report must be scoped to an advertiser or lower, and the custom metric must already be set up in DoubleClick Search. The custom metric name, which appears in DoubleClick Search, is case sensitive.
columns[]. productReportPerspective
string
Returns metrics only for a specific type of product activity. Accepted values are:
  • " sold ": returns metrics only for products that were sold
  • " advertised ": returns metrics only for products that were advertised in a Shopping campaign, and that might or might not have been sold
filters[].column. productReportPerspective
string
Returns metrics only for a specific type of product activity. Accepted values are:
  • " sold ": returns metrics only for products that were sold
  • " advertised ": returns metrics only for products that were advertised in a Shopping campaign, and that might or might not have been sold
orderBy[].column. productReportPerspective
string
Returns metrics only for a specific type of product activity. Accepted values are:
  • " sold ": returns metrics only for products that were sold
  • " advertised ": returns metrics only for products that were advertised in a Shopping campaign, and that might or might not have been sold

Response

If successful, this method returns a Reports resource in the response body.

Try it!

Use the APIs Explorer below to call this method on live data and see the response. Alternatively, try the standalone Explorer .

Create a Mobile Website
View Site in Mobile | Classic
Share by: