- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Plan: Premium
Hello, third party app developer here.
I hit a strange issue in development while searching for a very long track title.
It appears that there is a hard limit of 144 characters for the `q` query parameter in the Web API /search endpoint.
Sending a query with q >= 145 characters returns a 404, which I found to be quite surprising.
If the query parameter is too long, I would expect the endpoint to return an appropriate error rather than a 404 status with a "Not Found" error.
Here is an example query that correctly returns a 200 response:
https://api.spotify.com/v1/search?type=track&q=This%20song%20does%20not%20exist%20i%20just%20want%20...
The same query with one additional character at the end returns a 404 response:
https://api.spotify.com/v1/search?type=track&q=This%20song%20does%20not%20exist%20i%20just%20want%20...
The error is as follows:
{
"error" : {
"status" : 404,
"message" : "Not found."
}
}
Solved! Go to Solution.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page