I'm using the getBulkKeywordIdeas function from the TargetingIdeaService and I'm constantly getting an "InternalApiError.UNEXPECTED_INTERNAL_API_ERROR".
I even tried removing required fields from the selector to see if I'd get a new error but I don't.
Here's the code I've been testing on and I've highlighted where the error has been occuring:
{
setClient(1234567); // Dummy Account Number
string[] Seed = new string[1];
Seed[0] = "blue suede shoes";
string[] urls = new string[1];
TargetingIdeaService.TargetingIdeaSelector selector = new TargetingIdeaSelector();
TargetingIdeaService.TargetingIdeaPage tip;
// URL
RelatedToUrlSearchParameter relatedtoUrlSearchParameter = new RelatedToUrlSearchParameter();
relatedtoUrlSearchParameter.urls = urls;
// Keywords
RelatedToQuerySearchParameter relatedToQuerySearchParameter = new RelatedToQuerySearchParameter();
relatedToQuerySearchParameter.queries = Seed;
// selector
selector.requestType = RequestType.IDEAS;
selector.ideaType = IdeaType.KEYWORD;
selector.requestedAttributeTypes = new AttributeType[] { AttributeType.KEYWORD_TEXT, AttributeType.SEARCH_VOLUME, AttributeType.AVERAGE_CPC, AttributeType.COMPETITION};
selector.searchParameters = new SearchParameter[] { relatedToQuerySearchParameter, relatedtoUrlSearchParameter };
// Paging
TargetingIdeaService.Paging paging = new TargetingIdeaService.Paging();
paging.startIndex = 0;
paging.numberResults = Seed.Length; // Max 800
selector.paging = paging;
try
{
using (ocs(wsrTargetingIdeaItem.InnerChannel)) wsrTargetingIdeaItem.getBulkKeywordIdeas(shTargetingIdeaItem, selector, out tip); // shTargetingIdeaItem is the Soap Header
if (tip.entries != null && tip.entries.Length > 0)
{
//foreach (TargetingIdeaService.Type_AttributeMapEntry tap in tip.entries)
//{
//}
}
}
catch (Exception e)
{ DoException(e, "Google - Suggested Keywords", "Account: " + iAccount.ToString()); }
}