Value for userInterestParentId field when adding audience

135 views
Skip to first unread message

Gary Jiang

unread,
Apr 16, 2018, 8:37:43 PM4/16/18
to AdWords API Forum
Hi,

I was trying to use AdWords API to add audience to some adgroups using CriterionUserInterest Criteria. While the root level audience group works properly, when I selected some level audience groups like /Banking & Finance/Avid Investors
, it didn't always work.

Here are some cases I encountered:

/Banking & Finance/Avid Investors, with Id of Banking & Finance as parent id Success
/Food & Dining/Frequently Dines Out/Diners by Meal with id of Food & Dining as parent id Failure

/Food & Dining/Frequently Dines Out/Diners by Meal with id of Food & Dining/Frequently Dines Out/ as parent id Failure

/Food & Dining/Frequently Dines Out with id of Food & Dining as parent id Failure

Could you tell me the exact value that I should put there since I didn't find it in the documentation? Thanks. 

Vincent Racaza (AdWords API Team)

unread,
Apr 17, 2018, 2:05:39 AM4/17/18
to AdWords API Forum
Hi Gary,

You just need to set the userInterestId field, and not the userInterestParentid field as this is a read-only field when creating a CriterionUserInterest. Kindly edit your request and let me know how it works. If any issues occur, please provide the SOAP request and response logs via Reply privately to author option so I can further check.

Thanks,
Vincent
AdWords API Team

Nadine Sundquist (AdWords API Team)

unread,
Apr 18, 2018, 10:00:11 AM4/18/18
to AdWords API Forum
Hello Gary,

Thank you for providing all the amazing details privately. They were really helpful in tracking this down. I'm answering out on the forum in case one of your fellow developers bumps into this. I turns out that the affinity categories we currently have listed in our documentation are a bit out of sync with the AdWords UI. We'll get them updated right away. Those categories that are giving you an error don't even exist in the AdWords UI. In our back-end system, they must have been recently removed, and we didn't update our list to reflect that. Thank you for catching this and bringing this to our attention. Unfortunately, this means those categories are no longer available, but at least you've helped some people by making sure our documentation gets updated. Thank you!

Best,
Nadine, AdWords API Team

Gary Jiang

unread,
Apr 18, 2018, 12:45:41 PM4/18/18
to AdWords API Forum
No problem. Actually it would be great that if there is an API fetching affinity group in the future.

Gary Jiang

unread,
Apr 18, 2018, 12:48:43 PM4/18/18
to AdWords API Forum
Also can we have a list of outdated categories in the CSV file so far? Thanks


On Wednesday, April 18, 2018 at 7:00:11 AM UTC-7, Nadine Sundquist (AdWords API Team) wrote:

Matthew Wawrin

unread,
Apr 18, 2018, 6:06:23 PM4/18/18
to AdWords API Forum
I'm assuming that this fix to the API is why I'm now seeing errors for user interest categories that we've been using for months are now throwing errors and are no longer documented in the list.

I see specific brands we were using are no longer available. Is there a specific reason these were removed?

When these criteria lists change, are they announced anywhere?

Thanks

Nadine Sundquist (AdWords API Team)

unread,
Apr 18, 2018, 11:07:47 PM4/18/18
to AdWords API Forum
Hello Gary,

I don't have a CSV ready to go because we have to go through the process of getting that properly published, but we do have an API service that can get you this list. You can use ConstantDataService.getUserInterestCriterion() to get back the list of available ones already. Please get back to me if you see those old ones when you pull them down through that service. That would mean that there is a further issue. I've found that service is up-to-date, though.

Cheers,
Nadine, AdWords API Team

Nadine Sundquist (AdWords API Team)

unread,
Apr 18, 2018, 11:09:53 PM4/18/18
to AdWords API Forum
Hello Matthew,

My assumption was that this was a one-off, but it sounds like you might be separate from Gary? It is unusual for things to just disappear like that. I would have to pop through our announcements. What day exactly did you start seeing these errors? That would help me narrow down when exactly they were removed.

Thanks,
Nadine, AdWords API Team

Matthew Wawrin

unread,
Apr 18, 2018, 11:30:09 PM4/18/18
to AdWords API Forum
Hi Nadine, 

I re-checked our logs and found that it appears to started giving errors from 2018-04-10.  Our usage of these criteria is relatively new compared to others (keywords, locations, etc) and the verification on all the required user interests wasn't working properly. 

I hadn't realised we could pull this list with the ConstantDataService.  I'll start using this to keep our lists up to date.  
Any announcements to the changes of these lists would still be very helpful.  We were using these as targeting for specific products and were also planning on building a new campaign around these as well.

