# How to return subscribers in order (Helix API)

**URL:** <https://discuss.dev.twitch.com/t/how-to-return-subscribers-in-order-helix-api/22956>\
**Category:** Migration\
**Created:** [October 27, 2019, 7:32am UTC](https://discuss.dev.twitch.com/t/how-to-return-subscribers-in-order-helix-api/22956 "2019-10-27T07:32:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![backsh00ter](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@backsh00ter](https://discuss.dev.twitch.com/u/backsh00ter)\
**Post date:** [October 27, 2019, 7:32am UTC](https://discuss.dev.twitch.com/t/how-to-return-subscribers-in-order-helix-api/22956/1 "2019-10-27T07:32:43Z")

</div>

I am currently in the process of migrating the Subscribers endpoint V3 (kraken) to the new Helix endpoint.  
Old Kraken endpoint: [https://dev.twitch.tv/docs/v5/reference/channels#get-channel-subscribers](https://dev.twitch.tv/docs/v5/reference/channels#get-channel-subscribers)  
New Helix endpoint: [https://dev.twitch.tv/docs/api/reference#get-broadcaster-subscriptions](https://dev.twitch.tv/docs/api/reference#get-broadcaster-subscriptions)

I am noticing several differences / missing information in the newer version and I am looking for some guidance.

**1.Using the new Helix API, how can I return subscribers in the order they have subscribed?**  
The old version of the subscribers endpoint had a `?direction=asc|desc` query string parameter, allowing you to get the results back in ascending/descending order. The new version does not have this query string parameter and appears to return results back in a random order.

I’ve found that the Helix endpoint does seem to support using the parameter `?first=#`, however this also returns the results in a random order. If you pass in `?first=1` this is the only time it will consistently return the most recent subscriber.

**2. Using the new Helix API, how do I get the total number of subscribers?**  
The old endpoint returned a `_total` value in the response.  
The new endpoint just returns the array in pages of 100 with a pagination cursor.

Is it expected that we hit this endpoint multiple times with the cursor and add them up on our own?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [October 27, 2019, 11:54am UTC](https://discuss.dev.twitch.com/t/how-to-return-subscribers-in-order-helix-api/22956/2 "2019-10-27T11:54:05Z")

</div>

1. Currently you don’t
2. You iterate all pages and math it yourself

Helix doesn’t present this data. And we are not sure if it will.

---

<div class="post-metadata">

**Author:** ![Felipe\_L](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/felipe_l/32/7228_2.png) [@Felipe\_L](https://discuss.dev.twitch.com/u/Felipe_L)\
**Post date:** [November 3, 2019, 4:20pm UTC](https://discuss.dev.twitch.com/t/how-to-return-subscribers-in-order-helix-api/22956/3 "2019-11-03T16:20:17Z")

</div>

Migrate to V5 doesn’t mean stop using kraken.

[https://dev.twitch.tv/docs/v5/guides/migration](https://dev.twitch.tv/docs/v5/guides/migration)

you can keep using kraken just add a new header **Accept: application/vnd.twitchtv.v5+json**

and is advised to add “api\_version=5” to yours link see here why

> [@410 Gone on v5 games/top](https://discuss.dev.twitch.com/t/410-gone-on-v5-games-top/22835/6):
>
> tl;dr: Add &api\_version=5 to your URL (even if you already have ‘Accept’: ‘application/vnd.twitchtv.v5+json’ in the headers) The problem appears to be related to the shutdown of v3 APIs, and (sometimes) the v3 version being called, even when ‘Accept’: ‘application/vnd.twitchtv.v5+json’ is in the headers. So, I tried calling [https://api.twitch.tv/kraken/games/top?limit=100&api\_version=5](https://api.twitch.tv/kraken/games/top?limit=100&api_version=5) whenever [https://api.twitch.tv/kraken/games/top?limit=100](https://api.twitch.tv/kraken/games/top?limit=100) returned 410 Since making this change 2 days ag…
