Hi Priyantha, Unfortunately there is no example for the TargetingIdeaService using the AdWords API PHP client library. There is .NET example though that you might find helpful: http://code.google.com/p/google-api-adwords-dotnet/source/browse/trunk/Examples/v200909/GetTargetingIdeas.cs.
Looking at your code, you should use an instance of RelatedToKeywordSearchParameter not KeywordMatchTypeSearchParameter for passing in the seed keywords. Also, I'm not sure that your TargetingIdeaSelector is being constructed correctly. Please refer to the developer documentation for the available fields: http://code.google.com/apis/adwords/v2009/docs/reference/TargetingIdeaService.TargetingIdeaSelector.html. Best, - Eric Koleda, AdWords API Team On Oct 29, 4:17 am, Priyantha Gunawardena <pgdesign...@gmail.com> wrote: > Hi Any one has an example how to get keyword search Ideas in v200909. given > below is my code sample but having error in it. > > try { > // Get AdWordsUser from credentials in "../auth.ini" > // relative to the AdWordsUser.php file's directory. > $user = new AdWordsUser(); > > // Log SOAP XML request and response. > $user->LogDefaults(); > > // Get the CampaignService. > $targettingIdeaService = $user->GetTargetingIdeaService(); > $searchParameters = array ( > new KeywordMatchTypeSearchParameter(array('PHRASE'), 'key word here') > ); > // Get all campaigns. > $targettingIdeaPage = $targettingIdeaService->get(new TargetingIdeaSelector( > $searchParameters, 'KEYWORD', 'IDEAS', array('KEYWORD')), 100 ) ; > // Display campaigns. > if (isset($targettingIdeaPage->entries)) { > foreach ($targettingIdeaPage->entries as $targettingIdea) { > var_dump($targettingIdea); > }} else { > > print "No campaigns found.\n"; > > } > } catch (Exception $e) { > print_r($e); > } > > -- > ................................................................... > Priyantha Gunawardena > ______________________________________ > {Web Designer / Developer} > Tel: +94 038-228-4323 > Mobi: +94 077-393-8516 > Blog:http://www.pgdesigning.com > IM : pgdesigning > ................................................................... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en -~----------~----~----~----~------~----~------~--~---