Get Account Hierarchy - API Adwords VS API Google Ads

154 views
Skip to first unread message

Jesús Guillén

unread,
Sep 20, 2021, 11:39:41 AM9/20/21
to AdWords API and Google Ads API Forum
Hello, Google team. 

 We have noticed that for the migration to the Google Ads API to obtain the account hierarchy for an administrator with just over nineteen thousand accounts it is taking much more than twenty minutes to obtain the entire account tree, while for the AdWords API this is it took less than a minute. We are using the same examples that are in the official Get Account Hierarchy documentation, please could you tell us why this happens and if there is any possibility of obtaining this information in a shorter period of time through the Google ADS API.  

We are looking forward to your comments. Greetings!

Google Ads API Forum Advisor

unread,
Sep 21, 2021, 9:05:40 AM9/21/21
to jgui...@norte.digital, adwor...@googlegroups.com

Hi Jesús,

Thanks for reaching out to us.

You may get the account hierarchy of your manager account, by building a Google Ads Query Language statement to query all the child accounts specified by the client_customer field from CustomerClient, and executing it recursively on the sub-manager accounts. This will allow you to check which accounts are directly linked to your manager account and which are indirectly linked through sub-managers. For more information, you may refer to this document in the Google Ads API.

Kindly note that the hierarchical tree of the accounts are built dynamically as the tree structure of the accounts itself is dynamic and keeps changing all the time. It would be impractical to persist all the subtree structure for each node in the tree as the amount of data to be stored would be huge. I would suggest you to use your local cache to save the accounts info that you have retrieved so you don’t have to query them each time.

If you still see performance issues, you may provide us with the complete request and response logs with the request-id, so our team can better check.

If you are using a client library, you may first enable logging by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link. You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2NVhKa:ref
Reply all
Reply to author
Forward
0 new messages