Ok So this is how you pull each keyword inside a specific adgroup, docs suck
here :)
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 AdGroupCriterionService.
$adGroupCriterionService = $user->GetAdGroupCriterionService('v201101');
$adGroupId = (float) '3061752926';
// Create selector.
$selector = new Selector();
$selector->fields = array('Id', 'AdGroupId', 'Text');
$selector->ordering = array(new OrderBy('AdGroupId', 'ASCENDING'));
// Create predicates.
$adGroupIdPredicate = new Predicate('AdGroupId', 'IN', array($adGroupId));
$selector->predicates = array($adGroupIdPredicate);
// Get all ad group criteria.
$page = $adGroupCriterionService->get($selector);
// Display ad group criteria.
if (isset($page->entries)) {
foreach ($page->entries as $adGroupCriterion) {
print 'Ad group criterion with ad group id "'
. $adGroupCriterion->adGroupId . '", criterion id "'
. $adGroupCriterion->criterion->id . ', and type "'
. $adGroupCriterion->criterion->CriterionType . "\" was found.\n";
print_r(" TEXT IS ".$adGroupCriterion->criterion->text);
}
} else {
print "No ad group criteria were found.\n";
}
} catch (Exception $e) {
print $e->getMessage();
}
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en