Stream search api is returning nothing

The 2 issues are unrelated. The case in the original post of stream search returning nothing was correctly formed JSON response, but the streams array was simply empty (so likely something wrong Twitch’s end processing the query).

The example you post on the other hand is the result of getting a HTML response back instead of JSON (hence the error thrown when trying to parse as it’s not valid JSON) I’m not sure Twitch’s exact cause of this but some other API’s it’s due to cloudflare or other caching service for where the source is unavailable. This has been an issue for as long time, but it’s very rare any if you catch the errors and retry failed requests it can usually be ignored.