Exceptions like : INVALID_INCLUDED_EXCLUDED_KEYWORDS, DUPLICATE_SEARCH_FILTER_TYPES_PRESENT *QUESTION *: *Do we add multiple **CategoryProductsAndServicesSearchParameter objects to **SearchParameter ?* (Please answer this) * Please let us know , where is the mistake in the code.*
TargetingIdeaServiceInterface targetingIdeaService = user.getService(AdWordsService.V201309.TARGETING_IDEA_SERVICE); // Create selector. TargetingIdeaSelector selector = new TargetingIdeaSelector(); selector.setRequestType(RequestType.IDEAS); selector.setIdeaType(IdeaType.KEYWORD); selector.setRequestedAttributeTypes(new AttributeType[] { AttributeType.KEYWORD_TEXT, AttributeType.SEARCH_VOLUME, AttributeType.CATEGORY_PRODUCTS_AND_SERVICES, AttributeType.COMPETITION }); Paging paging = new Paging(); paging.setStartIndex(0); paging.setNumberResults(10); selector.setPaging(paging); LanguageSearchParameter languageParameter = new LanguageSearchParameter(); Language english = new Language(); english.setId(1000L); languageParameter.setLanguages(new Language[] {english}); // Preffered US Loaction Location location = new Location(); location.setId(2840L); LocationSearchParameter locationSearchParameter = new LocationSearchParameter(); locationSearchParameter.setLocations(new Location[]{location}); ExcludedKeywordSearchParameter excludedKeywordSearchParameter = new ExcludedKeywordSearchParameter(); Keyword keyword1 = new Keyword(); keyword1.setText("mars cruise"); keyword1.setMatchType(KeywordMatchType.EXACT); excludedKeywordSearchParameter.setKeywords(new Keyword[] {keyword1}); IdeaTextFilterSearchParameter ideaTextMatchesSearchParameter = new IdeaTextFilterSearchParameter(); ideaTextMatchesSearchParameter.setIncluded(new String[] {"mars cruise"}); // Create related to query search parameter. RelatedToQuerySearchParameter relatedToQuerySearchParameter = new RelatedToQuerySearchParameter(); relatedToQuerySearchParameter.setQueries(new String[] {"mars cruise"}); //we can request competition search parameter. CompetitionSearchParameter competitionSearchParameter = new CompetitionSearchParameter(); CompetitionSearchParameterLevel[] levels = {CompetitionSearchParameterLevel.MEDIUM, CompetitionSearchParameterLevel.HIGH}; competitionSearchParameter.setLevels(levels); CategoryProductsAndServicesSearchParameter category1 = new CategoryProductsAndServicesSearchParameter(); category1.setCategoryId(10021); CategoryProductsAndServicesSearchParameter category2 = new CategoryProductsAndServicesSearchParameter(); category2.setCategoryId(10005); CategoryProductsAndServicesSearchParameter category3 = new CategoryProductsAndServicesSearchParameter(); category3.setCategoryId(10004); CategoryProductsAndServicesSearchParameter category4 = new CategoryProductsAndServicesSearchParameter(); category4.setCategoryId(10019); CategoryProductsAndServicesSearchParameter category5 = new CategoryProductsAndServicesSearchParameter(); category5.setCategoryId(10020); CategoryProductsAndServicesSearchParameter category6 = new CategoryProductsAndServicesSearchParameter(); category6.setCategoryId(10010); selector.setSearchParameters(new SearchParameter[] { relatedToQuerySearchParameter, languageParameter, locationSearchParameter, excludedKeywordSearchParameter, competitionSearchParameter, ideaTextMatchesSearchParameter, category1,category2,category3,category4,category5,category6 }); selector.setLocaleCode("US"); TargetingIdeaPage page = targetingIdeaService.get(selector); System.out.println(selector +"\n"+page.getEntries().length); .... etc -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.