Google Adwords API Language selector problem

167 views
Skip to first unread message

Mustafa

unread,
Feb 7, 2017, 9:20:59 AM2/7/17
to AdWords API Forum
Hi, this is the very first question on this forum, sorry for any mistakes...

I am working with Google Adwords API 201609 for a while and after finishing the basic coding tries Language() selector to identify language specific results. But if I choose a language and there are no results for keyword, its not returning 0 as result. Instead it fails and results become NULL. If I try the same keyword without a language selector it gives me zeros as results. Could you please tell me what is going wrong on this code?

            $languageParameter = new LanguageSearchParameter();
            $languageSet = new Language();
            $languageSet->setId(1000);
            $languageParameter->setLanguages([$languageSet]);
            $searchParameters[] = $languageParameter;

Are there any rules that I don't know to set language for keywords with no results?

Thanks in advance...

Vishal Vinayak (Adwords API Team)

unread,
Feb 7, 2017, 1:55:25 PM2/7/17
to AdWords API Forum
Hi Mustafa,

Are you trying to generate keyword ideas / stats using the TargetingIdeaService? In that case, you can refer to this example in PHP to set appropriate language criteria. Please note that if you try to use a keyword from a language other than English, you would need to set the appropriate language code here. A list of all language criteria codes is available here. If that doesn't help, could you please provide me with the SOAP XML request and response logs for the API call that returns null values? You can refer to this tutorial to enable logging in your PHP client library. Please click on Reply privately to author when responding.

Regards,
Vishal, AdWords API Team
Message has been deleted

Mustafa

unread,
Feb 8, 2017, 1:25:20 AM2/8/17
to AdWords API Forum
Hi Vishal and thank you for your answer.

The problem is base code and language id is correct. The problem is a little bit interesting let me explain if I can, and will send you logs if able to get them. I am using TargetingIdeaService stats not ideas...

If you select a Turkish word and make the language id 1037 it returns with NULL values but if you disable language selector it returns 0 as values. There are several thing I've mentioned like if the word is homonymous with another language word it fails... Why should I select the right language for word to make it work properly, it can just return 0 if there are no results. I can give samples like this as: "bol", "cep", "nice (not the English one :P)", etc.

Thank you for your time.

7 Şubat 2017 Salı 21:55:25 UTC+3 tarihinde Vishal Vinayak (Adwords API Team) yazdı:

Vishal Vinayak (Adwords API Team)

unread,
Feb 8, 2017, 10:58:27 AM2/8/17
to AdWords API Forum
Hi Mustafa,

Could you please send me SOAP XML request and response logs for each request separately, so that I'm able to debug this issue further?  
Reply all
Reply to author
Forward
Message has been deleted
0 new messages