Correct Syntax for NetworkSetting using Node.js

20 views
Skip to first unread message

Mark Anthony Gutierrez

unread,
Feb 7, 2018, 2:24:38 AM2/7/18
to AdWords API Forum
Hello everyone,

Can someone help me for the right syntax to write the NetworkSetting in Nodejs?

I've tried this:
let selector = {
searchParameters: [{
'xsi:type': 'RelatedToQuerySearchParameter',
queries: keyword_slice
}, {
'xsi:type': 'LanguageSearchParameter',
languages: [{'cm:id': 1000}]
}, {
'xsi:type': 'LocationSearchParameter',
locations: [{'cm:id': location}]
}, {
'xsi:type': 'NetworkSearchParameter',
networkSetting: [{'targetGoogleSearch': true}]
}]

But its not working.. need help thanks!


Vincent Racaza (AdWords API Team)

unread,
Feb 7, 2018, 4:10:32 AM2/7/18
to AdWords API Forum
Hi Mark Anthony,

The NodeJS client library is not supported by our team as this is not one of the official client libraries for the AdWords API. This said, I will just provide you the equivalent SOAP request snippet in setting this field so you can emulate on your end. Also, it seems that you are using the TargetingIdeaService based on your parameters. Below is the sample SOAP request snippet with the networkSetting field:

<searchParameters xmlns:ns10="https://adwords.google.com/api/adwords/o/v201710" xsi:type="ns10:NetworkSearchParameter">
    <ns10:networkSetting>
        <ns11:targetGoogleSearch xmlns:ns11="https://adwords.google.com/api/adwords/cm/v201710">true</ns11:targetGoogleSearch>
        <ns12:targetSearchNetwork xmlns:ns12="https://adwords.google.com/api/adwords/cm/v201710">false</ns12:targetSearchNetwork>
        <ns13:targetContentNetwork xmlns:ns13="https://adwords.google.com/api/adwords/cm/v201710">false</ns13:targetContentNetwork>
        <ns14:targetPartnerSearchNetwork xmlns:ns14="https://adwords.google.com/api/adwords/cm/v201710">false</ns14:targetPartnerSearchNetwork>
    </ns10:networkSetting>
</searchParameters>

Hope this helps.

Thanks,
Vincent
AdWords API Team
Reply all
Reply to author
Forward
0 new messages