Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

searchAlbums response doesn't match that of Spotify Console when using encodeUriComponent #466

Open
ben-obringer opened this issue Oct 15, 2022 · 0 comments

Comments

@ben-obringer
Copy link

For context, I've been searching for albums using the following format album:"Album title" artist: "Artist name", and this usually works. Issues arise when special characters are involved. Here is an example:

  • album:"At.Long.Last.A$AP" artist:"ASAP Rocky"
    It's also worth mentioning that this query does not return anything in the Spotify console as well.

So after doing some research, I came across this article which states that the query must be encoded https://pappmaskin.no/2017/02/linking-to-a-spotify-search-with-both-track-and-artist/. Doing this changes the above example to:

  • album%3A%22At.Long.Last.A%24AP%22%20artist%3A%22ASAP%20Rocky%22

I tried using the Node API with this new format, but now every query I try (including the ones without special characters that initially worked) are no longer returning results.
Trying this encoded example in the console produces results https://developer.spotify.com/console/get-search-item/?q=album%253A%2522Whokill%2522%2520artist%253A%2522Tune-Yards%2522&type=album&market=&limit=&offset=&include_external=.

So to sum things up, it would be helpful to give this API encoded uris as that is what the Spotify API requires when using special characters.

I dug around in the code for about 30 min, but couldn't find anything that's preventing the Node API from behaving properly. Does anyone have any ideas as to what's going on here?

Thanks, Ben

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant