Hi, Your code looks great, but I think you are missing just one step, which is to set your dateRange on the statsSelector. It looks like currently you are creating it and then never sending it in the request. In situations like these I recommend you take a look at the resulting SOAP XML, as this problem would become apparent.
Best, - Eric Koleda, AdWords API Team On Feb 9, 10:49 pm, d3onlinemarketing <vadakoconsult...@gmail.com> wrote: > Hello, > > Can someone point me how using v200909 APIs i can get stats for a > particular keyWord. > > // Get the AdGroupCriterionService. > AdGroupCriterionServiceInterface adGroupCriterionService = > > user.getService(AdWordsService.V200909.ADGROUP_CRITERION_SERVICE); > // Create selector. > AdGroupCriterionSelector selector = new > AdGroupCriterionSelector(); > > // Create id filter. > AdGroupCriterionIdFilter idFilter = new > AdGroupCriterionIdFilter(); > idFilter.setAdGroupId(adGroupId); > selector.setIdFilters(new AdGroupCriterionIdFilter[] > {idFilter}); > > StatsSelector statsSelector = new StatsSelector(); > > DateRange dateRange = new DateRange(); > dateRange.setMin("20090121"); > dateRange.setMax("20090121"); > selector.setStatsSelector(statsSelector); > / Get all ad group criteria. > AdGroupCriterionPage page = > adGroupCriterionService.get(selector); > > // Display ad group criteria. > if (page.getEntries() != null && page.getEntries().length> 0) > > { > for (AdGroupCriterion adGroupCriterion : > page.getEntries()) > { > // at this point i am able to see adGroupCriterion > populated. however stats are all zero'd out. i am looking at data from > 2009; > // quality score is correctly prefilled > // firstPageCpc is correctly prefilled > // however com.google.api.adwords.v200909.cm.Stats > object seems to have everything set to default init values. i.e. > startData = null , impressions = 0 ( even though it is ~ 400 ) > } > } > > please advise -- 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-...@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.