123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- // Copyright 2022 Google LLC
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
- syntax = "proto3";
- package google.ads.googleads.v10.services;
- import "google/ads/googleads/v10/common/keyword_plan_common.proto";
- import "google/ads/googleads/v10/enums/keyword_plan_keyword_annotation.proto";
- import "google/ads/googleads/v10/enums/keyword_plan_network.proto";
- import "google/api/annotations.proto";
- import "google/api/client.proto";
- option csharp_namespace = "Google.Ads.GoogleAds.V10.Services";
- option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/services;services";
- option java_multiple_files = true;
- option java_outer_classname = "KeywordPlanIdeaServiceProto";
- option java_package = "com.google.ads.googleads.v10.services";
- option objc_class_prefix = "GAA";
- option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Services";
- option ruby_package = "Google::Ads::GoogleAds::V10::Services";
- // Proto file describing the keyword plan idea service.
- // Service to generate keyword ideas.
- service KeywordPlanIdeaService {
- option (google.api.default_host) = "googleads.googleapis.com";
- option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
- // Returns a list of keyword ideas.
- //
- // List of thrown errors:
- // [AuthenticationError]()
- // [AuthorizationError]()
- // [CollectionSizeError]()
- // [HeaderError]()
- // [InternalError]()
- // [KeywordPlanIdeaError]()
- // [QuotaError]()
- // [RequestError]()
- rpc GenerateKeywordIdeas(GenerateKeywordIdeasRequest) returns (GenerateKeywordIdeaResponse) {
- option (google.api.http) = {
- post: "/v10/customers/{customer_id=*}:generateKeywordIdeas"
- body: "*"
- };
- }
- // Returns a list of keyword historical metrics.
- //
- // List of thrown errors:
- // [AuthenticationError]()
- // [AuthorizationError]()
- // [CollectionSizeError]()
- // [HeaderError]()
- // [InternalError]()
- // [QuotaError]()
- // [RequestError]()
- rpc GenerateKeywordHistoricalMetrics(GenerateKeywordHistoricalMetricsRequest) returns (GenerateKeywordHistoricalMetricsResponse) {
- option (google.api.http) = {
- post: "/v10/customers/{customer_id=*}:generateKeywordHistoricalMetrics"
- body: "*"
- };
- }
- }
- // Request message for [KeywordPlanIdeaService.GenerateKeywordIdeas][google.ads.googleads.v10.services.KeywordPlanIdeaService.GenerateKeywordIdeas].
- message GenerateKeywordIdeasRequest {
- // The ID of the customer with the recommendation.
- string customer_id = 1;
- // The resource name of the language to target.
- // Required
- optional string language = 14;
- // The resource names of the location to target.
- // Max 10
- repeated string geo_target_constants = 15;
- // If true, adult keywords will be included in response.
- // The default value is false.
- bool include_adult_keywords = 10;
- // Token of the page to retrieve. If not specified, the first
- // page of results will be returned. To request next page of results use the
- // value obtained from `next_page_token` in the previous response.
- // The request fields must match across pages.
- string page_token = 12;
- // Number of results to retrieve in a single page.
- // A maximum of 10,000 results may be returned, if the page_size
- // exceeds this, it is ignored.
- // If unspecified, at most 10,000 results will be returned.
- // The server may decide to further limit the number of returned resources.
- // If the response contains fewer than 10,000 results it may not be assumed
- // as last page of results.
- int32 page_size = 13;
- // Targeting network.
- google.ads.googleads.v10.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 9;
- // The keyword annotations to include in response.
- repeated google.ads.googleads.v10.enums.KeywordPlanKeywordAnnotationEnum.KeywordPlanKeywordAnnotation keyword_annotation = 17;
- // The aggregate fields to include in response.
- google.ads.googleads.v10.common.KeywordPlanAggregateMetrics aggregate_metrics = 16;
- // The options for historical metrics data.
- google.ads.googleads.v10.common.HistoricalMetricsOptions historical_metrics_options = 18;
- // The type of seed to generate keyword ideas.
- oneof seed {
- // A Keyword and a specific Url to generate ideas from
- // e.g. cars, www.example.com/cars.
- KeywordAndUrlSeed keyword_and_url_seed = 2;
- // A Keyword or phrase to generate ideas from, e.g. cars.
- KeywordSeed keyword_seed = 3;
- // A specific url to generate ideas from, e.g. www.example.com/cars.
- UrlSeed url_seed = 5;
- // The site to generate ideas from, e.g. www.example.com.
- SiteSeed site_seed = 11;
- }
- }
- // Keyword And Url Seed
- message KeywordAndUrlSeed {
- // The URL to crawl in order to generate keyword ideas.
- optional string url = 3;
- // Requires at least one keyword.
- repeated string keywords = 4;
- }
- // Keyword Seed
- message KeywordSeed {
- // Requires at least one keyword.
- repeated string keywords = 2;
- }
- // Site Seed
- message SiteSeed {
- // The domain name of the site. If the customer requesting the ideas doesn't
- // own the site provided only public information is returned.
- optional string site = 2;
- }
- // Url Seed
- message UrlSeed {
- // The URL to crawl in order to generate keyword ideas.
- optional string url = 2;
- }
- // Response message for [KeywordPlanIdeaService.GenerateKeywordIdeas][google.ads.googleads.v10.services.KeywordPlanIdeaService.GenerateKeywordIdeas].
- message GenerateKeywordIdeaResponse {
- // Results of generating keyword ideas.
- repeated GenerateKeywordIdeaResult results = 1;
- // The aggregate metrics for all keyword ideas.
- google.ads.googleads.v10.common.KeywordPlanAggregateMetricResults aggregate_metric_results = 4;
- // Pagination token used to retrieve the next page of results.
- // Pass the content of this string as the `page_token` attribute of
- // the next request.
- // `next_page_token` is not returned for the last page.
- string next_page_token = 2;
- // Total number of results available.
- int64 total_size = 3;
- }
- // The result of generating keyword ideas.
- message GenerateKeywordIdeaResult {
- // Text of the keyword idea.
- // As in Keyword Plan historical metrics, this text may not be an actual
- // keyword, but the canonical form of multiple keywords.
- // See KeywordPlanKeywordHistoricalMetrics message in KeywordPlanService.
- optional string text = 5;
- // The historical metrics for the keyword.
- google.ads.googleads.v10.common.KeywordPlanHistoricalMetrics keyword_idea_metrics = 3;
- // The annotations for the keyword.
- // The annotation data is only provided if requested.
- google.ads.googleads.v10.common.KeywordAnnotations keyword_annotations = 6;
- // The list of close variants from the requested keywords that
- // are combined into this GenerateKeywordIdeaResult. See
- // https://support.google.com/google-ads/answer/9342105 for the
- // definition of "close variants".
- repeated string close_variants = 7;
- }
- // Request message for
- // [KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics][google.ads.googleads.v10.services.KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics].
- message GenerateKeywordHistoricalMetricsRequest {
- // The ID of the customer with the recommendation.
- string customer_id = 1;
- // A list of keywords to get historical metrics.
- // Not all inputs will be returned as a result of near-exact deduplication.
- // For example, if stats for "car" and "cars" are requested, only "car" will
- // be returned.
- // A maximum of 10,000 keywords can be used.
- repeated string keywords = 2;
- // The options for historical metrics data.
- google.ads.googleads.v10.common.HistoricalMetricsOptions historical_metrics_options = 3;
- }
- // Response message for
- // [KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics][google.ads.googleads.v10.services.KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics].
- message GenerateKeywordHistoricalMetricsResponse {
- // List of keywords and their historical metrics.
- repeated GenerateKeywordHistoricalMetricsResult results = 1;
- }
- // The result of generating keyword historical metrics.
- message GenerateKeywordHistoricalMetricsResult {
- // The text of the query associated with one or more keywords.
- // Note that we de-dupe your keywords list, eliminating close variants
- // before returning the keywords as text. For example, if your request
- // originally contained the keywords "car" and "cars", the returned search
- // query will only contain "cars". The list of de-duped queries will be
- // included in close_variants field.
- optional string text = 1;
- // The list of close variants from the requested keywords whose stats
- // are combined into this GenerateKeywordHistoricalMetricsResult.
- repeated string close_variants = 3;
- // The historical metrics for text and its close variants
- google.ads.googleads.v10.common.KeywordPlanHistoricalMetrics keyword_metrics = 2;
- }
|