Does GoogleAdsService.SearchStream has the limitation of maximum message size of 4 MB?

50 views
Skip to first unread message

Dong Chen

unread,
Jun 8, 2020, 10:59:09 AM6/8/20
to AdWords API and Google Ads API Forum
Hi team,

One of my clients tested the SearchSteam service and they said the "429 Resource Exhausted" error will be returned when the data is too large. How can avoid this?

They also tried GoogleAdsService.Search with page tokens, but the page token will expire after 3 hours. Since the account has much data, so 3 hours are not enough to let them get all the data.

So, in this case, what's your suggestions in terms of querying large amount of data?

Thanks!

Google Ads API Forum Advisor Prod

unread,
Jun 8, 2020, 2:32:31 PM6/8/20
to adwor...@googlegroups.com

Hi Dong,

Thanks for reaching out. The client could consider reducing the number of selected fields and narrowing down the date ranges to reduce the response size. In the meantime, they could also utilize the pagination as they did, just making sure they finish their job before the page token expires. 

Thanks and regards,
Xiaoming, Google Ads API Team



 

ref:_00D1U1174p._5004Q20X5cx:ref

Dong Chen

unread,
Jun 12, 2020, 9:32:45 AM6/12/20
to AdWords API and Google Ads API Forum
Hi Xiaoming,

Thanks for your reply. Any better suggestions like how can we extend the page token's valid time? Is there any doc about the expiration of page token? Your suggestion is not workable because of we need to meet the business requirements so we can't reduce the number of selected fields/ data ranges etc.

Dong Chen

unread,
Jun 12, 2020, 9:56:48 AM6/12/20
to AdWords API and Google Ads API Forum
And I also want to confirm the expiration logic. 
Let's say the result has 10000 results, and the page size is 1000 so basically it takes 10 paging query to fetch all the data. If I maintain a rate of spending 1 hour processing on each page, the page token will be used in 1 hour, well below the 3 hours limit. Is that true? If this is true,  I can reduce the page size to further avoid the token expiration. 

Google Ads API Forum Advisor Prod

unread,
Jun 12, 2020, 3:14:50 PM6/12/20
to adwor...@googlegroups.com

Hi Dong,

Thank you for reaching out. You could refer to this documentation for information on the paginated requests. Your assumption is true. You could reduce the page size to further avoid the token expiration. 



Thanks and regards,
Xiaoming, Google Ads API Team



 

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