Hi, I'm trying to get text ads. But first, I've tried to get ad groups using GetAdGroups.php.
>From a daily report I run, I can see that the following ad groups coincide with the following campaign: +------------+------------+ | campaignId | adGroupId | +------------+------------+ | 79779018 | 3782999778 | | 79779018 | 3782999898 | | 79779018 | 3783000018 | | 79779018 | 3783000258 | | 79779018 | 3783000378 | | 79779018 | 3783000498 | | 79779018 | 3783000618 | | 79779018 | 3783000738 | | 79779018 | 3783001098 | | 79779018 | 3783001218 | | 79779018 | 3783001338 | | 79779018 | 3783001578 | | 79779018 | 3783001818 | | 79779018 | 3783001938 | | 79779018 | 3783002058 | | 79779018 | 3783002298 | | 79779018 | 3783002418 | +------------+------------+ However, my SOAP request returns no adGroups found (I'm using 201109_1, but couldn't find a php library to download that had the 201206 version): # php ./GetAdGroups.php No ad groups were found. SOAP LOG: [Jul 11 2012 15:54:07.000000 - INFO] POST /api/adwords/cm/v201109_1/AdGroupService HTTP/1.1 Host: adwords.google.com Connection: Keep-Alive User-Agent: PHP-SOAP/5.2.14, gzip Accept-Encoding: gzip, deflate Content-Encoding: gzip Content-Type: text/xml; charset=utf-8 SOAPAction: "" Content-Length: 670 <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201109_1"> <SOAP-ENV:Header> <ns1:RequestHeader> <ns1:authToken>*****</ns1:authToken> <ns1:developerToken>*****</ns1:developerToken> <ns1:userAgent>AwApi-PHP-3.1.0-*****'s Test App</ns1:userAgent> </ns1:RequestHeader> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:get> <ns1:serviceSelector> <ns1:fields>Id</ns1:fields> <ns1:fields>Name</ns1:fields> <ns1:predicates> <ns1:field>CampaignId</ns1:field> <ns1:operator>IN</ns1:operator> <ns1:values>79779018</ns1:values> </ns1:predicates> <ns1:ordering> <ns1:field>Name</ns1:field> <ns1:sortOrder>ASCENDING</ns1:sortOrder> </ns1:ordering> <ns1:paging> <ns1:startIndex>0</ns1:startIndex> <ns1:numberResults>500</ns1:numberResults> </ns1:paging> </ns1:serviceSelector> </ns1:get> </SOAP-ENV:Body> </SOAP-ENV:Envelope> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Encoding: gzip Date: Wed, 11 Jul 2012 19:54:07 GMT Expires: Wed, 11 Jul 2012 19:54:07 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Content-Length: 308 Server: GSE <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201109_1"> <requestId>0004c49335b680000a422b4f00004ea1</requestId> <serviceName>AdGroupService</serviceName> <methodName>get</methodName> <operations>1</operations> <responseTime>342</responseTime> <units>1</units> </ResponseHeader> </soap:Header> <soap:Body> <getResponse xmlns="https://adwords.google.com/api/adwords/cm/v201109_1"> <rval> <totalNumEntries>0</totalNumEntries> <Page.Type>AdGroupPage</Page.Type> </rval> </getResponse> </soap:Body> </soap:Envelope> Same for get text ads: # php ./GetTextAds.php No text ads were found. I got frustrated and used all the adGroupIds from my database in the last 2 days as my array: array ( 0 => '2418977898', 1 => '2418978258', 2 => '2418978498', 3 => '2418978858', 4 => '2418979098', 5 => '2418979698', 6 => '2418979818', 7 => '2418980178', 8 => '2418980418', 9 => '2418980538', 10 => '2418981498', 11 => '2418981738', 12 => '2418982098', 13 => '2418982338', 14 => '2418982698', 15 => '2418982818', 16 => '2418982938', 17 => '2418983058', 18 => '2418983178', 19 => '2418983298', 20 => '2418983418', 21 => '2418983538', 22 => '2418983658', 23 => '2418984018', 24 => '2418984378', 25 => '2418984498', 26 => '2418985098', 27 => '2418985338', 28 => '2418985698', 29 => '2418985938', 30 => '2418986538', 31 => '2418986658', 32 => '2418986778', 33 => '2418987018', 34 => '2418987138', 35 => '2418987378', 36 => '2418987618', 37 => '2418987738', 38 => '2418988098', 39 => '2418988698', 40 => '2418988818', 41 => '2418989418', 42 => '2418989658', 43 => '2418989778', 44 => '2418990138', 45 => '2418990258', 46 => '2418991218', 47 => '2418991338', 48 => '2418991458', 49 => '2418991698', 50 => '2418991818', 51 => '2418992178', 52 => '2418992298', 53 => '2418992658', 54 => '2418992778', 55 => '2418993018', 56 => '2418993498', 57 => '2418993618', 58 => '2418993858', 59 => '2418993978', 60 => '2418994098', 61 => '2418994338', 62 => '2418994578', 63 => '2418994698', 64 => '2418994938', 65 => '2418995178', 66 => '2418995298', 67 => '2418996018', 68 => '2418996138', 69 => '2418996258', 70 => '2418996498', 71 => '2418996738', 72 => '2418996978', 73 => '2418997098', 74 => '2418997218', 75 => '2418997458', 76 => '2418997578', 77 => '2418997818', 78 => '2418998058', 79 => '2418998298', 80 => '2418998418', 81 => '2418998538', 82 => '2418998658', 83 => '2418999018', 84 => '2418999138', 85 => '2418999378', 86 => '2418999498', 87 => '2418999738', 88 => '2418999858', 89 => '2419000458', 90 => '2419000578', 91 => '2419000698', 92 => '2431477098', 93 => '2431477218', 94 => '2431478418', 95 => '2431479138', 96 => '2431479378', 97 => '2431479618', 98 => '2431479738', 99 => '2431480218', 100 => '2431480458', 101 => '2431480818', 102 => '2431481778', 103 => '2431481898', 104 => '2431482978', 105 => '2431483578', 106 => '2431484178', 107 => '2431484778', 108 => '2431485018', 109 => '2431485258', 110 => '2431485498', 111 => '2431486338', 112 => '2431486458', 113 => '2431488018', 114 => '2431488498', 115 => '2431488618', 116 => '2431488978', 117 => '2431489698', 118 => '2431490778', 119 => '2431491138', 120 => '2431491258', 121 => '2431492098', 122 => '2431492338', 123 => '2431492578', 124 => '2431493298', 125 => '2431493778', 126 => '2431494258', 127 => '2431494618', 128 => '2431494858', 129 => '2431494978', 130 => '2431495218', 131 => '2431495698', 132 => '2546543538', 133 => '2546543658', 134 => '3782999778', 135 => '3782999898', 136 => '3783000018', 137 => '3783000258', 138 => '3783000378', 139 => '3783000498', 140 => '3783000618', 141 => '3783000738', 142 => '3783001098', 143 => '3783001218', 144 => '3783001338', 145 => '3783001578', 146 => '3783001818', 147 => '3783001938', 148 => '3783002058', 149 => '3783002298', 150 => '3783002418', ) *I couldn't get this to log* (unless I produced *an empty array*, the results of which are below): [Jul 11 2012 16:11:47.000000 - ERROR] POST /api/adwords/cm/v201109_1/AdGroupAdService HTTP/1.1 Host: adwords.google.com Connection: Keep-Alive User-Agent: PHP-SOAP/5.2.14, gzip Accept-Encoding: gzip, deflate Content-Encoding: gzip Content-Type: text/xml; charset=utf-8 SOAPAction: "" Content-Length: 728 <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201109_1"> <SOAP-ENV:Header> <ns1:RequestHeader> <ns1:authToken>*****</ns1:authToken> <ns1:developerToken>****</ns1:developerToken> <ns1:userAgent>AwApi-PHP-3.1.0-*****'s Test App</ns1:userAgent> </ns1:RequestHeader> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:get> <ns1:serviceSelector> <ns1:fields>Headline</ns1:fields> <ns1:fields>Id</ns1:fields> <ns1:predicates> <ns1:field>AdGroupId</ns1:field> <ns1:operator>IN</ns1:operator> </ns1:predicates> <ns1:predicates> <ns1:field>AdType</ns1:field> <ns1:operator>IN</ns1:operator> <ns1:values>TEXT_AD</ns1:values> </ns1:predicates> <ns1:predicates> <ns1:field>Status</ns1:field> <ns1:operator>IN</ns1:operator> <ns1:values>ENABLED</ns1:values> <ns1:values>PAUSED</ns1:values> <ns1:values>DISABLED</ns1:values> </ns1:predicates> <ns1:ordering> <ns1:field>Headline</ns1:field> <ns1:sortOrder>ASCENDING</ns1:sortOrder> </ns1:ordering> <ns1:paging> <ns1:startIndex>0</ns1:startIndex> <ns1:numberResults>500</ns1:numberResults> </ns1:paging> </ns1:serviceSelector> </ns1:get> </SOAP-ENV:Body> </SOAP-ENV:Envelope> HTTP/1.1 500 Internal Server Error Content-Type: text/xml; charset=UTF-8 Content-Encoding: gzip Date: Wed, 11 Jul 2012 20:11:47 GMT Expires: Wed, 11 Jul 2012 20:11:47 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Content-Length: 504 Server: GSE <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201109_1"> <requestId>0004c49374e401f80a4255ea00001e54</requestId> <serviceName>AdGroupAdService</serviceName> <methodName>get</methodName> <operations>1</operations> <responseTime>129</responseTime> <units>1</units> </ResponseHeader> </soap:Header> <soap:Body> <soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>[SelectorError.MISSING_PREDICATE_VALUES @ serviceSelector]</faultstring> <detail> <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201109_1"> <message>[SelectorError.MISSING_PREDICATE_VALUES @ serviceSelector]</message> <ApplicationException.Type>ApiException</ApplicationException.Type> <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SelectorError"> <fieldPath>serviceSelector</fieldPath> <trigger/> <errorString>SelectorError.MISSING_PREDICATE_VALUES</errorString> <ApiError.Type>SelectorError</ApiError.Type> <reason>MISSING_PREDICATE_VALUES</reason> </errors> </ApiExceptionFault> </detail> </soap:Fault> </soap:Body> </soap:Envelope> -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 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