End of the date range to report on, inclusive. Only needed when dateRange is CUSTOM or unspecified.
orderBy[]
string
The name of a dimension or metric to sort the resulting report on, can be prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.
languageCode
string
The language to use for translating report output. If unspecified, this defaults to English ("en").
If the given language is not supported, report output will be returned in English.
The ISO-4217 currency code to use when reporting on monetary metrics. Defaults to the account's currency if not set.
limit
integer
The maximum number of rows of report data to return. Reports producing more rows than the requested limit will be truncated.
If unset, this defaults to 100,000 rows for Reports.GenerateReport and 1,000,000 rows for Reports.GenerateCsvReport, which are also the maximum values permitted here.
Report truncation can be identified (for Reports.GenerateReport only) by comparing the number of rows returned to the value returned in totalMatchedRows.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-28 UTC."],[[["\u003cp\u003eGenerates an ad hoc report with data based on specified dimensions, metrics, filters, and date range.\u003c/p\u003e\n"],["\u003cp\u003eRequires specifying the account, dimensions and metrics for report generation, with optional parameters for filtering, sorting, and formatting the output.\u003c/p\u003e\n"],["\u003cp\u003eAllows customization of the report through various query parameters including date range, filters, sorting order, language, and currency.\u003c/p\u003e\n"],["\u003cp\u003eReturns the report data in the \u003ccode\u003eReportResult\u003c/code\u003e object, with a maximum of 100,000 rows for \u003ccode\u003eReports.GenerateReport\u003c/code\u003e and 1,000,000 rows for \u003ccode\u003eReports.GenerateCsvReport\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eNeeds authorization with either \u003ccode\u003ehttps://www.googleapis.com/auth/adsense\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/adsense.readonly\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This documentation details generating an ad hoc report via a `GET` request to `https://adsense.googleapis.com/v2/{account=accounts/*}/reports:generate`. The request requires a path parameter `account`. Key query parameters include `dimensions[]`, `metrics[]`, `filters[]`, `dateRange`, `startDate`, and `endDate`, `orderBy[]`, `languageCode`, `currencyCode`, `limit`, and `reportingTimeZone`. The request body is empty, and the response returns a `ReportResult`. Authorization needs either `adsense` or `adsense.readonly` OAuth scopes.\n"],null,["# Method: accounts.reports.generate\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nGenerates an ad hoc report.\n\n### HTTP request\n\n`GET https://adsense.googleapis.com/v2/{account=accounts/*}/reports:generate`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------|-------------------------------------------------------------------------------------------------|\n| `account` | `string` Required. The account which owns the collection of reports. Format: accounts/{account} |\n\n### Query parameters\n\n| Parameters ||\n|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `dimensions[]` | `enum (`[Dimension](/adsense/management/reference/rest/v2/Dimension)`)` Dimensions to base the report on. |\n| `metrics[]` | `enum (`[Metric](/adsense/management/reference/rest/v2/Metric)`)` Required. Reporting metrics. |\n| `filters[]` | `string` A list of [filters](/adsense/management/reporting/filtering) to apply to the report. All provided filters must match in order for the data to be included in the report. |\n| `dateRange` | `enum (`[ReportingDateRange](/adsense/management/reference/rest/v2/ReportingDateRange)`)` Date range of the report, if unset the range will be considered CUSTOM. |\n| `startDate` | `object (`[Date](/adsense/management/reference/rest/v2/Date)`)` Start of the date range to report on, inclusive. Only needed when dateRange is CUSTOM or unspecified. |\n| `endDate` | `object (`[Date](/adsense/management/reference/rest/v2/Date)`)` End of the date range to report on, inclusive. Only needed when dateRange is CUSTOM or unspecified. |\n| `orderBy[]` | `string` The name of a dimension or metric to sort the resulting report on, can be prefixed with \"+\" to sort ascending or \"-\" to sort descending. If no prefix is specified, the column is sorted ascending. |\n| `languageCode` | `string` The language to use for translating report output. If unspecified, this defaults to English (\"en\"). If the given language is not supported, report output will be returned in English. The language is specified as an [IETF BCP-47 language code](https://en.wikipedia.org/wiki/IETF_language_tag). |\n| `currencyCode` | `string` The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on monetary metrics. Defaults to the account's currency if not set. |\n| `limit` | `integer` The maximum number of rows of report data to return. Reports producing more rows than the requested limit will be truncated. If unset, this defaults to 100,000 rows for `Reports.GenerateReport` and 1,000,000 rows for `Reports.GenerateCsvReport`, which are also the maximum values permitted here. Report truncation can be identified (for `Reports.GenerateReport` only) by comparing the number of rows returned to the value returned in `totalMatchedRows`. |\n| `reportingTimeZone` | `enum (`[ReportingTimeZone](/adsense/management/reference/rest/v2/ReportingTimeZone)`)` Timezone in which to generate the report. If unspecified, this defaults to the account timezone. For more information, see [changing the time zone of your reports](https://support.google.com/adsense/answer/9830725). |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [ReportResult](/adsense/management/reference/rest/v2/ReportResult).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/adsense`\n- `\n https://www.googleapis.com/auth/adsense.readonly`"]]