Announcements

Help Wizard

Step 1

NEXT STEP

Issue with the Search API Route

Solved!

Issue with the Search API Route

I'm not sure if there was a recent change that caused this bug, but when I pass in an Artist's name into the search query, a different artist pops up as the first index. This did not happen before, and I've done the same search on the actual API documentation, and the artist that I was looking for is still being displayed correctly. Is anyone else having this issue?

Reply

Accepted Solutions
Marked as solution

I have partially found a way to solve this issue. When you add the API request parameter 'limit' to 1 (example request: https://api.spotify.com/v1/search?query=drake&type=artist&limit=1), the API correctly returns the right artist as the first result. However, as soon as you exceed a limit of 1, it no longer appears as the first result. This must be a problem with how the results are sorted after the search, I assume.

View solution in original post

2 Replies
Marked as solution

I have partially found a way to solve this issue. When you add the API request parameter 'limit' to 1 (example request: https://api.spotify.com/v1/search?query=drake&type=artist&limit=1), the API correctly returns the right artist as the first result. However, as soon as you exceed a limit of 1, it no longer appears as the first result. This must be a problem with how the results are sorted after the search, I assume.

Thank you this resolved my bug! Hopefully, they fix this issue in the near future!

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random