Getting multiple feed posts [v5]

Limit is referring to how many posts you want within’ a single request. This value should not change or increment unless you want to for some odd reason. The cursor that is returned will be the next position in a list.

For Example:
If you make a request with limit=1 then fetch the data. Only one piece of data will be returned as well as the cursor which can be used in your next request so you can start where you left off. So you would then proceed to make another request keeping limit=1 and update the cursor which will tell Twitch to give you the next piece of data in the list where you left off at and so on.

If you wish to obtain the most amount of data within’ a single request use limit=100. That will return 100 pieces of data along with a cursor. Then make another request after that keeping limit=100 and updating the cursor so you can then obtain the next 100 pieces of data in the list.

If the array in the response is empty then that most likely means there is no more data to return.

In your case when you made the first request using limit=1 and got 1 piece of data back, you then proceeded to make another request and it return an empty array. However, when you made a request using limit=2 and only got back 1 piece of data. That just tells you there was really only 1 piece of data total. So if you were to have made another request after the first limit=2 you most likely would have gotten an empty array as well.

Hopefully that helped!

1 Like