rateexceedederror targetingideaservice

254 views
Skip to first unread message

karim...@catbirdseat.de

unread,
May 30, 2017, 4:34:26 AM5/30/17
to AdWords API Forum
Hi,

i'm trying to get the searchvolum of an important number of Keywords (over 30.000) and every time i get the rateexceedederror. I know that the adwords api has a limit of requests and i know that there are some methods like using the BatchJobService but somehow i don't get it work and that's why i am asking for help here.  My goal is to pack many keywords (10.000) in each request. 

Is there any method or code examples from wich i can inspire myself.

I am using the AdWords API in Java.

Thank you very much.

Kind Regards,
Karim

Ivan Bautista

unread,
May 30, 2017, 6:33:39 AM5/30/17
to AdWords API Forum
Hi Karim, 

As per the Rate Limit guide, the RateExceededError could be triggered by a number of factors so you need to be mindful of these as well as other Targeting Idea specific limits when executing TargetingIdeaService.get

If you will be required to retrieve this much volume, then I would recommend that you upgrade to Standard Access to have unlimited daily operational limit. With unlimited daily operational limit, you can create multiple separate requests for a group of keywords to avoid executing request with too many keywords while taking into consideration the rate limits in place. In addition, you might want to use the RateLimiter extension to help you handle rate limit errors.

Unfortunately, BatchJobService doesn't support TargetindIdeaService.get operation and only supports these mutate operations.

Regards,
Ivan
AdWords API Team

karim...@catbirdseat.de

unread,
May 30, 2017, 9:36:44 AM5/30/17
to AdWords API Forum
Hello Ivan,

Thank you very much for your helpful answer. I will apply for an upgrade to Standard Access and do the way you describe it to me.

Kind Regards,

Karim Benna


karim...@catbirdseat.de

unread,
Jun 2, 2017, 3:16:08 AM6/2/17
to AdWords API Forum
Hi Ivan,


I did what you advised me to do and my request got approved. When i tried to relunch my Program using the API i still had an error.

And this is the program using the API:


// Get the TargetingIdeaService.
for (String[] keyWordsArray : keyWordsList) {
new ArrayList<TargetingIdea>();
TargetingIdeaServiceInterface targetingIdeaService = adWordsServices.get(session,
TargetingIdeaServiceInterface.class);

// Create selector.
TargetingIdeaSelector selector = new TargetingIdeaSelector();
selector.setRequestType(RequestType.STATS);
selector.setIdeaType(IdeaType.KEYWORD);
selector.setRequestedAttributeTypes(
new AttributeType[] { AttributeType.SEARCH_VOLUME, AttributeType.KEYWORD_TEXT });

// Set selector paging (required for targeting idea service).
Paging paging = new Paging();
paging.setStartIndex(0);
paging.setNumberResults(1000);
selector.setPaging(paging);

// Create related to query search parameter.
RelatedToQuerySearchParameter relatedToQuerySearchParameter = new RelatedToQuerySearchParameter();
relatedToQuerySearchParameter.setQueries(keyWordsArray);

// Language setting (optional).
// The ID can be found in the documentation:
// See the documentation for limits on the number of allowed
// language
// parameters:
LanguageSearchParameter languageParameter = new LanguageSearchParameter();
Language german = new Language();
german.setId(1001L);
languageParameter.setLanguages(new Language[] { german });

LocationSearchParameter locationParameter = new LocationSearchParameter();
Location germany = new Location();
germany.setId(2276L);
locationParameter.setLocations(new Location[] { germany });

// Create network search parameter (optional).
NetworkSetting networkSetting = new NetworkSetting();
networkSetting.setTargetGoogleSearch(true);
networkSetting.setTargetSearchNetwork(false);
networkSetting.setTargetContentNetwork(false);
networkSetting.setTargetPartnerSearchNetwork(false);

NetworkSearchParameter networkSearchParameter = new NetworkSearchParameter();
networkSearchParameter.setNetworkSetting(networkSetting);

selector.setSearchParameters(new SearchParameter[] { relatedToQuerySearchParameter, languageParameter,
networkSearchParameter, locationParameter });

// Get related keywords.
TargetingIdeaPage page = targetingIdeaService.get(selector);

// Display related keywords.
if (page.getEntries() != null && page.getEntries().length > 0) {
System.out.println("The page size is: " + page.getTotalNumEntries());
ArrayList<String> betweenList = new ArrayList<String>();
for (TargetingIdea targetingIdea : page.getEntries()) {
Map<AttributeType, Attribute> data = Maps.toMap(targetingIdea.getData());
data.get(AttributeType.KEYWORD_TEXT);
data.get(AttributeType.CATEGORY_PRODUCTS_AND_SERVICES);
Long averageMonthlySearches = ((LongAttribute) data.get(AttributeType.SEARCH_VOLUME)).getValue();
String keywordText = ((StringAttribute) data.get(AttributeType.KEYWORD_TEXT)).getValue();
betweenList.add(keywordText);
betweenList.add(Long.toString(averageMonthlySearches));
System.out.println(
"Keyword with text " + keywordText + " and Search volume: " + averageMonthlySearches);
}
keyWordsWithSV.add(betweenList);
} else {
System.out.println("No related keywords were found.");
}
}


Kind Regards & Thank you for helping,


Karim Benna

Ivan Bautista

unread,
Jun 2, 2017, 7:02:14 AM6/2/17
to AdWords API Forum
Hi Karim,

To help us investigate further, could you share to us privately (using reply privately to author option) the SOAP request and response logs captured when error was encountered as well as your clientCustomerId?

Ivan Bautista

unread,
Jun 13, 2017, 8:52:45 AM6/13/17
to adwor...@googlegroups.com
Hi Karim, 

Do you still encounter the error? If you still need our assistance, please provide privately (using reply privately to author option) the previously requested information so we can investigate further on our end.
Reply all
Reply to author
Forward
0 new messages