Hi,

I'm trying to use the TargetingIdeaService to get keyword ideas for
the keyword "lighting" via the .NET client library. On my first call i
specify a startIndex of 0 and I ask for 800 results, this returns 800
results. On my next call I specify a startIndex of 800 and again ask
for 800 results but I don't get any results back,
TragetIdeaPage.entries is null. I next tried specifying a startIndex
of 799 and asking for 800 results, I get 1 result returned.

Is the API limited to a maximum of 800 results in total? I know it is
limited to 800 results per call but the documentation suggests you can
get more than 800 results with the use of pagination. Am I do
something wrong or have misinterpreted the documentation?

I've posted my code below

List<Keyword> keywords = new List<Keyword>();
                keywords.Add(new Keyword { matchType =
KeywordMatchType.EXACT, matchTypeSpecified = true, text =
"lighting" });

                AdWordsUser user = new AdWordsUser();
                TargetingIdeaService service =
 
user.GetService(AdWordsService.v201101.TargetingIdeaService) as
TargetingIdeaService;

                TargetingIdeaSelector selector = new
TargetingIdeaSelector();
                selector.ideaType = IdeaType.KEYWORD;
                selector.ideaTypeSpecified = true;
                selector.requestType = RequestType.IDEAS;
                selector.requestTypeSpecified = true;
                CountryTargetSearchParameter ctsp = new
CountryTargetSearchParameter();
                ctsp.countryTargets = new CountryTarget[] { new
CountryTarget { countryCode = "GB" } };
                LanguageTargetSearchParameter ltsp = new
LanguageTargetSearchParameter();
                ltsp.languageTargets = new LanguageTarget[] { new
LanguageTarget { languageCode = "en" } };

                RelatedToKeywordSearchParameter relKeyword = new
RelatedToKeywordSearchParameter();
                relKeyword.keywords = keywords.ToArray();
                selector.searchParameters = new SearchParameter[]
{ relKeyword, ctsp, ltsp,
                        new KeywordMatchTypeSearchParameter
{ keywordMatchTypes = new KeywordMatchType[]
{ KeywordMatchType.EXACT } } };

                selector.requestedAttributeTypes = new
AttributeType[]
                    {
 
AttributeType.AVERAGE_TARGETED_MONTHLY_SEARCHES,
                        AttributeType.CRITERION
                    };

                selector.paging = new Paging
                {
                    startIndex = startIndex,
                    startIndexSpecified = true,
                    numberResults = 800,
                    numberResultsSpecified = true
                };

                TargetingIdeaPage page = service.get(selector);

Thanks,

Paul

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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

Reply via email to