How to get the list of AdGroups the Audience is connected to? We can get the reverse thing ie the List of Audience(UserList) connected to a AdGroups using below Adwords API.
AdGroupCriterionPage adGroupCriterionPage = adGroupCriterionService.get(
new SelectorBuilder()
.fields("AdGroupId","UserListId")
.equals("CriteriaType",CriterionType._USER_LIST)
.equals("AdGroupId","624760644934")
.build());
if(adGroupCriterionPage.getEntries()!=null){
for (AdGroupCriterion adGroupCriterionList : adGroupCriterionPage.getEntries()) {
CriterionUserList criterionUserList = (CriterionUserList)adGroupCriterionList.getCriterion();
System.out.printf("AdGroup id: %d, UserListId: %s",
adGroupCriterionList.getAdGroupId(),
criterionUserList.getUserListId());
System.out.println();
}
}
Regards,
Anurag Sinha