Google Ads API - can I specify 'matchType' while looking for keyword traffic in GenerateKeywordIdeas?
I may be doing it the wrong way but I want, at first, to extract keyword traffic information like I did with TrafficEstimationService
in the (now deprecated) AdWords API. My code looks like this (with some edits here and there):
# [... some initialization (clients, service accounts, etc.) bits here] # fetch an instance of the Google Ads client gc = GoogleAdsClient.load_from_storage(gads_credentials_file, version="v10") # fetch an instance of the Google Ads service gs = gc.get_service("GoogleAdsService") # fetch an instance of the Geo Target Constant service gtcs = gc.get_service("GeoTargetConstantService").geo_target_constant_path # fetch an instance of the keyword plan idea service ks = gc.get_service("KeywordPlanIdeaService") # build the initial search request rq = gc.get_type("GenerateKeywordIdeasRequest") rq.customer_id = gads_account_id.replace("-", '') rq.geo_target_constants = [gtcs(get_location_id(gads_country))] rq.keyword_plan_network = (gc.enums.KeywordPlanNetworkEnum.GOOGLE_SEARCH_AND_PARTNERS) rq.language = gs.language_constant_path(get_language_id(gads_language)) rq.keyword_annotation = gc.enums.KeywordPlanKeywordAnnotationEnum if len(gads_keywords) > 0: rq.keyword_seed.keywords.extend(gads_keywords) # generate keyword ideas keyword_ideas = ks.generate_keyword_ideas(request=rq) rows = [] for idea in keyword_ideas: rows.append({ "date": r, "text": idea.text, "competition_value": idea.keyword_idea_metrics.competition.name, "avg_monthly_searches": idea.keyword_idea_metrics.avg_monthly_searches })
So far, so good. I can specify location and language and (of course) they keywords to look for. At the end of this request, I have something like this (just printing the first list item):
{'date': '2022-08-09', 'text': 'zapatos', 'competition_value': 'MEDIUM', 'avg_monthly_searches': 301000}
The problem I have is I have been requested to ensure the match type is EXACT but looking at both the documentation and the source code for KeywordPlanIdeaService
there is no trace of this parameter. That's why I assume I'm doing it wrong (or maybe I'm lacking something here). In any case, I'm a bit lost.
Can you tell me how can I specify this (if it can be done) or an alternate way to accomplish this?