I can message you privately if you'd like the list of ids we were using. 

Also, what happens to any adgroups targeting the removed user interest categories?  

Thanks,
Matt.

Matthew Wawrin

unread,
Apr 19, 2018, 12:23:37 PM4/19/18
to AdWords API Forum
Hi,

Mea culpa, I was looking at the affinity list and not in-market list.  There were removed brands in the in-market list but only a few.  I didn't realize the ids that were causing  errors were only 5 unique values, and the brands I see removed make sense they're gone.  (Hummer, Pontiac, etc).  
Sorry for the confusion.  Ticket is open to sync with the ConstantDataService and we should get this in shortly.

Matt.

Gary Jiang

unread,
Apr 19, 2018, 1:17:52 PM4/19/18
to AdWords API Forum
Great! Thanks a lot.

Nadine Sundquist (AdWords API Team)

unread,
Apr 19, 2018, 4:06:16 PM4/19/18
to AdWords API Forum
Hello All,

Thank you so much for following up! That makes a lot more sense. We'll be updating our docs shortly. We're in the process of doing that now. Thanks again for being such good citizens and bringing this up!

Regards,
Nadine, AdWords API Team

Gary Jiang

unread,
Apr 23, 2018, 2:49:48 PM4/23/18
to AdWords API and Google Ads API Forum
INFO:googleads.common:2018-04-23 18:06:04,555 SOAP response:
 <?xml version="1.0" encoding="UTF-8"?>
 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
       <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201802">
          <requestId>00056a87e424f2080a62e416d80f31ee</requestId>
          <serviceName>ConstantDataService</serviceName>
          <methodName>getUserInterestCriterion</methodName>
          <operations>1</operations>
          <responseTime>217</responseTime>
       </ResponseHeader>
    </soap:Header>
    <soap:Body>
       <soap:Fault>
          <faultcode>soap:Server</faultcode>
          <faultstring>[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro]</faultstring>
          <detail>
             <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201802">
                <message>[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro]</message>
                <ApplicationException.Type>ApiException</ApplicationException.Type>
                <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="InternalApiError">
                   <fieldPath/>
                   <trigger/>
                   <errorString>InternalApiError.UNEXPECTED_INTERNAL_API_ERROR</errorString>
                   <ApiError.Type>InternalApiError</ApiError.Type>
                   <reason>UNEXPECTED_INTERNAL_API_ERROR</reason>
                </errors>
             </ApiExceptionFault>
          </detail>
       </soap:Fault>
    </soap:Body>
 </soap:Envelope>
 This is what I got when I tried calling  ConstantDataService.getUserInterestCriterion() API, do I always need to pass a type?

Nadine Sundquist (AdWords API Team)

unread,
Apr 23, 2018, 4:42:55 PM4/23/18
to AdWords API and Google Ads API Forum
Hi Gary,

I admit that error is pretty unclear. Yes, you are totally right. You do need to pass in a type. 

Regards,
Nadine, AdWords API Team

Gary Jiang

unread,
Apr 23, 2018, 4:57:19 PM4/23/18
to AdWords API and Google Ads API Forum
I see. So which type should I pass for affinity user interest?

Nadine Sundquist (AdWords API Team)

unread,
Apr 23, 2018, 6:49:50 PM4/23/18
to AdWords API and Google Ads API Forum
Hello Gary,

Please use a userInterestTaxonomyType of BRAND. I just ran it myself to double-check. That will get you the list that you need. 

Take care,
Nadine, AdWords API Team

Gary Jiang

unread,
Apr 23, 2018, 8:33:49 PM4/23/18
to AdWords API and Google Ads API Forum
Thanks. I tried calling getUserInterestCriterion with  {'userInterestTaxonomyType': 'BRAND'} but got TypeNotFound: Type not found: 'userInterestTaxonomyType'. I am using Python and it would be very appreciated that you could provide an example. 

Nadine Sundquist (AdWords API Team)

unread,
Apr 24, 2018, 12:04:47 PM4/24/18
to AdWords API and Google Ads API Forum
Hello Gary,

This method is a little different than most methods you may be familiar with. What you need to write is similar to this example where we show how to use the ConsantDataService. However, the one difference will be that it will look more like this:

  constant_data_service = client.GetService(
     
'ConstantDataService', version='v201802')


  affinities
= constant_data_service.getUserInterestCriterion('BRAND')

You just pass the argument straight in.

Cheers,
Nadine, AdWords API Team


Gary Jiang

unread,
Apr 24, 2018, 3:02:12 PM4/24/18
to AdWords API and Google Ads API Forum
Ok. Thanks a lot.
Reply all
Reply to author
Forward
0 new messages