How to get IDs of custom audiences?

84 views
Skip to first unread message

Boris Dziundziuk

unread,
Aug 30, 2019, 9:33:08 AM8/30/19
to AdWords API and Google Ads API Forum
Hello! I need to get IDs of custom audiences (custom intent, custom affinity). Does anyone know how to do it? The only way I've found is to manually copy the audiences table with ID column but it's not an option because new audiences are created every day and there are 1000+ of them.

Google Ads API Forum Advisor Prod

unread,
Aug 30, 2019, 12:42:41 PM8/30/19
to b.dziu...@promodo.com, adwor...@googlegroups.com

Hi Boris,

Thank you for reaching support. With regards to your concern, you could get the IDs of custom audiences (custom intent, custom affinity) using the below approaches.

SelectorBuilder builder = new SelectorBuilder();
Selector selector = builder.fields(AdGroupCriterionField.values())
.equals(AdGroupCriterionField.CriteriaType, "CUSTOM_INTENT")
.build();

Here is an example: 
'criterion': {
   'id': 8xx4xxx87xx3,
   'type': 'CUSTOM_INTENT',
   'Criterion.Type': 'CriterionCustomIntent',
   'customIntentId': 3xxx9xx3
}

 

​​​​​​​Let us know if you need additional information.

Regards,
Nikisha Patel, Google Ads API Team



ref:_00D1U1174p._5001UHFDOf:ref

cv

unread,
Dec 22, 2020, 1:01:58 AM12/22/20
to AdWords API and Google Ads API Forum
Hi,

How I can get this using Google Ads API?

Thanks,

Google Ads API Forum Advisor Prod

unread,
Dec 22, 2020, 1:20:22 PM12/22/20
to chirag....@gmail.com, adwor...@googlegroups.com
Hello,

Custom audience ID can be obtained from the custom audience resource. You can get this through reports using, for example:

  SELECT custom_audience.id FROM custom_audience

Or you can use the CustomAudienceService.

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5001UHFDOf:ref
Reply all
Reply to author
Forward
0 new messages