1
votes

Google provides nice examples of getting TextAd via API: https://code.google.com/p/google-api-adwords-php/source/browse/examples/v201209/BasicOperations/GetTextAds.php

I expected that getting DynamicSearchAd will be as easy as modifying line 54 to:

$selector->predicates[] = new Predicate('AdType', 'IN', array('TEXT_AD', 'DYNAMIC_SAERCH_AD'));

however for campaign with bunch of negative keywords, 0 postiive keywords and bunch of ads [ visible in the interface ] my result is buch of negative keywords and 0 ads, like they were not existing. I have googled for quite a long time already, but most recent post about keywordless ads is from 2012 and since then I believe that DynamicSearchAds went out from beta and are not available for everyone.

I played quite a little bit with sample example, changing fields [ like removing Headline and leaving only Id etc ], without success.

So my question is, how should I modify this example to obtain DSA ?

1

1 Answers

1
votes

You've got missprint on constant in Predicate.

'DYNAMIC_SAERCH_AD' must be 'DYNAMIC_SEARCH_AD'