Reg: TargetingIdeaService for Getting keywords given a seed keyword

44 views
Skip to first unread message

Raj

unread,
Nov 19, 2009, 2:07:14 PM11/19/09
to AdWords API Forum
Hi all,

Q 1)
I am trying to get a list of keywords for a given seed keyword
using TargetingIdeaService.

This service has too many parameters to be send in the requesting
xml.

I am sending the following request_xml.

'<get xmlns="'.$namespace.'">'.
'<selector>'.
'<searchParameters>'.
'<keywords>'.
'<text>rajani</text>'.
'<matchType>BROAD</matchType>'.
'</keywords>'.
'</searchParameters>'.
'<ideaType>KEYWORD</ideaType>'.
'<requestType>IDEA_TYPE</requestType>'.
'<requestedAttributeTypes>TARGETED_MONTHLY_SEARCHES</
requestedAttributeTypes>'.
'<paging>null</paging>'.
'<localeCode>en_US</localeCode>'.
'<currencyCode>USD</currencyCode>'.
'</selector>'.
'</get>';

it does not return values.


Could you please tell me where the problem is?
Is there any problem in using the SearchParameterArray[] and
AttributeTypes[]?



Thanks,
Raj

AdWords API Advisor

unread,
Nov 19, 2009, 5:29:17 PM11/19/09
to AdWords API Forum
Hi Raj,

The field "requestType" does not accept the value "IDEA_TYPE". The
value must be either "IDEAS" or "STATS":

http://code.google.com/apis/adwords/v2009/docs/reference/TargetingIdeaService.RequestType.html

Best,
- Eric Koleda, AdWords API Team

Raj

unread,
Nov 19, 2009, 11:00:20 PM11/19/09
to AdWords API Forum
Hi Eric,
Thanks for your reply.
First time I tried with IDEAS itself. It did not work.
Then I was trying with each requestType.

My goal is to get keywords for given seedkeyword.
In V13, I used KeywordToolService and getKeywordVariations method.

I am trying to migrate to the new version.

I thing the problem is with this request XML

Thanks,
Raj

On Nov 19, 4:29 pm, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:
> Hi Raj,
>
> The field "requestType" does not accept the value "IDEA_TYPE".  The
> value must be either "IDEAS" or "STATS":
>
>  http://code.google.com/apis/adwords/v2009/docs/reference/TargetingIde...

AdWords API Advisor

unread,
Nov 20, 2009, 9:16:22 AM11/20/09
to AdWords API Forum
Hi Raj,

Is there an error returned in the response XML, or just no results?
Also, if you don't want to set paging you should leave out the paging
tag, not set the value as "null".

Best,
- Eric

Raj

unread,
Nov 20, 2009, 10:55:20 AM11/20/09
to AdWords API Forum

Hi Eric,




One more thing I am able to use GeoTargetingService. So I am sure my
authentication token is working fine.

This is my code next to the requestXML

$targetingidea = $targeting_service->call('get', $request_xml1);
$targetingidea = $targetingidea['rval']['entries'];
//$targetingideaentry = $targetingidea['rval']['entries'];
if ($debug) {
show_xml($targeting_service);
}
if ($targeting_service->fault) {
show_fault($targeting_service);
exit(1);
}

# Convert to a list if we get back a single object.
if (!$targetingidea[0]) {
$targetingidea = array($targetingidea);
}
print_r($targetingidea);
echo"raj:".$targetingidea['totalNumEntries'];


It is giving empty array result.

Thanks,
Raj.

On Nov 20, 8:16 am, AdWords API Advisor <adwordsapiadvi...@google.com>

AdWords API Advisor

unread,
Nov 20, 2009, 11:05:17 AM11/20/09
to AdWords API Forum
Hi Raj,

Do you have the final SOAP XML request and response logged? That
would give me a better idea of what the final result looks like. If
not that, do you have the requestId header from the response?

Best,
- Eric

Raj

unread,
Nov 20, 2009, 1:52:32 PM11/20/09
to AdWords API Forum
Hi Eric,

I found that in headers, the authentication method '' $auth-
>get_auth_token() " is not returning a value in the following code.
I am getting authToken field empty.
when I saw in XML file of the $headers

I have $email, $password, $account_type, $service values with me.
and
$account_type = 'GOOGLE';
$service = 'adwords';

then

$auth = new AuthToken($email, $password, $account_type, $service);
$headers =
'<RequestHeader xmlns="' . $namespace . '">' .
'<authToken>' . $auth->get_auth_token() . '</authToken>' .
'<clientEmail>' . $email . '</clientEmail>' .
'<userAgent>' . $useragent . '</userAgent>' .
'<developerToken>' . $developer_token . '</developerToken>' .
'<applicationToken>' . $application_token . '</applicationToken>' .
'</RequestHeader>';

I am getting authToken field empty.
when I saw in XML file of the $headers.

Could you please tell me how to get rid of this error?


Thanks,
Raj


On Nov 20, 10:05 am, AdWords API Advisor

AdWords API Advisor

unread,
Nov 20, 2009, 3:43:15 PM11/20/09
to AdWords API Forum
Hi Raj,

You can test the ClientLogin API manually by entering the following
URL into your web browser, replacing {email} and {password} with your
credentials.

https://www.google.com/accounts/ClientLogin?accountType=GOOGLE&Email={email}&Passwd={password}&service=adwords

Does this return a valid authToken? If not your account may be
locked, and you can unlock it using the unlock CAPTCHA:

https://www.google.com/accounts/displayunlockcaptcha

Best,
- Eric

Raj

unread,
Nov 20, 2009, 4:12:07 PM11/20/09
to AdWords API Forum
Thank you Eric,

I tested my credentials and it just returned
SID:
LSID:
AUTH:

and
I just put this AUTH value in my code then
tried to run the file.
It gave the following error:

Fatal error: Allowed memory size of 104857600 bytes exhausted (tried
to allocate 15782831 bytes) in C:\AppServ\www\raj\adwords\lib\nusoap
\lib\nusoap.php on line 292

Thanks,
Raj
On Nov 20, 2:43 pm, AdWords API Advisor <adwordsapiadvi...@google.com>

AdWords API Advisor

unread,
Nov 23, 2009, 1:42:50 PM11/23/09
to AdWords API Forum
Hi Raj,

It seems that the authentication is working correctly, and that nusoap
is running out of memory. Are you making a very large request?

Best,
- Eric
Reply all
Reply to author
Forward
0 new messages