HI Guys, We use the targetingideaservice to get alternative keywords but we are getting 3 results for every seed keyword which I understand is for, broad,exact and phrase. But it is all exactly the same.
cheap airline tickets/EXACT cheap airline tickets/BROAD cheap airline tickets/PHRASE airline tickets/BROAD airline tickets/EXACT airline tickets/PHRASE In the Adwords API Blog I found this code: // Using the same keyword from above, filter by removing the original // keyword, by keeping the same match type, and by only choosing // "long-tail" keywords. new ExcludedKeywordSearchParameter(null, new Keyword[] {keyword}), new KeywordMatchTypeSearchParameter(null, new KeywordMatchType[] {keyword.getMatchType()}), new CompetitionSearchParameter(null, new CompetitionSearchParameterLevel[] { CompetitionSearchParameterLevel.LOW}), The results are now more interesting: legion air tickets/BROAD air tram tickets/BROAD block air tickets/BROAD sheap air tickets/BROAD cheap airfare tracker/BROAD cheap airfare forum/BROAD I want to be able to get the keywords in the second format, but the code in the blog is not working it is seems to be of an older version of the library. Can anyone please help me to remove the duplicate entries from the results? Here is my current code if someone needs to see it. Thanks try { // Get the TargetingIdeaService. TargetingIdeaService targetingIdeaService = (TargetingIdeaService)user.GetService(AdWordsService.v200909.TargetingIdeaService); string keywordText = strSeedKeyword; Keyword keyword = new Keyword(); keyword.text = keywordText; keyword.matchTypeSpecified = true; keyword.matchType = thisKeyWordType; RelatedToKeywordSearchParameter searchParameter = new RelatedToKeywordSearchParameter(); searchParameter.keywords = new Keyword[] { keyword }; TargetingIdeaSelector selector = new TargetingIdeaSelector(); selector.searchParameters = new SearchParameter[] { searchParameter }; selector.ideaTypeSpecified = true; selector.ideaType = IdeaType.KEYWORD; selector.requestTypeSpecified = true; selector.requestType = RequestType.IDEAS; Paging paging = new Paging(); paging.startIndex = 0; paging.startIndexSpecified = true; paging.numberResults = seedResults; paging.numberResultsSpecified = true; selector.paging = paging; try { TargetingIdeaPage page = targetingIdeaService.get(selector); if (page != null && page.entries != null) { foreach (TargetingIdea idea in page.entries) { foreach (Type_AttributeMapEntry entry in idea.data) { if (entry.key == AttributeType.KEYWORD) { KeywordAttribute kwdAttribute = entry.value as KeywordAttribute; seedVariations.Add(kwdAttribute.value.text); } } } } } catch (Exception ex) { logAdwordsMessageToFile("GetKeywordVariations, Keyword=" + strSeedKeyword + ex.Message); } } -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en