Streams still returning 'IA' for cursor pagination

Related and not resolved.

I’m getting the same result with my script. Tried user_id and user_name. Only returning 3 at a time.

pagination: { cursor: ‘IA’ }

GET request url example:

https://api.twitch.tv/helix/streams?first=100&user_login=masondota2&user_login=xQcOW&user_login=monkeys_forever&user_login=Freakazoid

Is there any news on this fix? Any ETA?

Of the group you have specified, only one of those users are live.

So the API looked up 4 users,
Found 1 of them live.
Then returned the first 100 of those results.

So this is correct.

Edit:

If I call

https://api.twitch.tv/helix/streams?first=100&user_login=sacriel&user_login=ezekiel_iii&user_login=giantwaffle&user_login=day9tv

I requested four people and I got four results.

I got a “broken” pagination of IA which I’ll ignore becuase it’s IA and I got the four results I requested. on a direct name lookup, theres no reason to follow the pagination

(And I ignore the pagination as I won’t follow it as the inputted names are all returned in my request.)

Try a larger list and its 3. Should be around 6-7 right now (according to looking at twitch page)

https://api.twitch.tv/helix/streams?first=100&user_login=masondota2&user_login=xQcOW&user_login=monkeys_forever&user_login=Freakazoid&user_login=vsnz&user_login=paulflart&user_login=TheSushiDragon&user_login=cpense&user_login=AdmiralBulldog&user_login=Savjz&user_login=its_WiKeD&user_login=FATAL1TY&user_login=PaymoneyWubby&user_login=reimuowo
&user_login=jchoe_&user_login=Cardboard_Cowboy&user_login=LyndonFPS&user_login=xcaliz0rz&user_login=Skadoodle&user_login=Topsonous

Well, with that URL I get 6 live from that group, the others

  • masondota2
  • monkeys_forever
  • Freakazoid
  • paulflart
  • cpense
  • AdmiralBulldog
  • its_WiKeD
  • FATAL1TY

(then I stopped looking)

are not live so are not returned in the streams response. (at time of writing)

I see. I must not understand this endpoint correctly. I assumed it returned every user in your request and the object for each user would determine if they are LIVE from the “type” response being blank.

Is that not correct?

That is not correct.

The streams endpoint only returns a entry for those are live.

So a offline stream on a 1 to 1 lookup reads as

{
"data": [],
"pagination": {}
}

On a many user lookup, no record is returned for an offline user.

I see. Thank you for clearing that up.

What endpoint would I use to check if a user is currently live streaming?

You are calling the correct end point.

You get a record if they are live, and no record if they are not live.

Thank you Barry.

I will investigate why my code isn’t working.

But it is working.

From your original URL, only 3 of them were live at the time so it only returned 3.
The others were not returned, because they were not live.

Either it’s broken or the docs need to be updated. It’s probably the former because of the inconsistency that I previously reported.

OP was confused about how the endpoint actually works.

IA is a separate issue not actually relevant to this thread.

1 Like

I believe I got it working.

Is there inconsistency between how pagination works with /streams and /follows?from_id? I follow 45 people and the object returns a valid pagination cursor string (even though I didn’t hit the 100 limit), which when the same endpoint is called with the after= it returns what I would expect, a data object that is empty and an empty object as the pagination value.

With the /streams, I get less than 100 but the pagination returns the ‘IA’ instead of a valid cursor string. Why isn’t it empty or a valid cursor string that returns an empty data object like /follows?

It’s a bug/known issue.

And for the requests you have posted (first=100 and up to 100 names) there will never be a second page to fetch.

1 Like

In my current data set I wont get more than 100.

But if I send a request with 300 ID’s to look up, and 150 of them are currently streaming, I should expect to get a response with 100 stream objects and a pagination string. I can then call the same get request with the “after=” added to the end to obtain a response with the remaining 50 streamer objects.

Right?

Returns streams broadcast by one or more specified user login names. You can specify up to 100 names.

You can only specify 100 names (or 100 user_ids)

if you specify 300 ID’s I’d of expected an error, or it will return the first (or last) 100 specified, or you just get confusing results.

So to do 300 names/IDs, split them into 3 batches and do 3 requests of 100 each.

1 Like

Ah I understand.

Thank you for the clarification Barry.

1 Like

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