How do I paginate in case if records are more than 5000?

43 views
Skip to first unread message

Vaibhav

unread,
May 23, 2012, 6:19:11 PM5/23/12
to adsen...@googlegroups.com

I have some AdSense Management API questions -

1. As I understand, startIndex and maxResults support pagination for records within 5000
How do I paginate in case if records are more than 5000? 

2. I have noticed that the quota for this API is set to 1.0 request per second per user. Which means that if 2 users make an api request within the same second then this limit will kick in. I am trying to avoid this situation.
What defines a user? Is it the Client ID/Client Secret per project that we create?

Thanks,
Regards,
-Vaibhav

Sérgio Gomes

unread,
May 28, 2012, 9:21:14 AM5/28/12
to adsen...@googlegroups.com
Hi Vaibhav,

1. I'm afraid there is no way to paginate beyond 5000 rows. Pagination is meant for very specific use-cases only, where the end devices are lacking in bandwidth or capacity to retrieve the entire report in one go, and in these cases there's usually no need to go beyond a few thousand records.

2. A user is defined as an individual Google account (so in the case of the AdSense Management API, an AdSense account). Do bear in mind that the limit you're referring to is just the default, and it's actually configurable. You can set it to a higher or lower value for your project by using the "Set per-user limits" button in the Quotas section of your project in the APIs console.

Cheers,
Sérgio

---
Sérgio Gomes
Developer Relations

Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902


---
Reply all
Reply to author
Forward
0 new messages