Avoiding pagination

Hello everyone!

I am about to track all concurrent liverstreamers for an app, which I am developing atm. At first, I tried it with requests (limit: 100 entries per response) walking through the pagination. When I analyzed the result, I noticed, that there were many duplicative entries. I guess, there is also a certain loss of entries, due to the shift of order, when all the API requests arrive sequentially/not at the same time.
I already contacted Twitch per E-Mail (integrationsuccess@twitch.tv) for help, unfortunately it is still unanswered since 15.11.2016. That’s why I’m asking you for help now :slight_smile:!

My main questions are:

  1. Is there a best practice to crawl all concurrent livestreamers (stable and lossfree solution)?
  2. Can one avoid the pagination of the Twitch API (current limit is 100)?
  3. How can I contact Twitch or more precisely the Integration Success staff directly?
  4. Has anyone experiences with contacting Twitch/Integration Success staff and when did you received your answer?

Thank you for your help in advance!

Greetings
HaoRyan

Hey, HaoRyan!

What type of app are you building that needs all current livestreamers? I ask this because storing and resyndication of data from the API is against the Developer Agreement unless you have a specific agreement.

To answer your specific questions:

  1. The best practice is with pagination.
  2. No.
  3. I’m right here. :slight_smile: That email is specifically for help with the the Developer Agreement. Having said that, I don’t see any emails to that list.
  4. Yep! They’re all awesome. Generally, responses are within 24 hours on the forums/Twitter. The email alias may or may not get a response since it is for matters relating to the Developer Agreement.

Thanks,
Dallas

2 Likes

Hey, Dallas!

Thanks for the answer!

HaoRyan

First, getting absolutely all channels may be difficult and useless.
Think about what you will do with all the data related to all those channels with no viewers at all.

I limit myself to the top 1000 channels.
Now, the super secret trick is to just compare the list of channels you got from the Twitch API to the previous one every time, and ask for channels missing in the new result with one or two additional requests, using limit=100&channel= followed by a comma-separated list of up to 100 channel names.

It depends on the period you use to get all those data, but with this technic you can get the top 1000 channels from the Twitch API every minute while being far from reaching rate limits.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.