Upcoming Changes to the Streams v5 Endpoints

Whatever the reasons for these changes were, you also introduced a bug related to the offset and limit parameters. See this:

offset=0, limit=12

$ curl -s \
  -H "Accept: application/vnd.twitchtv.v5+json" \
  -H "Client-ID: YOUR_CLIENT_ID" \
  "https://api.twitch.tv/kraken/streams?offset=0&limit=12" \
  | jq "[.streams[]] | length"
12

offset=12, limit=12

$ curl -s \
  -H "Accept: application/vnd.twitchtv.v5+json" \
  -H "Client-ID: YOUR_CLIENT_ID" \
  "https://api.twitch.tv/kraken/streams?offset=12&limit=12" \
  | jq "[.streams[]] | length"
11

As you can see, setting an offset greater than 0 makes the API response lack one item.

This API bug is currently breaking my application, because its infinite scroll mechanism has a fallback for when the _total metadata is/was missing (as it was inconsistent before), and it expects the number of results of the API response to be equal to the requested limit. If fewer records are returned than requested, it treats this as the end of the available records.

I know that this could be implemented differently and another query could be made and then checked if there are no records in the response, but that’s one additional and unnecessary API request, especially considering API rate-limiting on helix once I made the switch. The API bug is also annoying, because my infinite scroll implementation has a calculation for how many records are needed in order to fill the route’s page with just one query, and having one item missing from the API response breaks this as well.

Could you please take a look at this bug? Other endpoints than /streams are also affected by this, eg /games/top (offset=12, limit=12).
Thanks.

edit:
And also the language parameter bug, in case you haven’t seen my post from yesterday on the API forums section yet: