Trying to make a request with Twich API

hello,

I’ve just created a developer account and I’m trying to make automatic searches in a page coded in javascript. :

$.ajax({
  type: 'GET', 
  url: 'https://api.twitch.tv/mgx_drt/search/streams?q=music',
  headers: {'Client-ID': 'xxx'},
  success: function(json) {
    console.log(json);
}});

I don’t have answer from twitch server, and it seems that my api (https://api.twitch.tv/mgx_drt) channel doesn’t exist . Did I miss something in my registration ? Or did I make a mistake in the code ?
There is no error message, I cannot just reach the api server …
thank you for your help :slight_smile:

“My API” not sure what you mean by “my API”

This is the wrong URL

Channel Search is at https://api.twitch.tv/helix/search/channels

Documentation: https://dev.twitch.tv/docs/api/reference#search-channels

You also omitted an Authorisation token, all of Helix requires an oAuth token to be specified, and you only included a client-id header

If you want to find music streams

You want the music GameID https://api.twitch.tv/helix/games?name=Music which is 26936
And then call get streams with that game_id which is https://api.twitch.tv/helix/streams?game_id=26936

See also https://dev.twitch.tv/docs/api/reference#get-streams