It's because you're looping $json 1000 times, which is an expensive call.
Yeh, I guess there's no way to pull this off as a function usable by people in a twitch channel. It would constantly be frozen.
I honestly blame the way the API is set up - due to it being a ladder the ranking is tied to the ladder which is a full list of Row -> 1,2,3,4,5 (etc to 1000) instead of being tied to either a character (or as it was before, a team) so you could search for a character name directly and get a rank instead of having to loop through 1000s until you hit what you need.
I guess I'm just shit out of luck. Thanks for your time though
