Hi Mark, Your approach is the recommended one, since AdWords API reports don't support MCC level reports. However, you can go for the following improvements.
1. Put 4c, 4d, 4e in a thread of its own. The thread method accepts the clientCustomerId as argument. Create a new AdWordsUser, set its Config.ClientCustomerId in the thread and then make calls. 2. Limit the number of threads to about 20. 3. Expect that you may get RateExceededErrors. So put your report download code in a try-catch loop with exponential backoff algorithm. 4. Increase HTTP connnection settings in your code appropriately, so that .NET runtime doesn't throttle your connections. Something like: ThreadPool.SetMinThreads(100, 4); System.Net.ServicePointManager.DefaultConnectionLimit = 100; Cheers, Anash P. Oommen, AdWords API Advisor. On Sunday, September 8, 2013 1:38:15 PM UTC+5:30, Mark Ibanez wrote: > > Hi, > > Before I state my question, please allow me to describe what I am trying > to accomplish and how I am currently implementing it. I am downloading > reports from multiple accounts (different ClientCustomerIDs) from an MCC > account. I use Adhoc Reports within C# (.Net Library) to do this. > > I already have a working code to do this. The logic for this is as follows: > > 1. Create an AdWordsUser object > 2. Set AdWordsUser.Config.ClientCustomerId to the MCC Account's > ClientCustomerId > 3. Retrieve the list of accounts inside an MCC Account using the following > classes: ManagedCustomerService, ManagedCustomerPage, ManagedCustomer > 4. Iterate through the ManagedCustomerPage.entries array > 4a. Get ManagedCustomer object from array > 4b. Parse ManagedCustomer.customerID value to ClientCustomerId format (eg. > 123-456-7890) > 4c. Set AdWordsUser.Config.ClientCustomerId to parsed > ManagedCustomer.customerID value > 4d. Get report using ReportUtilities.GetClientReport() method > 4e. Process the report data and append to combined reports > > The above logic works fine although I think it is a bit inefficient in > terms of API calls. When using this logic, the number of API calls is 1 + > n, where n equals the number of accounts inside an MCC account. For > example, if the MCC account contains 10 client accounts, the number of API > calls needed is 11. > > So here's my question. Is there a more efficient way to accomplish the > logic described above using less API calls (1 API call would be ideal)? > > I look forward to your answers. Thank you in advance for any help. > > Best regards, > > Mark Ibanez > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
