keyword_plan_idea_service.proto 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.ads.googleads.v10.services;
  16. import "google/ads/googleads/v10/common/keyword_plan_common.proto";
  17. import "google/ads/googleads/v10/enums/keyword_plan_keyword_annotation.proto";
  18. import "google/ads/googleads/v10/enums/keyword_plan_network.proto";
  19. import "google/api/annotations.proto";
  20. import "google/api/client.proto";
  21. option csharp_namespace = "Google.Ads.GoogleAds.V10.Services";
  22. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/services;services";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "KeywordPlanIdeaServiceProto";
  25. option java_package = "com.google.ads.googleads.v10.services";
  26. option objc_class_prefix = "GAA";
  27. option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Services";
  28. option ruby_package = "Google::Ads::GoogleAds::V10::Services";
  29. // Proto file describing the keyword plan idea service.
  30. // Service to generate keyword ideas.
  31. service KeywordPlanIdeaService {
  32. option (google.api.default_host) = "googleads.googleapis.com";
  33. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
  34. // Returns a list of keyword ideas.
  35. //
  36. // List of thrown errors:
  37. // [AuthenticationError]()
  38. // [AuthorizationError]()
  39. // [CollectionSizeError]()
  40. // [HeaderError]()
  41. // [InternalError]()
  42. // [KeywordPlanIdeaError]()
  43. // [QuotaError]()
  44. // [RequestError]()
  45. rpc GenerateKeywordIdeas(GenerateKeywordIdeasRequest) returns (GenerateKeywordIdeaResponse) {
  46. option (google.api.http) = {
  47. post: "/v10/customers/{customer_id=*}:generateKeywordIdeas"
  48. body: "*"
  49. };
  50. }
  51. // Returns a list of keyword historical metrics.
  52. //
  53. // List of thrown errors:
  54. // [AuthenticationError]()
  55. // [AuthorizationError]()
  56. // [CollectionSizeError]()
  57. // [HeaderError]()
  58. // [InternalError]()
  59. // [QuotaError]()
  60. // [RequestError]()
  61. rpc GenerateKeywordHistoricalMetrics(GenerateKeywordHistoricalMetricsRequest) returns (GenerateKeywordHistoricalMetricsResponse) {
  62. option (google.api.http) = {
  63. post: "/v10/customers/{customer_id=*}:generateKeywordHistoricalMetrics"
  64. body: "*"
  65. };
  66. }
  67. }
  68. // Request message for [KeywordPlanIdeaService.GenerateKeywordIdeas][google.ads.googleads.v10.services.KeywordPlanIdeaService.GenerateKeywordIdeas].
  69. message GenerateKeywordIdeasRequest {
  70. // The ID of the customer with the recommendation.
  71. string customer_id = 1;
  72. // The resource name of the language to target.
  73. // Required
  74. optional string language = 14;
  75. // The resource names of the location to target.
  76. // Max 10
  77. repeated string geo_target_constants = 15;
  78. // If true, adult keywords will be included in response.
  79. // The default value is false.
  80. bool include_adult_keywords = 10;
  81. // Token of the page to retrieve. If not specified, the first
  82. // page of results will be returned. To request next page of results use the
  83. // value obtained from `next_page_token` in the previous response.
  84. // The request fields must match across pages.
  85. string page_token = 12;
  86. // Number of results to retrieve in a single page.
  87. // A maximum of 10,000 results may be returned, if the page_size
  88. // exceeds this, it is ignored.
  89. // If unspecified, at most 10,000 results will be returned.
  90. // The server may decide to further limit the number of returned resources.
  91. // If the response contains fewer than 10,000 results it may not be assumed
  92. // as last page of results.
  93. int32 page_size = 13;
  94. // Targeting network.
  95. google.ads.googleads.v10.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 9;
  96. // The keyword annotations to include in response.
  97. repeated google.ads.googleads.v10.enums.KeywordPlanKeywordAnnotationEnum.KeywordPlanKeywordAnnotation keyword_annotation = 17;
  98. // The aggregate fields to include in response.
  99. google.ads.googleads.v10.common.KeywordPlanAggregateMetrics aggregate_metrics = 16;
  100. // The options for historical metrics data.
  101. google.ads.googleads.v10.common.HistoricalMetricsOptions historical_metrics_options = 18;
  102. // The type of seed to generate keyword ideas.
  103. oneof seed {
  104. // A Keyword and a specific Url to generate ideas from
  105. // e.g. cars, www.example.com/cars.
  106. KeywordAndUrlSeed keyword_and_url_seed = 2;
  107. // A Keyword or phrase to generate ideas from, e.g. cars.
  108. KeywordSeed keyword_seed = 3;
  109. // A specific url to generate ideas from, e.g. www.example.com/cars.
  110. UrlSeed url_seed = 5;
  111. // The site to generate ideas from, e.g. www.example.com.
  112. SiteSeed site_seed = 11;
  113. }
  114. }
  115. // Keyword And Url Seed
  116. message KeywordAndUrlSeed {
  117. // The URL to crawl in order to generate keyword ideas.
  118. optional string url = 3;
  119. // Requires at least one keyword.
  120. repeated string keywords = 4;
  121. }
  122. // Keyword Seed
  123. message KeywordSeed {
  124. // Requires at least one keyword.
  125. repeated string keywords = 2;
  126. }
  127. // Site Seed
  128. message SiteSeed {
  129. // The domain name of the site. If the customer requesting the ideas doesn't
  130. // own the site provided only public information is returned.
  131. optional string site = 2;
  132. }
  133. // Url Seed
  134. message UrlSeed {
  135. // The URL to crawl in order to generate keyword ideas.
  136. optional string url = 2;
  137. }
  138. // Response message for [KeywordPlanIdeaService.GenerateKeywordIdeas][google.ads.googleads.v10.services.KeywordPlanIdeaService.GenerateKeywordIdeas].
  139. message GenerateKeywordIdeaResponse {
  140. // Results of generating keyword ideas.
  141. repeated GenerateKeywordIdeaResult results = 1;
  142. // The aggregate metrics for all keyword ideas.
  143. google.ads.googleads.v10.common.KeywordPlanAggregateMetricResults aggregate_metric_results = 4;
  144. // Pagination token used to retrieve the next page of results.
  145. // Pass the content of this string as the `page_token` attribute of
  146. // the next request.
  147. // `next_page_token` is not returned for the last page.
  148. string next_page_token = 2;
  149. // Total number of results available.
  150. int64 total_size = 3;
  151. }
  152. // The result of generating keyword ideas.
  153. message GenerateKeywordIdeaResult {
  154. // Text of the keyword idea.
  155. // As in Keyword Plan historical metrics, this text may not be an actual
  156. // keyword, but the canonical form of multiple keywords.
  157. // See KeywordPlanKeywordHistoricalMetrics message in KeywordPlanService.
  158. optional string text = 5;
  159. // The historical metrics for the keyword.
  160. google.ads.googleads.v10.common.KeywordPlanHistoricalMetrics keyword_idea_metrics = 3;
  161. // The annotations for the keyword.
  162. // The annotation data is only provided if requested.
  163. google.ads.googleads.v10.common.KeywordAnnotations keyword_annotations = 6;
  164. // The list of close variants from the requested keywords that
  165. // are combined into this GenerateKeywordIdeaResult. See
  166. // https://support.google.com/google-ads/answer/9342105 for the
  167. // definition of "close variants".
  168. repeated string close_variants = 7;
  169. }
  170. // Request message for
  171. // [KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics][google.ads.googleads.v10.services.KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics].
  172. message GenerateKeywordHistoricalMetricsRequest {
  173. // The ID of the customer with the recommendation.
  174. string customer_id = 1;
  175. // A list of keywords to get historical metrics.
  176. // Not all inputs will be returned as a result of near-exact deduplication.
  177. // For example, if stats for "car" and "cars" are requested, only "car" will
  178. // be returned.
  179. // A maximum of 10,000 keywords can be used.
  180. repeated string keywords = 2;
  181. // The options for historical metrics data.
  182. google.ads.googleads.v10.common.HistoricalMetricsOptions historical_metrics_options = 3;
  183. }
  184. // Response message for
  185. // [KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics][google.ads.googleads.v10.services.KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics].
  186. message GenerateKeywordHistoricalMetricsResponse {
  187. // List of keywords and their historical metrics.
  188. repeated GenerateKeywordHistoricalMetricsResult results = 1;
  189. }
  190. // The result of generating keyword historical metrics.
  191. message GenerateKeywordHistoricalMetricsResult {
  192. // The text of the query associated with one or more keywords.
  193. // Note that we de-dupe your keywords list, eliminating close variants
  194. // before returning the keywords as text. For example, if your request
  195. // originally contained the keywords "car" and "cars", the returned search
  196. // query will only contain "cars". The list of de-duped queries will be
  197. // included in close_variants field.
  198. optional string text = 1;
  199. // The list of close variants from the requested keywords whose stats
  200. // are combined into this GenerateKeywordHistoricalMetricsResult.
  201. repeated string close_variants = 3;
  202. // The historical metrics for text and its close variants
  203. google.ads.googleads.v10.common.KeywordPlanHistoricalMetrics keyword_metrics = 2;
  204. }