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

[V1 API Search] q (query) parameter appears to have a limit of 100 characters as of today

[V1 API Search] q (query) parameter appears to have a limit of 100 characters as of today

Plan

API

Country

NL

Device

-

Operating System

-

 

My Question or Issue

As of today the following request wil result in:

Query: artist:"Joseph Haydn"+track:"Die Jahreszeiten (The Seasons), Hob.XXI:3: Der Sommer (Summer): Ach! das Ungewitter naht (Chorus)"

https://api.spotify.com/v1/search/?market=NL&limit=5&q=artist:"Joseph Haydn"+track:"Die Jahreszeiten...

 

 

 

 

 

{
  "error" : {
    "status" : 404,
    "message" : "Not found."
  }
}

 

 

 

 

 

 

But if i shrink the q parameter to 100 characters it works:

Query: artist:"Joseph Haydn"+track:"Die Jahreszeiten (The Seasons), Hob.XXI:3: Der Sommer (Summer): Ach! d"

https://api.spotify.com/v1/search/?market=NL&limit=5&q=artist:"Joseph Haydn"+track:"Die Jahreszeiten...

 

 

 

 

 

{
    "tracks": {
        "href": "https://api.spotify.com/v1/search?query=artist%3A%22Joseph+Haydn%22+track%3A%22Die+Jahreszeiten+%28The+Seasons%29%2C+Hob.XXI%3A3%3A+Der+Sommer+%28Summer%29%3A+Ach%21+d%22&type=track&market=NL&offset=0&limit=5",
        "items": [
            {
                "album": {
                    "album_type": "album",
                    "artists": [
                        {
                            "external_urls": {
                                "spotify": "https://open.spotify.com/artist/656RXuyw7CE0dtjdPgjJV6"
                            },
                            "href": "https://api.spotify.com/v1/artists/656RXuyw7CE0dtjdPgjJV6",
                            "id": "656RXuyw7CE0dtjdPgjJV6",
                            "name": "Franz Joseph Haydn",
                            "type": "artist",
                            "uri": "spotify:artist:656RXuyw7CE0dtjdPgjJV6"
                        }

 

 

 

 

 

 

Is this a bug or do we need to limit our q parameter to 100 chars?

Reply
3 Replies

I also have this issue since the end of April 2022:

 - returning a 404 Not Found doesn't make sense, it should return a 400 Bad Request,

 - the change is not documented in the doc,

 - many tracks have 100-chars long artist+track and now can't be properly searched.

 

Can we please get feedback on this? Thanks

I also have the same issue. 

Thanks this is now returning a 400, but the API reference doesn't reflect that https://developer.spotify.com/documentation/web-api/reference/#/operations/search

  • it should mention that query cannot be > 100
  • 400 should be part of the possible responses, currently there are only 200 401 403 429

Suggested posts