Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Search API Returns Irrelevant Track on Limit=1

Search API Returns Irrelevant Track on Limit=1

Plan

Premium

Country

Malaysia

Device

Mac Mini M2

Operating System

macOS 15.4.1

 

My Question or Issue

I’ve been experimenting with the Spotify Web API (v1) and noticed something odd with the /search endpoint that I’m not sure how to explain. I’m wondering if anyone else has encountered this or can shed some light.

Here are two specific examples:

  1. Request:
    /v1/search?q=not%20like%20us&limit=1&type=track
    Expected: “Not Like Us” by Kendrick Lamar
    Actual: “LUTHER (with SZA)” by Kendrick Lamar, SZA

  2. Request:
    /v1/search?q=i%20gotta%20feeling&limit=1&type=track
    Expected: “I Gotta Feeling” by The Black Eyed Peas
    Actual: “We Hug Now” by Sydney Rose

In both cases, if I increase the limit to 2 or higher, the expected result appears correctly as one of the top items. This makes me wonder:

  • Is this an issue with how the API handles ranking when limit=1?

  • Could it be a token/authorization scope issue?

  • Or am I structuring my query incorrectly?

Any insight or advice would be greatly appreciated!

Thanks in advance!

Reply
0 Replies

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