@google-shopping/reports 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1159 @@
1
+ // Copyright 2023 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.shopping.merchant.reports.v1beta;
18
+
19
+ import "google/api/annotations.proto";
20
+ import "google/api/client.proto";
21
+ import "google/api/field_behavior.proto";
22
+ import "google/protobuf/timestamp.proto";
23
+ import "google/shopping/type/types.proto";
24
+ import "google/type/date.proto";
25
+
26
+ option go_package = "cloud.google.com/go/shopping/merchant/reports/apiv1beta/reportspb;reportspb";
27
+ option java_multiple_files = true;
28
+ option java_outer_classname = "ReportsProto";
29
+ option java_package = "com.google.shopping.merchant.reports.v1beta";
30
+
31
+ // Service for retrieving reports and insights about your products, their
32
+ // performance, and their competitive environment on Google.
33
+ service ReportService {
34
+ option (google.api.default_host) = "merchantapi.googleapis.com";
35
+ option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/content";
36
+
37
+ // Retrieves a report defined by a search query. The response might contain
38
+ // fewer rows than specified by `page_size`. Rely on `next_page_token` to
39
+ // determine if there are more rows to be requested.
40
+ rpc Search(SearchRequest) returns (SearchResponse) {
41
+ option (google.api.http) = {
42
+ post: "/reports/v1beta/{parent=accounts/*}/reports:search"
43
+ body: "*"
44
+ };
45
+ option (google.api.method_signature) = "parent";
46
+ }
47
+ }
48
+
49
+ // Request message for the `ReportService.Search` method.
50
+ message SearchRequest {
51
+ // Required. Id of the account making the call. Must be a standalone account
52
+ // or an MCA subaccount. Format: accounts/{account}
53
+ string parent = 1 [(google.api.field_behavior) = REQUIRED];
54
+
55
+ // Required. Query that defines a report to be retrieved.
56
+ //
57
+ // For details on how to construct your query, see the Query Language
58
+ // guide. For the full list of available tables and fields, see the Available
59
+ // fields.
60
+ string query = 2 [(google.api.field_behavior) = REQUIRED];
61
+
62
+ // Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
63
+ // the maximum of 1000. Values above 1000 are coerced to 1000.
64
+ int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
65
+
66
+ // Optional. Token of the page to retrieve. If not specified, the first page
67
+ // of results is returned. In order to request the next page of results, the
68
+ // value obtained from `next_page_token` in the previous response should be
69
+ // used.
70
+ string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
71
+ }
72
+
73
+ // Response message for the `ReportService.Search` method.
74
+ message SearchResponse {
75
+ // Rows that matched the search query.
76
+ repeated ReportRow results = 1;
77
+
78
+ // Token which can be sent as `page_token` to retrieve the next page. If
79
+ // omitted, there are no subsequent pages.
80
+ string next_page_token = 2;
81
+ }
82
+
83
+ // Result row returned from the search query.
84
+ //
85
+ // Only the message corresponding to the queried table is populated in the
86
+ // response. Within the populated message, only the fields requested explicitly
87
+ // in the query are populated.
88
+ message ReportRow {
89
+ // Fields available for query in `product_performance_view` table.
90
+ ProductPerformanceView product_performance_view = 1;
91
+
92
+ // Fields available for query in `product_view` table.
93
+ ProductView product_view = 2;
94
+
95
+ // Fields available for query in `price_competitiveness_product_view` table.
96
+ PriceCompetitivenessProductView price_competitiveness_product_view = 3;
97
+
98
+ // Fields available for query in `price_insights_product_view` table.
99
+ PriceInsightsProductView price_insights_product_view = 4;
100
+
101
+ // Fields available for query in `best_sellers_product_cluster_view` table.
102
+ BestSellersProductClusterView best_sellers_product_cluster_view = 5;
103
+
104
+ // Fields available for query in `best_sellers_brand_view` table.
105
+ BestSellersBrandView best_sellers_brand_view = 6;
106
+
107
+ // Fields available for query in `competitive_visibility_competitor_view`
108
+ // table.
109
+ CompetitiveVisibilityCompetitorView competitive_visibility_competitor_view =
110
+ 8;
111
+
112
+ // Fields available for query in `competitive_visibility_top_merchant_view`
113
+ // table.
114
+ CompetitiveVisibilityTopMerchantView
115
+ competitive_visibility_top_merchant_view = 9;
116
+
117
+ // Fields available for query in `competitive_visibility_benchmark_view`
118
+ // table.
119
+ CompetitiveVisibilityBenchmarkView competitive_visibility_benchmark_view = 10;
120
+ }
121
+
122
+ // Fields available for query in `product_performance_view` table.
123
+ //
124
+ // Product performance data for your account, including performance metrics (for
125
+ // example, `clicks`) and dimensions according to which performance metrics are
126
+ // segmented (for example, `offer_id`). Values of product dimensions, such as
127
+ // `offer_id`, reflect the state of a product at the time of the impression.
128
+ //
129
+ // Segment fields cannot be selected in queries without also selecting at least
130
+ // one metric field.
131
+ //
132
+ // Values are only set for fields requested explicitly in the request's search
133
+ // query.
134
+ message ProductPerformanceView {
135
+ // Marketing method to which metrics apply. Segment.
136
+ optional MarketingMethod.MarketingMethodEnum marketing_method = 1;
137
+
138
+ // Date in the merchant timezone to which metrics apply. Segment.
139
+ //
140
+ // Condition on `date` is required in the `WHERE` clause.
141
+ google.type.Date date = 2;
142
+
143
+ // First day of the week (Monday) of the metrics date in the merchant
144
+ // timezone. Segment.
145
+ google.type.Date week = 3;
146
+
147
+ // Code of the country where the customer is located at the time of the event.
148
+ // Represented in the ISO 3166 format. Segment.
149
+ //
150
+ // If the customer country cannot be determined, a special 'ZZ' code is
151
+ // returned.
152
+ optional string customer_country_code = 4;
153
+
154
+ // Merchant-provided id of the product. Segment.
155
+ optional string offer_id = 5;
156
+
157
+ // Title of the product. Segment.
158
+ optional string title = 6;
159
+
160
+ // Brand of the product. Segment.
161
+ optional string brand = 7;
162
+
163
+ // [Product category (1st
164
+ // level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
165
+ // in Google's product taxonomy. Segment.
166
+ optional string category_l1 = 8;
167
+
168
+ // [Product category (2nd
169
+ // level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
170
+ // in Google's product taxonomy. Segment.
171
+ optional string category_l2 = 9;
172
+
173
+ // [Product category (3rd
174
+ // level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
175
+ // in Google's product taxonomy. Segment.
176
+ optional string category_l3 = 10;
177
+
178
+ // [Product category (4th
179
+ // level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
180
+ // in Google's product taxonomy. Segment.
181
+ optional string category_l4 = 11;
182
+
183
+ // [Product category (5th
184
+ // level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
185
+ // in Google's product taxonomy. Segment.
186
+ optional string category_l5 = 12;
187
+
188
+ // [Product type (1st
189
+ // level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
190
+ // in merchant's own product taxonomy. Segment.
191
+ optional string product_type_l1 = 13;
192
+
193
+ // [Product type (2nd
194
+ // level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
195
+ // in merchant's own product taxonomy. Segment.
196
+ optional string product_type_l2 = 14;
197
+
198
+ // [Product type (3rd
199
+ // level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
200
+ // in merchant's own product taxonomy. Segment.
201
+ optional string product_type_l3 = 15;
202
+
203
+ // [Product type (4th
204
+ // level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
205
+ // in merchant's own product taxonomy. Segment.
206
+ optional string product_type_l4 = 16;
207
+
208
+ // [Product type (5th
209
+ // level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
210
+ // in merchant's own product taxonomy. Segment.
211
+ optional string product_type_l5 = 17;
212
+
213
+ // Custom label 0 for custom grouping of products. Segment.
214
+ optional string custom_label0 = 18;
215
+
216
+ // Custom label 1 for custom grouping of products. Segment.
217
+ optional string custom_label1 = 19;
218
+
219
+ // Custom label 2 for custom grouping of products. Segment.
220
+ optional string custom_label2 = 20;
221
+
222
+ // Custom label 3 for custom grouping of products. Segment.
223
+ optional string custom_label3 = 21;
224
+
225
+ // Custom label 4 for custom grouping of products. Segment.
226
+ optional string custom_label4 = 22;
227
+
228
+ // Number of clicks. Metric.
229
+ optional int64 clicks = 23;
230
+
231
+ // Number of times merchant's products are shown. Metric.
232
+ optional int64 impressions = 24;
233
+
234
+ // Click-through rate - the number of clicks merchant's products receive
235
+ // (clicks) divided by the number of times the products are shown
236
+ // (impressions). Metric.
237
+ optional double click_through_rate = 25;
238
+
239
+ // Number of conversions attributed to the product, reported on the conversion
240
+ // date. Depending on the attribution model, a conversion might be distributed
241
+ // across multiple clicks, where each click gets its own credit assigned. This
242
+ // metric is a sum of all such credits. Metric.
243
+ //
244
+ // Available only for the `FREE` traffic source.
245
+ optional double conversions = 26;
246
+
247
+ // Value of conversions attributed to the product, reported on the conversion
248
+ // date. Metric.
249
+ //
250
+ // Available only for the `FREE` traffic source.
251
+ google.shopping.type.Price conversion_value = 27;
252
+
253
+ // Number of conversions divided by the number of clicks, reported on the
254
+ // impression date. Metric.
255
+ //
256
+ // Available only for the `FREE` traffic source.
257
+ optional double conversion_rate = 28;
258
+ }
259
+
260
+ // Fields available for query in `product_view` table.
261
+ //
262
+ // Products in the current inventory. Products in this table are the same as in
263
+ // Products sub-API but not all product attributes from Products sub-API are
264
+ // available for query in this table. In contrast to Products sub-API, this
265
+ // table allows to filter the returned list of products by product attributes.
266
+ // To retrieve a single product by `id` or list all products, Products sub-API
267
+ // should be used.
268
+ //
269
+ // Values are only set for fields requested explicitly in the request's search
270
+ // query.
271
+ //
272
+ message ProductView {
273
+ // Item issue associated with the product.
274
+ message ItemIssue {
275
+ // Issue type.
276
+ message ItemIssueType {
277
+ // Error code of the issue, equivalent to the `code` of [Product
278
+ // issues](https://developers.google.com/shopping-content/guides/product-issues).
279
+ optional string code = 1;
280
+
281
+ // Canonical attribute name for attribute-specific issues.
282
+ optional string canonical_attribute = 2;
283
+ }
284
+
285
+ // How the issue affects the serving of the product.
286
+ message ItemIssueSeverity {
287
+ // Issue severity per reporting context.
288
+ message IssueSeverityPerReportingContext {
289
+ // Reporting context the issue applies to.
290
+ optional google.shopping.type.ReportingContext.ReportingContextEnum
291
+ reporting_context = 1;
292
+
293
+ // List of disapproved countries in the reporting context, represented
294
+ // in ISO 3166 format.
295
+ repeated string disapproved_countries = 2;
296
+
297
+ // List of demoted countries in the reporting context, represented in
298
+ // ISO 3166 format.
299
+ repeated string demoted_countries = 3;
300
+ }
301
+
302
+ // Issue severity aggregated for all reporting contexts.
303
+ enum AggregatedIssueSeverity {
304
+ // Not specified.
305
+ AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED = 0;
306
+
307
+ // Issue disapproves the product in at least one reporting context.
308
+ DISAPPROVED = 1;
309
+
310
+ // Issue demotes the product in all reporting contexts it affects.
311
+ DEMOTED = 2;
312
+
313
+ // Issue resolution is `PENDING_PROCESSING`.
314
+ PENDING = 3;
315
+ }
316
+
317
+ // Issue severity per reporting context.
318
+ repeated IssueSeverityPerReportingContext severity_per_reporting_context =
319
+ 1;
320
+
321
+ // Aggregated severity of the issue for all reporting contexts it affects.
322
+ //
323
+ // **This field can be used for filtering the results.**
324
+ optional AggregatedIssueSeverity aggregated_severity = 2;
325
+ }
326
+
327
+ // How to resolve the issue.
328
+ enum ItemIssueResolution {
329
+ // Not specified.
330
+ ITEM_ISSUE_RESOLUTION_UNSPECIFIED = 0;
331
+
332
+ // The merchant has to fix the issue.
333
+ MERCHANT_ACTION = 1;
334
+
335
+ // The issue will be resolved automatically (for example, image crawl) or
336
+ // through a Google review. No merchant action is required now. Resolution
337
+ // might lead to another issue (for example, if crawl fails).
338
+ PENDING_PROCESSING = 2;
339
+ }
340
+
341
+ // Item issue type.
342
+ ItemIssueType type = 1;
343
+
344
+ // Item issue severity.
345
+ ItemIssueSeverity severity = 2;
346
+
347
+ // Item issue resolution.
348
+ optional ItemIssueResolution resolution = 3;
349
+ }
350
+
351
+ // Status of the product aggregated for all reporting contexts.
352
+ //
353
+ // Here's an example of how the aggregated status is computed:
354
+ //
355
+ // Free listings | Shopping Ads | Status
356
+ // --------------|--------------|------------------------------
357
+ // Approved | Approved | ELIGIBLE
358
+ // Approved | Pending | ELIGIBLE
359
+ // Approved | Disapproved | ELIGIBLE_LIMITED
360
+ // Pending | Pending | PENDING
361
+ // Disapproved | Disapproved | NOT_ELIGIBLE_OR_DISAPPROVED
362
+ //
363
+ //
364
+ enum AggregatedReportingContextStatus {
365
+ // Not specified.
366
+ AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED = 0;
367
+
368
+ // Product is not eligible or is disapproved for all reporting contexts.
369
+ NOT_ELIGIBLE_OR_DISAPPROVED = 1;
370
+
371
+ // Product's status is pending in all reporting contexts.
372
+ PENDING = 2;
373
+
374
+ // Product is eligible for some (but not all) reporting contexts.
375
+ ELIGIBLE_LIMITED = 3;
376
+
377
+ // Product is eligible for all reporting contexts.
378
+ ELIGIBLE = 4;
379
+ }
380
+
381
+ // REST ID of the product, in the form of
382
+ // `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate
383
+ // on products take this as their `name` parameter.
384
+ //
385
+ // Required in the `SELECT` clause.
386
+ optional string id = 1;
387
+
388
+ // Channel of the product. Can be `ONLINE` or `LOCAL`.
389
+ optional google.shopping.type.Channel.ChannelEnum channel = 28;
390
+
391
+ // Language code of the product in BCP 47 format.
392
+ optional string language_code = 2;
393
+
394
+ // Feed label of the product.
395
+ optional string feed_label = 3;
396
+
397
+ // Merchant-provided id of the product.
398
+ optional string offer_id = 4;
399
+
400
+ // Title of the product.
401
+ optional string title = 5;
402
+
403
+ // Brand of the product.
404
+ optional string brand = 6;
405
+
406
+ // Product category (1st level) in [Google's product
407
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
408
+ optional string category_l1 = 7;
409
+
410
+ // Product category (2nd level) in [Google's product
411
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
412
+ optional string category_l2 = 8;
413
+
414
+ // Product category (3rd level) in [Google's product
415
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
416
+ optional string category_l3 = 9;
417
+
418
+ // Product category (4th level) in [Google's product
419
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
420
+ optional string category_l4 = 10;
421
+
422
+ // Product category (5th level) in [Google's product
423
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
424
+ optional string category_l5 = 11;
425
+
426
+ // Product type (1st level) in merchant's own [product
427
+ // taxonomy](https://support.google.com/merchants/answer/6324406).
428
+ optional string product_type_l1 = 12;
429
+
430
+ // Product type (2nd level) in merchant's own [product
431
+ // taxonomy](https://support.google.com/merchants/answer/6324406).
432
+ optional string product_type_l2 = 13;
433
+
434
+ // Product type (3rd level) in merchant's own [product
435
+ // taxonomy](https://support.google.com/merchants/answer/6324406).
436
+ optional string product_type_l3 = 14;
437
+
438
+ // Product type (4th level) in merchant's own [product
439
+ // taxonomy](https://support.google.com/merchants/answer/6324406).
440
+ optional string product_type_l4 = 15;
441
+
442
+ // Product type (5th level) in merchant's own [product
443
+ // taxonomy](https://support.google.com/merchants/answer/6324406).
444
+ optional string product_type_l5 = 16;
445
+
446
+ // Product price. Absent if the information about the price of the product is
447
+ // not available.
448
+ google.shopping.type.Price price = 17;
449
+
450
+ // [Condition](https://support.google.com/merchants/answer/6324469) of the
451
+ // product.
452
+ optional string condition = 18;
453
+
454
+ // [Availability](https://support.google.com/merchants/answer/6324448) of the
455
+ // product.
456
+ optional string availability = 19;
457
+
458
+ // Normalized [shipping
459
+ // label](https://support.google.com/merchants/answer/6324504) specified in
460
+ // the feed.
461
+ optional string shipping_label = 20;
462
+
463
+ // List of Global Trade Item Numbers (GTINs) of the product.
464
+ repeated string gtin = 21;
465
+
466
+ // Item group id provided by the merchant for grouping variants together.
467
+ optional string item_group_id = 22;
468
+
469
+ // Link to the processed image of the product, hosted on the Google
470
+ // infrastructure.
471
+ optional string thumbnail_link = 23;
472
+
473
+ // The time the merchant created the product in timestamp seconds.
474
+ google.protobuf.Timestamp creation_time = 24;
475
+
476
+ // Expiration date for the product, specified on insertion.
477
+ google.type.Date expiration_date = 25;
478
+
479
+ // Aggregated status.
480
+ optional AggregatedReportingContextStatus
481
+ aggregated_reporting_context_status = 26;
482
+
483
+ // List of item issues for the product.
484
+ //
485
+ // **This field cannot be used for sorting the results.**
486
+ //
487
+ // **Only selected attributes of this field (for example,
488
+ // `item_issues.severity.aggregated_severity`) can be used for filtering the
489
+ // results.**
490
+ repeated ItemIssue item_issues = 27;
491
+ }
492
+
493
+ // Fields available for query in `price_competitiveness_product_view` table.
494
+ //
495
+ // [Price competitiveness](https://support.google.com/merchants/answer/9626903)
496
+ // report.
497
+ //
498
+ // Values are only set for fields requested explicitly in the request's search
499
+ // query.
500
+ message PriceCompetitivenessProductView {
501
+ // Country of the price benchmark. Represented in the ISO 3166 format.
502
+ //
503
+ // Required in the `SELECT` clause.
504
+ optional string report_country_code = 1;
505
+
506
+ // REST ID of the product, in the form of
507
+ // `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
508
+ // `product_view` table.
509
+ //
510
+ // Required in the `SELECT` clause.
511
+ optional string id = 2;
512
+
513
+ // Merchant-provided id of the product.
514
+ optional string offer_id = 3;
515
+
516
+ // Title of the product.
517
+ optional string title = 4;
518
+
519
+ // Brand of the product.
520
+ optional string brand = 5;
521
+
522
+ // Product category (1st level) in [Google's product
523
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
524
+ optional string category_l1 = 6;
525
+
526
+ // Product category (2nd level) in [Google's product
527
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
528
+ optional string category_l2 = 7;
529
+
530
+ // Product category (3rd level) in [Google's product
531
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
532
+ optional string category_l3 = 8;
533
+
534
+ // Product category (4th level) in [Google's product
535
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
536
+ optional string category_l4 = 9;
537
+
538
+ // Product category (5th level) in [Google's product
539
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
540
+ optional string category_l5 = 10;
541
+
542
+ // Product type (1st level) in merchant's own [product
543
+ // taxonomy](https://support.google.com/merchants/answer/6324406).
544
+ optional string product_type_l1 = 11;
545
+
546
+ // Product type (2nd level) in merchant's own [product
547
+ // taxonomy](https://support.google.com/merchants/answer/6324406).
548
+ optional string product_type_l2 = 12;
549
+
550
+ // Product type (3rd level) in merchant's own [product
551
+ // taxonomy](https://support.google.com/merchants/answer/6324406).
552
+ optional string product_type_l3 = 13;
553
+
554
+ // Product type (4th level) in merchant's own [product
555
+ // taxonomy](https://support.google.com/merchants/answer/6324406).
556
+ optional string product_type_l4 = 14;
557
+
558
+ // Product type (5th level) in merchant's own [product
559
+ // taxonomy](https://support.google.com/merchants/answer/6324406).
560
+ optional string product_type_l5 = 15;
561
+
562
+ // Current price of the product.
563
+ google.shopping.type.Price price = 16;
564
+
565
+ // Latest available price benchmark for the product's catalog in the benchmark
566
+ // country.
567
+ google.shopping.type.Price benchmark_price = 17;
568
+ }
569
+
570
+ // Fields available for query in `price_insights_product_view` table.
571
+ //
572
+ // [Price insights](https://support.google.com/merchants/answer/11916926)
573
+ // report.
574
+ //
575
+ // Values are only set for fields requested explicitly in the request's search
576
+ // query.
577
+ message PriceInsightsProductView {
578
+ // REST ID of the product, in the form of
579
+ // `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
580
+ // `product_view` table.
581
+ //
582
+ // Required in the `SELECT` clause.
583
+ optional string id = 1;
584
+
585
+ // Merchant-provided id of the product.
586
+ optional string offer_id = 2;
587
+
588
+ // Title of the product.
589
+ optional string title = 3;
590
+
591
+ // Brand of the product.
592
+ optional string brand = 4;
593
+
594
+ // Product category (1st level) in [Google's product
595
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
596
+ optional string category_l1 = 5;
597
+
598
+ // Product category (2nd level) in [Google's product
599
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
600
+ optional string category_l2 = 6;
601
+
602
+ // Product category (3rd level) in [Google's product
603
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
604
+ optional string category_l3 = 7;
605
+
606
+ // Product category (4th level) in [Google's product
607
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
608
+ optional string category_l4 = 8;
609
+
610
+ // Product category (5th level) in [Google's product
611
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
612
+ optional string category_l5 = 9;
613
+
614
+ // Product type (1st level) in merchant's own [product
615
+ // taxonomy](https://support.google.com/merchants/answer/6324406).
616
+ optional string product_type_l1 = 10;
617
+
618
+ // Product type (2nd level) in merchant's own [product
619
+ // taxonomy](https://support.google.com/merchants/answer/6324406).
620
+ optional string product_type_l2 = 11;
621
+
622
+ // Product type (3rd level) in merchant's own [product
623
+ // taxonomy](https://support.google.com/merchants/answer/6324406).
624
+ optional string product_type_l3 = 12;
625
+
626
+ // Product type (4th level) in merchant's own [product
627
+ // taxonomy](https://support.google.com/merchants/answer/6324406).
628
+ optional string product_type_l4 = 13;
629
+
630
+ // Product type (5th level) in merchant's own [product
631
+ // taxonomy](https://support.google.com/merchants/answer/6324406).
632
+ optional string product_type_l5 = 14;
633
+
634
+ // Current price of the product.
635
+ google.shopping.type.Price price = 15;
636
+
637
+ // Latest suggested price for the product.
638
+ google.shopping.type.Price suggested_price = 16;
639
+
640
+ // Predicted change in impressions as a fraction after introducing the
641
+ // suggested price compared to current active price. For example, 0.05 is a 5%
642
+ // predicted increase in impressions.
643
+ optional double predicted_impressions_change_fraction = 17;
644
+
645
+ // Predicted change in clicks as a fraction after introducing the
646
+ // suggested price compared to current active price. For example, 0.05 is a 5%
647
+ // predicted increase in clicks.
648
+ optional double predicted_clicks_change_fraction = 18;
649
+
650
+ // Predicted change in conversions as a fraction after introducing the
651
+ // suggested price compared to current active price. For example, 0.05 is a 5%
652
+ // predicted increase in conversions).
653
+ optional double predicted_conversions_change_fraction = 19;
654
+ }
655
+
656
+ // Fields available for query in `best_sellers_product_cluster_view` table.
657
+ //
658
+ // [Best sellers](https://support.google.com/merchants/answer/9488679) report
659
+ // with top product clusters. A product cluster is a grouping for different
660
+ // offers and variants that represent the same product, for example, Google
661
+ // Pixel 7.
662
+ //
663
+ // Values are only set for fields requested explicitly in the request's search
664
+ // query.
665
+ message BestSellersProductClusterView {
666
+ // Status of the product cluster or brand in your inventory.
667
+ enum InventoryStatus {
668
+ // Not specified.
669
+ INVENTORY_STATUS_UNSPECIFIED = 0;
670
+
671
+ // You have a product for this product cluster or brand in stock.
672
+ IN_STOCK = 1;
673
+
674
+ // You have a product for this product cluster or brand in inventory but it
675
+ // is currently out of stock.
676
+ OUT_OF_STOCK = 2;
677
+
678
+ // You do not have a product for this product cluster or brand in inventory.
679
+ NOT_IN_INVENTORY = 3;
680
+ }
681
+
682
+ // Report date. The value of this field can only be one of the following:
683
+ //
684
+ // * The first day of the week (Monday) for weekly reports,
685
+ // * The first day of the month for monthly reports.
686
+ //
687
+ // Required in the `SELECT` clause. If a `WHERE` condition on `report_date` is
688
+ // not specified in the query, the latest available weekly or monthly report
689
+ // is returned.
690
+ google.type.Date report_date = 1;
691
+
692
+ // Granularity of the report. The ranking can be done over a week or a month
693
+ // timeframe.
694
+ //
695
+ // Required in the `SELECT` clause. Condition on `report_granularity` is
696
+ // required in the `WHERE` clause.
697
+ optional ReportGranularity.ReportGranularityEnum report_granularity = 2;
698
+
699
+ // Country where the ranking is calculated. Represented in the ISO 3166
700
+ // format.
701
+ //
702
+ // Required in the `SELECT` clause. Condition on `report_country_code` is
703
+ // required in the `WHERE` clause.
704
+ optional string report_country_code = 3;
705
+
706
+ // Google product category ID to calculate the ranking for, represented in
707
+ // [Google's product
708
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
709
+ //
710
+ // Required in the `SELECT` clause. If a `WHERE` condition on
711
+ // `report_category_id` is not specified in the query, rankings for all
712
+ // top-level categories are returned.
713
+ optional int64 report_category_id = 4;
714
+
715
+ // Title of the product cluster.
716
+ optional string title = 6;
717
+
718
+ // Brand of the product cluster.
719
+ optional string brand = 7;
720
+
721
+ // Product category (1st level) of the product cluster, represented in
722
+ // [Google's product
723
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
724
+ optional string category_l1 = 8;
725
+
726
+ // Product category (2nd level) of the product cluster, represented in
727
+ // [Google's product
728
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
729
+ optional string category_l2 = 9;
730
+
731
+ // Product category (3rd level) of the product cluster, represented in
732
+ // [Google's product
733
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
734
+ optional string category_l3 = 10;
735
+
736
+ // Product category (4th level) of the product cluster, represented in
737
+ // [Google's product
738
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
739
+ optional string category_l4 = 11;
740
+
741
+ // Product category (5th level) of the product cluster, represented in
742
+ // [Google's product
743
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
744
+ optional string category_l5 = 12;
745
+
746
+ // GTINs of example variants of the product cluster.
747
+ repeated string variant_gtins = 13;
748
+
749
+ // Whether the product cluster is `IN_STOCK` in your product feed in at least
750
+ // one of the countries, `OUT_OF_STOCK` in your product feed in all countries,
751
+ // or `NOT_IN_INVENTORY` at all.
752
+ //
753
+ // The field doesn't take the Best sellers report country filter into account.
754
+ optional InventoryStatus inventory_status = 14;
755
+
756
+ // Whether there is at least one product of the brand currently `IN_STOCK` in
757
+ // your product feed in at least one of the countries, all products are
758
+ // `OUT_OF_STOCK` in your product feed in all countries, or
759
+ // `NOT_IN_INVENTORY`.
760
+ //
761
+ // The field doesn't take the Best sellers report country filter into account.
762
+ optional InventoryStatus brand_inventory_status = 15;
763
+
764
+ // Popularity of the product cluster on Ads and organic surfaces, in the
765
+ // selected category and country, based on the estimated number of units sold.
766
+ optional int64 rank = 16;
767
+
768
+ // Popularity rank in the previous week or month.
769
+ optional int64 previous_rank = 17;
770
+
771
+ // Estimated demand in relation to the product cluster with the highest
772
+ // popularity rank in the same category and country.
773
+ optional RelativeDemand.RelativeDemandEnum relative_demand = 18;
774
+
775
+ // Estimated demand in relation to the product cluster with the highest
776
+ // popularity rank in the same category and country in the previous week or
777
+ // month.
778
+ optional RelativeDemand.RelativeDemandEnum previous_relative_demand = 19;
779
+
780
+ // Change in the estimated demand. Whether it rose, sank or remained flat.
781
+ optional RelativeDemandChangeType.RelativeDemandChangeTypeEnum
782
+ relative_demand_change = 20;
783
+ }
784
+
785
+ // Fields available for query in `best_sellers_brand_view` table.
786
+ //
787
+ // [Best sellers](https://support.google.com/merchants/answer/9488679) report
788
+ // with top brands.
789
+ //
790
+ // Values are only set for fields requested explicitly in the request's search
791
+ // query.
792
+ message BestSellersBrandView {
793
+ // Report date. The value of this field can only be one of the following:
794
+ //
795
+ // * The first day of the week (Monday) for weekly reports,
796
+ // * The first day of the month for monthly reports.
797
+ //
798
+ // Required in the `SELECT` clause. If a `WHERE` condition on `report_date` is
799
+ // not specified in the query, the latest available weekly or monthly report
800
+ // is returned.
801
+ google.type.Date report_date = 1;
802
+
803
+ // Granularity of the report. The ranking can be done over a week or a month
804
+ // timeframe.
805
+ //
806
+ // Required in the `SELECT` clause. Condition on `report_granularity` is
807
+ // required in the `WHERE` clause.
808
+ optional ReportGranularity.ReportGranularityEnum report_granularity = 2;
809
+
810
+ // Country where the ranking is calculated. Represented in the ISO 3166
811
+ // format.
812
+ //
813
+ // Required in the `SELECT` clause. Condition on `report_country_code` is
814
+ // required in the `WHERE` clause.
815
+ optional string report_country_code = 3;
816
+
817
+ // Google product category ID to calculate the ranking for, represented in
818
+ // [Google's product
819
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
820
+ //
821
+ // Required in the `SELECT` clause. If a `WHERE` condition on
822
+ // `report_category_id` is not specified in the query, rankings for all
823
+ // top-level categories are returned.
824
+ optional int64 report_category_id = 4;
825
+
826
+ // Name of the brand.
827
+ optional string brand = 6;
828
+
829
+ // Popularity of the brand on Ads and organic surfaces, in the selected
830
+ // category and country, based on the estimated number of units sold.
831
+ optional int64 rank = 7;
832
+
833
+ // Popularity rank in the previous week or month.
834
+ optional int64 previous_rank = 8;
835
+
836
+ // Estimated demand in relation to the brand with the highest popularity rank
837
+ // in the same category and country.
838
+ optional RelativeDemand.RelativeDemandEnum relative_demand = 9;
839
+
840
+ // Estimated demand in relation to the brand with the highest popularity rank
841
+ // in the same category and country in the previous week or month.
842
+ optional RelativeDemand.RelativeDemandEnum previous_relative_demand = 10;
843
+
844
+ // Change in the estimated demand. Whether it rose, sank or remained flat.
845
+ optional RelativeDemandChangeType.RelativeDemandChangeTypeEnum
846
+ relative_demand_change = 11;
847
+ }
848
+
849
+ // Fields available for query in `competitive_visibility_competitor_view` table.
850
+ //
851
+ // [Competitive
852
+ // visibility](https://support.google.com/merchants/answer/11366442) report with
853
+ // businesses with similar visibility.
854
+ //
855
+ // Values are only set for fields requested explicitly in the request's search
856
+ // query.
857
+ message CompetitiveVisibilityCompetitorView {
858
+ // Date of this row.
859
+ //
860
+ // A condition on `date` is required in the `WHERE` clause.
861
+ google.type.Date date = 1;
862
+
863
+ // Domain of your competitor or your domain, if 'is_your_domain' is true.
864
+ //
865
+ // Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE'
866
+ // clause.
867
+ optional string domain = 2;
868
+
869
+ // True if this row contains data for your domain.
870
+ //
871
+ // Cannot be filtered on in the 'WHERE' clause.
872
+ optional bool is_your_domain = 3;
873
+
874
+ // Country where impressions appeared.
875
+ //
876
+ // Required in the `SELECT` clause. A condition on `report_country_code` is
877
+ // required in the `WHERE` clause.
878
+ optional string report_country_code = 4;
879
+
880
+ // Google product category ID to calculate the report for, represented in
881
+ // [Google's product
882
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
883
+ //
884
+ // Required in the `SELECT` clause. A condition on `report_category_id` is
885
+ // required in the `WHERE` clause.
886
+ optional int64 report_category_id = 5;
887
+
888
+ // Traffic source of impressions.
889
+ //
890
+ // Required in the `SELECT` clause.
891
+ optional TrafficSource.TrafficSourceEnum traffic_source = 6;
892
+
893
+ // Position of the domain in the similar businesses ranking for the selected
894
+ // keys (`date`, `report_category_id`, `report_country_code`,
895
+ // `traffic_source`) based on impressions. 1 is the highest.
896
+ //
897
+ // Cannot be filtered on in the 'WHERE' clause.
898
+ optional int64 rank = 7;
899
+
900
+ // [Ads / organic ratio]
901
+ // (https://support.google.com/merchants/answer/11366442#zippy=%2Cads-free-ratio)
902
+ // shows how often the domain receives impressions from Shopping ads compared
903
+ // to organic traffic. The number is rounded and bucketed.
904
+ //
905
+ // Cannot be filtered on in the 'WHERE' clause.
906
+ optional double ads_organic_ratio = 8;
907
+
908
+ // [Page overlap rate]
909
+ // (https://support.google.com/merchants/answer/11366442#zippy=%2Cpage-overlap-rate)
910
+ // shows how frequently competing retailers’ offers are shown together with
911
+ // your offers on the same page.
912
+ //
913
+ // Cannot be filtered on in the 'WHERE' clause.
914
+ optional double page_overlap_rate = 9;
915
+
916
+ // [Higher position rate]
917
+ // (https://support.google.com/merchants/answer/11366442#zippy=%2Chigher-position-rate)
918
+ // shows how often a competitor’s offer got placed in a higher position on the
919
+ // page than your offer.
920
+ //
921
+ // Cannot be filtered on in the 'WHERE' clause.
922
+ optional double higher_position_rate = 10;
923
+
924
+ // [Relative visibility]
925
+ // (https://support.google.com/merchants/answer/11366442#zippy=%2Crelative-visibility)
926
+ // shows how often your competitors’ offers are shown compared to your offers.
927
+ // In other words, this is the number of displayed impressions of a competitor
928
+ // retailer divided by the number of your displayed impressions during a
929
+ // selected time range for a selected product category and country.
930
+ //
931
+ // Cannot be filtered on in the 'WHERE' clause.
932
+ optional double relative_visibility = 11;
933
+ }
934
+
935
+ // Fields available for query in `competitive_visibility_top_merchant_view`
936
+ // table.
937
+ //
938
+ // [Competitive
939
+ // visibility](https://support.google.com/merchants/answer/11366442) report with
940
+ // business with highest visibility.
941
+ //
942
+ // Values are only set for fields requested explicitly in the request's search
943
+ // query.
944
+ message CompetitiveVisibilityTopMerchantView {
945
+ // Date of this row.
946
+ //
947
+ // Cannot be selected in the `SELECT` clause. A condition on `date` is
948
+ // required in the `WHERE` clause.
949
+ google.type.Date date = 1;
950
+
951
+ // Domain of your competitor or your domain, if 'is_your_domain' is true.
952
+ //
953
+ // Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE'
954
+ // clause.
955
+ optional string domain = 2;
956
+
957
+ // True if this row contains data for your domain.
958
+ //
959
+ // Cannot be filtered on in the 'WHERE' clause.
960
+ optional bool is_your_domain = 3;
961
+
962
+ // Country where impressions appeared.
963
+ //
964
+ // Required in the `SELECT` clause. A condition on `report_country_code` is
965
+ // required in the `WHERE` clause.
966
+ optional string report_country_code = 4;
967
+
968
+ // Google product category ID to calculate the report for, represented in
969
+ // [Google's product
970
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
971
+ //
972
+ // Required in the `SELECT` clause. A condition on `report_category_id` is
973
+ // required in the `WHERE` clause.
974
+ optional int64 report_category_id = 5;
975
+
976
+ // Traffic source of impressions.
977
+ //
978
+ // Required in the `SELECT` clause.
979
+ optional TrafficSource.TrafficSourceEnum traffic_source = 6;
980
+
981
+ // Position of the domain in the top merchants ranking for the selected keys
982
+ // (`date`, `report_category_id`, `report_country_code`, `traffic_source`)
983
+ // based on impressions. 1 is the highest.
984
+ //
985
+ // Cannot be filtered on in the 'WHERE' clause.
986
+ optional int64 rank = 7;
987
+
988
+ // [Ads / organic ratio]
989
+ // (https://support.google.com/merchants/answer/11366442#zippy=%2Cads-free-ratio)
990
+ // shows how often the domain receives impressions from Shopping ads compared
991
+ // to organic traffic. The number is rounded and bucketed.
992
+ //
993
+ // Cannot be filtered on in the 'WHERE' clause.
994
+ optional double ads_organic_ratio = 8;
995
+
996
+ // [Page overlap rate]
997
+ // (https://support.google.com/merchants/answer/11366442#zippy=%2Cpage-overlap-rate)
998
+ // shows how frequently competing retailers’ offers are shown together with
999
+ // your offers on the same page.
1000
+ //
1001
+ // Cannot be filtered on in the 'WHERE' clause.
1002
+ optional double page_overlap_rate = 9;
1003
+
1004
+ // [Higher position rate]
1005
+ // (https://support.google.com/merchants/answer/11366442#zippy=%2Chigher-position-rate)
1006
+ // shows how often a competitor’s offer got placed in a higher position on the
1007
+ // page than your offer.
1008
+ //
1009
+ // Cannot be filtered on in the 'WHERE' clause.
1010
+ optional double higher_position_rate = 10;
1011
+ }
1012
+
1013
+ // Fields available for query in `competitive_visibility_benchmark_view` table.
1014
+ //
1015
+ // [Competitive
1016
+ // visibility](https://support.google.com/merchants/answer/11366442) report with
1017
+ // the category benchmark.
1018
+ //
1019
+ // Values are only set for fields requested explicitly in the request's search
1020
+ // query.
1021
+ message CompetitiveVisibilityBenchmarkView {
1022
+ // Date of this row.
1023
+ //
1024
+ // Required in the `SELECT` clause. A condition on `date` is required in the
1025
+ // `WHERE` clause.
1026
+ google.type.Date date = 1;
1027
+
1028
+ // Country where impressions appeared.
1029
+ //
1030
+ // Required in the `SELECT` clause. A condition on `report_country_code` is
1031
+ // required in the `WHERE` clause.
1032
+ optional string report_country_code = 2;
1033
+
1034
+ // Google product category ID to calculate the report for, represented in
1035
+ // [Google's product
1036
+ // taxonomy](https://support.google.com/merchants/answer/6324436).
1037
+ //
1038
+ // Required in the `SELECT` clause. A condition on `report_category_id` is
1039
+ // required in the `WHERE` clause.
1040
+ optional int64 report_category_id = 3;
1041
+
1042
+ // Traffic source of impressions.
1043
+ //
1044
+ // Required in the `SELECT` clause.
1045
+ optional TrafficSource.TrafficSourceEnum traffic_source = 4;
1046
+
1047
+ // Change in visibility based on impressions for your domain with respect to
1048
+ // the start of the selected time range (or first day with non-zero
1049
+ // impressions).
1050
+ //
1051
+ // Cannot be filtered on in the 'WHERE' clause.
1052
+ optional double your_domain_visibility_trend = 5;
1053
+
1054
+ // Change in visibility based on impressions with respect to the start of the
1055
+ // selected time range (or first day with non-zero impressions) for a
1056
+ // combined set of merchants with highest visibility approximating the
1057
+ // market.
1058
+ //
1059
+ // Cannot be filtered on in the 'WHERE' clause.
1060
+ optional double category_benchmark_visibility_trend = 6;
1061
+ }
1062
+
1063
+ // Marketing method used to promote your products on Google (organic versus
1064
+ // ads).
1065
+ message MarketingMethod {
1066
+ // Marketing method values.
1067
+ enum MarketingMethodEnum {
1068
+ // Not specified.
1069
+ MARKETING_METHOD_ENUM_UNSPECIFIED = 0;
1070
+
1071
+ // Organic marketing.
1072
+ ORGANIC = 1;
1073
+
1074
+ // Ads-based marketing.
1075
+ ADS = 2;
1076
+ }
1077
+ }
1078
+
1079
+ // Granularity of the Best sellers report. Best sellers reports are computed
1080
+ // over a week and a month timeframe.
1081
+ message ReportGranularity {
1082
+ // Report granularity values.
1083
+ enum ReportGranularityEnum {
1084
+ // Not specified.
1085
+ REPORT_GRANULARITY_ENUM_UNSPECIFIED = 0;
1086
+
1087
+ // Report is computed over a week timeframe.
1088
+ WEEKLY = 1;
1089
+
1090
+ // Report is computed over a month timeframe.
1091
+ MONTHLY = 2;
1092
+ }
1093
+ }
1094
+
1095
+ // Relative demand of a product cluster or brand in the Best sellers report.
1096
+ message RelativeDemand {
1097
+ // Relative demand values.
1098
+ enum RelativeDemandEnum {
1099
+ // Not specified.
1100
+ RELATIVE_DEMAND_ENUM_UNSPECIFIED = 0;
1101
+
1102
+ // Demand is 0-5% of the demand of the highest ranked product cluster or
1103
+ // brand.
1104
+ VERY_LOW = 10;
1105
+
1106
+ // Demand is 6-10% of the demand of the highest ranked product cluster or
1107
+ // brand.
1108
+ LOW = 20;
1109
+
1110
+ // Demand is 11-20% of the demand of the highest ranked product cluster or
1111
+ // brand.
1112
+ MEDIUM = 30;
1113
+
1114
+ // Demand is 21-50% of the demand of the highest ranked product cluster or
1115
+ // brand.
1116
+ HIGH = 40;
1117
+
1118
+ // Demand is 51-100% of the demand of the highest ranked product cluster or
1119
+ // brand.
1120
+ VERY_HIGH = 50;
1121
+ }
1122
+ }
1123
+
1124
+ // Relative demand of a product cluster or brand in the Best sellers report
1125
+ // compared to the previous time period.
1126
+ message RelativeDemandChangeType {
1127
+ // Relative demand change type values.
1128
+ enum RelativeDemandChangeTypeEnum {
1129
+ // Not specified.
1130
+ RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED = 0;
1131
+
1132
+ // Relative demand is lower than the previous time period.
1133
+ SINKER = 1;
1134
+
1135
+ // Relative demand is equal to the previous time period.
1136
+ FLAT = 2;
1137
+
1138
+ // Relative demand is higher than the previous time period.
1139
+ RISER = 3;
1140
+ }
1141
+ }
1142
+
1143
+ // Traffic source of impressions in the Competitive visibility report.
1144
+ message TrafficSource {
1145
+ // Traffic source values.
1146
+ enum TrafficSourceEnum {
1147
+ // Not specified.
1148
+ TRAFFIC_SOURCE_ENUM_UNSPECIFIED = 0;
1149
+
1150
+ // Organic traffic.
1151
+ ORGANIC = 1;
1152
+
1153
+ // Traffic from ads.
1154
+ ADS = 2;
1155
+
1156
+ // Organic and ads traffic.
1157
+ ALL = 3;
1158
+ }
1159
+ }