[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-05。"],[[["\u003cp\u003eThis guide explains how to generate reports using the Google Ads Query Language (GAQL) and the Google Ads API, mirroring the functionality of reports within the Google Ads UI.\u003c/p\u003e\n"],["\u003cp\u003eIt provides mappings between common UI terms like Columns, Filters, and Segmentation to their corresponding GAQL equivalents, enabling users to construct queries effectively.\u003c/p\u003e\n"],["\u003cp\u003eThe document details how to achieve UI functionalities like filtering by date range, pagination, ordering results, and accessing predefined reports using GAQL.\u003c/p\u003e\n"],["\u003cp\u003eUsers are made aware of common differences between UI and API reports, such as the UI's implicit filtering of removed entities, and are provided with guidance on replicating UI behavior in their queries.\u003c/p\u003e\n"],["\u003cp\u003eWhile functionalities like downloading in various formats and scheduling/emailing are available in the UI, they require additional implementation or are not directly supported within the API.\u003c/p\u003e\n"]]],[],null,["# Reports in the Google Ads UI\n\nThis guide maps the concepts and naming conventions for reports in the Google Ads UI\nto the reports that you can generate using the Google Ads Query Language (GAQL) and\nthe Google Ads API.\n\nCommon UI terms\n---------------\n\nThe following table summarizes some of the common terms used in the UI and their\nmappings to the [Google Ads Query Language (GAQL)](/google-ads/api/docs/query/overview).\n\n| UI | GAQL |\n| [Columns](/google-ads/api/docs/reporting/uireports#columns) | Any resource, segment field or metric in the [SELECT clause](/google-ads/api/docs/query/structure#select) of a GAQL query. |\n| [Date Range](/google-ads/api/docs/reporting/uireports#filtering) | Date ranges map to a [WHERE clause](/google-ads/api/docs/query/structure#where) filtering on `segments.date`. |\n| [Filters](/google-ads/api/docs/reporting/uireports#filtering) | One or more conditions in the [WHERE clause](/google-ads/api/docs/query/structure#where). |\n| [Segment fields](/google-ads/api/docs/reporting/uireports#segmentation) | Apply [segmentation](#segmentation) by including segment fields in your GAQL query. |\n| [Pagination](/google-ads/api/docs/reporting/uireports#pagination) | [Paging](/google-ads/api/docs/reporting/paging) breaks up the result set of the query into multiple pages. |\n|-------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|\n\n### Columns\n\nColumns in the UI are equivalent to\n[Resource fields](/google-ads/api/docs/query/overview#query_for_resource_attributes),\n[Segment fields](/google-ads/api/docs/reporting/segmentation), and\n[Metrics](/google-ads/api/docs/query/overview#query_for_metrics) in GAQL.\n\n### Filtering\n\nYou can filter and organize the data in your reports.\n\n#### Date ranges\n\nThe Google Ads UI has a table displaying account statistics, and a drop-down menu to\ncontrol the date range of these statistics.\n\nYou have the same control in GAQL by filtering on\n[`segments.date`](/google-ads/api/docs/query/date-ranges) in the WHERE clause of a GAQL\nquery.\n\n#### Filters\n\nFilters in the UI are equivalent to one or more conditions in the\n[WHERE clause](/google-ads/api/docs/query/structure#where) of GAQL.\n\n### Segmentation\n\nFor more detailed statistics, split the data by segments. For example, suppose\nyou want to see the number of impressions specific to the Google Search Network\nseparately from the Google Display Network. In that case, segment your report by\nnetwork. See [Segmentation](/google-ads/api/docs/reporting/segmentation) on how to include\nsegment fields in the SELECT clause.\n\n### Pagination\n\nNavigate through your reports in the UI using the controls available at the\nbottom of each table of data that let you switch pages and select the number of\nresults to display from a defined set of sizes.\n\nPaging through results is available when retrieving reports with\n[`GoogleAdsService.Search`](/google-ads/api/reference/rpc/v21/GoogleAdsService/Search) through\n[`next_page_token`](/google-ads/api/docs/reporting/paging). To fetch the entire result set\nwithout any pagination, use\n[`GoogleAdsService.SearchStream`](/google-ads/api/docs/reporting/streaming).\n\n### Order results\n\nIn the UI, you can order results by selecting a column.\n\nIn GAQL, you can use the\n[ORDER BY clause](/google-ads/api/docs/query/ordering-limiting#order_results) and\n[LIMIT clause](/google-ads/api/docs/query/ordering-limiting#limit_the_number_of_results)\nto order your query result.\n\nDownload formats\n----------------\n\nIn the UI, reports can be downloaded in various formats, such as CSV, TSV, or\nXML.\n\nThe API doesn't directly support different formats in its output, so you have to\nperform some post-processing. See this\n[code example](/google-ads/api/samples/campaign-report-to-csv) that shows how\nto implement CSV formatting in a client.\n\nSchedule and email reports\n--------------------------\n\nYou can schedule and email a report from the UI, but these features are not\nsupported in the API.\n\nPredefined reports\n------------------\n\nYou can create a list of predefined reports in the Google Ads UI.\n\nHere's a list of the basic predefined reports and their matching GAQL Resource\nName.\n\n| Basic Predefined Reports | GAQL Resource Name (Specify in the [FROM clause](/google-ads/api/docs/query/structure#from)) |\n|----------------------------|----------------------------------------------------------------------------------------------|\n| Account | [customer](/google-ads/api/fields/v21/customer) |\n| Campaign, Campaign details | [campaign](/google-ads/api/fields/v21/campaign) |\n| Ad group, Ad group details | [ad_group](/google-ads/api/fields/v21/ad_group) |\n| Ad, Final URL | [ad_group_ad](/google-ads/api/fields/v21/ad_group_ad) |\n| Search keyword | [keyword_view](/google-ads/api/fields/v21/keyword_view) |\n| Search terms | [search_term_view](/google-ads/api/fields/v21/search_term_view) |\n| Paid and organic | [paid_organic_search_term_view](/google-ads/api/fields/v21/paid_organic_search_term_view) |\n| Landing page | [landing_page_view](/google-ads/api/fields/v21/landing_page_view) |\n| Expanded Landing page | [expanded_landing_page_view](/google-ads/api/fields/v21/expanded_landing_page_view) |\n\nAs an example from the preceding table, you can use the following GAQL to\ngenerate the Account report: \n\n SELECT\n customer.descriptive_name,\n customer.id,\n metrics.clicks,\n metrics.impressions,\n metrics.ctr,\n metrics.average_cpc,\n metrics.cost_micros,\n metrics.absolute_top_impression_percentage,\n metrics.top_impression_percentage,\n metrics.average_cpm\n FROM customer\n WHERE segments.date DURING LAST_7_DAYS\n\nCommon differences\n------------------\n\nWhen comparing UI reports to API reports, one of the most common differences is\nthat the UI implicitly filters out removed entities, whereas the API does not.\n\nIn order to replicate a default UI view, you need to add a filter, typically\nusing a `status` field, to exclude removed rows. For example: \n\n SELECT campaign.name\n FROM campaign\n WHERE campaign.status != \"REMOVED\""]]