Reporting API를 사용하면 판매자가 판매자 센터 쿼리 언어를 통해 프로그래매틱 방식으로 실적 데이터와 상호작용할 수 있습니다. 이는 판매자 센터에서 직접 맞춤 보고서를 만드는 기능과 유사합니다. Reporting API에는 다음과 같은 이점이 있습니다.
대규모 판매자가 제품 등록정보의 실적 데이터를 내부 또는 서드 파티 보고 시스템으로 가져올 수 있습니다.
판매자 센터 계정을 관리하는 사용자, 서드 파티 파트너, 애그리게이터가 보고서에 액세스할 수 있도록 지원합니다.
API 사용자는 검색 호출 응답에서 검색할 실적 데이터를 지정할 수 있습니다. 예를 들면 다음과 같습니다.
반환할 측정항목 (예: 클릭수, 노출수)
데이터를 분류할 측정기준 (예: OfferId, Date)
충족해야 하는 조건 (예: 클릭수 > 100)
Reporting API 쿼리 언어는 Reports 서비스에서 Search 메서드를 사용하여 다양한 측정기준 (프로그램, 날짜와 같은 보고된 이벤트 속성, 브랜드, 카테고리와 같은 제품 속성)으로 분류될 수 있는 Content API for Shopping의 실적 측정항목 (클릭수, 노출수)을 쿼리할 수 있습니다.
Reports 서비스에 대한 쿼리의 결과는 ReportRow 인스턴스 목록이며, 각 ReportRow는 쿼리에서 지정한 세그먼트에 대한 요청된 측정항목의 값을 나타냅니다. 세그먼트를 지정하지 않으면 모든 세그먼트에서 집계된 측정항목이 포함된 단일 행이 반환됩니다. 그렇지 않고 측정항목과 함께 세그먼트가 요청되면 응답에 고유한 세그먼트 튜플마다 하나의 행이 표시됩니다. 단일 쿼리에서 여러 세그먼트와 여러 측정항목을 선택할 수 있습니다.
측정항목 쿼리
반환할 측정항목 (클릭수, 노출수, CTR 등)을 쿼리할 수 있습니다. 보고서 서비스를 쿼리하려면 기간에 필터를 추가해야 합니다. 아래 샘플 쿼리는 날짜 범위의 추가된 조건 내 클릭수의 집계 금액인 단일 행을 반환합니다.
아래 샘플 JSON 코드 응답은 이 판매자가 2020년 12월 1일부터 2020년 12월 21일까지 모든 대상의 모든 제품에서 총 4,440회의 클릭을 기록했음을 보여줍니다.
{"results":[{"metrics":{"clicks":"4,440"}}]}
세그먼트 쿼리
측정항목과 함께 세그먼트를 쿼리할 수도 있습니다. 세그먼트는 제품의 속성 (offer_id, brand, category 등) 또는 보고된 이벤트의 속성 (date, program)일 수 있습니다. 보고된 이벤트는 제품의 노출 또는 클릭입니다.
세그먼트는 SQL의 GROUP BY와 유사하게 작동합니다. 세그먼트는 선택한 측정항목을 분할하여 SELECT 절의 각 세그먼트별로 그룹화합니다. 아래 샘플 쿼리는 기간이라는 추가 조건 내에서 클릭수 내림차순으로 정렬된 일별 클릭수를 반환합니다. 요청된 측정항목 중 하나 이상이 0이 아닌 행만 반환됩니다.
아래 샘플 JSON 코드 응답은 이 판매자가 2020년 12월 1일에 모든 대상 유형의 모든 제품에서 1,546회의 클릭을 기록했고 2020년 12월 2일에 모든 대상 유형의 모든 제품에서 829회의 클릭을 기록했음을 보여줍니다. 판매자가 2020년 12월 3일에 클릭이 없었으므로 해당 날짜에 대한 객체는 반환되지 않습니다.
[null,null,["최종 업데이트: 2025-08-13(UTC)"],[[["\u003cp\u003eMerchant API is the new version of the Content API for Shopping and allows programmatic access to data.\u003c/p\u003e\n"],["\u003cp\u003eReporting API enables merchants to access performance data using Merchant Center Query Language, benefiting large merchants and third-party partners.\u003c/p\u003e\n"],["\u003cp\u003eAPI users can specify metrics, dimensions, and conditions for data retrieval within the \u003ccode\u003eSearch\u003c/code\u003e call.\u003c/p\u003e\n"],["\u003cp\u003eReporting API queries can be used to retrieve performance metrics and segments for analysis, however date filters are required.\u003c/p\u003e\n"],["\u003cp\u003eReturned data includes metrics aggregated by segments, with single-row responses when no segments are specified.\u003c/p\u003e\n"]]],["The Merchant API's Reporting API allows users to programmatically access performance data via the Merchant Center Query Language. Users specify desired metrics (e.g., clicks, impressions) and dimensions (e.g., date, offer ID) in queries. A date range filter is mandatory. Results are returned as `ReportRow` instances, showing metrics segmented as requested. If no segments are specified one row of metrics will be returned. Multiple segments and metrics can be requested together, but all wildcards will return an error.\n"],null,["Reporting API\n-------------\n\nThe Reporting API lets a merchant engage with their performance data\nprogrammatically through the Merchant Center Query Language. This is similar to\nthe ability to\n[create custom reports](//support.google.com/merchants/answer/9967959)\ndirectly in Merchant Center. The Reporting API has the following benefits:\n\n- Lets large merchants import performance data for product listings into their internal or third-party reporting systems.\n- Lets users, third-party partners, and aggregators who manage Merchant Center accounts access reporting.\n\nAPI users can specify which performance data they would like to retrieve in the\nSearch call response, such as:\n\n- Metrics to be returned (for example: Clicks, Impressions)\n- Dimensions in which to segment the data (for example: OfferId, Date)\n- Conditions which need to be met (for example: Clicks \\\u003e 100)\n\nThe Reporting API query language can query the Content API for Shopping for\nperformance metrics (clicks, impressions), possibly segmented by various\ndimensions (reported event attributes like program and date, and product\nattributes like brand, category, etc.), using the `Search` method on the\n`Reports` service.\n\nThe result from a query to the `Reports` service is a list of `ReportRow`\ninstances, with each `ReportRow` representing the values of requested metrics\nfor segments you specified in your query. If no segments are specified, a single\nrow is returned with metrics aggregated across all segments. Otherwise, if any\nsegments are requested alongside metrics, then the response shows one row for\neach unique segment tuple. It is possible to select multiple segments and\nmultiple metrics in a single query.\n| **Key Point:** If you have never advertised your products or shared them on free listings, you will have no associated metrics and be returned a results field that contains an empty array.\n\n### Query for metrics\n\nYou can query for metrics (Clicks, Impressions, CTR, etc.) that you want\nreturned. **You must add a filter on the date range to query the Reports\nservice.** The sample query below returns a single row: the aggregate amount\nof clicks within the added condition of a date range. \n\n SELECT metrics.clicks\n FROM MerchantPerformanceView\n WHERE segments.date BETWEEN '2020-12-01' AND '2020-12-21';\n\n| **Key Point:** You must be explicit about the data you want returned. Any wildcards (for example, `Select metrics.*`) will return an error.\n\n#### Sample response\n\nThe sample JSON code response below shows how this merchant has had 4,440 clicks\nsummed together across all their products across all their destinations between\nDecember 1st, 2020 and December 21st, 2020. \n\n {\"results\": [\n {\n \"metrics\": {\n \"clicks\": \"4,440\"\n }\n }\n ]}\n\n| **Key Point:** If you don't select any segments in your query, you will only be returned one row of metrics.\n\n### Query for segments\n\nAlongside metrics, you can also query for segments, which can be an attribute of\na product (`offer_id`, `brand`, `category`, etc.) or an attribute of a reported\nevent (`date`, `program`). A reported event is an impression or click for a\nproduct.\n\nSegments act similarly to a `GROUP BY` in SQL. Segments split the selected\nmetrics, grouping by each segment in the `SELECT` clause. The sample query below\nreturns clicks per day, ordered by clicks descending within the added condition\nof a date range. Only rows where at least one requested metric is non-zero will\nbe returned. \n\n SELECT\n segments.date,\n metrics.clicks\n FROM MerchantPerformanceView\n WHERE segments.date BETWEEN '2020-12-01' AND '2020-12-03'\n ORDER BY metrics.clicks DESC;\n\n#### Sample response\n\nThe sample JSON code response below shows how this merchant has had 1,546 clicks\nacross all their products across all their destinations on December 1st, 2020\nand 829 clicks across all their products across all their destinations on\nDecember 2nd, 2020. No object will be returned for December 3rd, 2020 since\nthe merchant had no clicks on that day. \n\n {\n \"results\": [\n {\n \"segments\": {\n \"date\": {\n \"year\": 2020,\n \"month\": 12,\n \"day\": 1\n }\n },\n \"metrics\": {\n \"clicks\": \"1546\"\n }\n },\n {\n \"segments\": {\n \"date\": {\n \"year\": 2020,\n \"month\": 12,\n \"day\": 2\n }\n },\n \"metrics\": {\n \"clicks\": \"829\"\n }\n }\n ]}\n\n| **Key Point:** Segments can only be selected if metrics are also selected. If you don't select any metrics in your query, you will be returned an error."]]