Query Helix API to fetch multiple users matching a substring

Hello everyone,

Hope you can lay some light on this problem I’m facing. I’m trying to fetch a list of users from Helix API that match the substring I’m passing to the API.

For example: If I want to find a user with a username ‘username’, I tried the following:

      getManyUsers ( substring ) {
        axios.get( API_URL + `users?limit=10&login=${ substring }` )
          .then( ( response ) => {
            console.log( response.data.data );
          } ).catch( ( error ) => console.log( error ) );

      // Using an incomplete, not exact username, throws an error:
      getManyUsers( 'usern' );
      // Using regular expressions also fails:
      getManyUsers( /usern/ );
      // Using asterix at the end or beggining also throws:
      getManyUsers( *usern* );

This is what I thought to solve the problem, but neither of those happens to work…

Any clue?

Thank you very much.

You can only get a user by direct username, (or userID)

It is NOT a search API

1 Like

Oh, I see… So then, is there a search API to help me solve the problem?

Thank you!

Nevermind. I found that even they use Algolia to search on their own site, so I guess there’s no API for 3rd party apps.

Thank you anyways.

yeah there is no third party official way to search users.

1 Like

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