<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Web API `search` endpoint unexpected results. in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-search-endpoint-unexpected-results/m-p/6353407#M15057</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Web API's `search` endpoint is giving unexpected results. For example, the result is empty (even after the response code 200). BUT, with the same query on &lt;A title="Web API - Search for Item" href="https://developer.spotify.com/documentation/web-api/reference/search" target="_blank" rel="noopener"&gt;documentation playground&lt;/A&gt;, it does return right results. Even if I copy-paste the exact query from the documentation playground (after it returns expected results) into my code, it returns empty results unlike the documentation playground or the Spotify web interface.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, I thought I might be doing something wrong, AND the thing was: I was using `track:` &amp;amp; `artist:` before the song name and artist name respectively just like shown in the documentation example. Even tried with explicitly using `&lt;SPAN&gt;track%3A` &amp;amp; `artist%3A`, but still got empty/null results with response code 200.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, I removed `track:` &amp;amp; `artist:` from my query string. But now I am getting unexpected results again. It does not return right results. Same search query if compared with the Web interface &amp;amp; Documentation playground, it (the `search` endpoint) returns completely different / random results.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Again, even if copy-paste the exact same query from documentation playground (which returns expected results) into the code, the `search` endpoint returns empty/null results.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CheapNightbot_0-1726675379171.png" style="width: 400px;"&gt;&lt;img src="https://community.spotify.com/t5/image/serverpage/image-id/181439iB97B914BAF5A7F65/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CheapNightbot_0-1726675379171.png" alt="CheapNightbot_0-1726675379171.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;^ &amp;lt;Response [200]&amp;gt;, but "items" list is empty.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CheapNightbot_1-1726675508968.png" style="width: 400px;"&gt;&lt;img src="https://community.spotify.com/t5/image/serverpage/image-id/181440i5E069627B429B5C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CheapNightbot_1-1726675508968.png" alt="CheapNightbot_1-1726675508968.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;^ Same query on Documentation playground return "items".&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(new here, sorry if the issue isn't clear or I repeated myself)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Sep 2024 16:30:44 GMT</pubDate>
    <dc:creator>CheapNightbot</dc:creator>
    <dc:date>2024-09-18T16:30:44Z</dc:date>
    <item>
      <title>Web API `search` endpoint unexpected results.</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-search-endpoint-unexpected-results/m-p/6353407#M15057</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Web API's `search` endpoint is giving unexpected results. For example, the result is empty (even after the response code 200). BUT, with the same query on &lt;A title="Web API - Search for Item" href="https://developer.spotify.com/documentation/web-api/reference/search" target="_blank" rel="noopener"&gt;documentation playground&lt;/A&gt;, it does return right results. Even if I copy-paste the exact query from the documentation playground (after it returns expected results) into my code, it returns empty results unlike the documentation playground or the Spotify web interface.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, I thought I might be doing something wrong, AND the thing was: I was using `track:` &amp;amp; `artist:` before the song name and artist name respectively just like shown in the documentation example. Even tried with explicitly using `&lt;SPAN&gt;track%3A` &amp;amp; `artist%3A`, but still got empty/null results with response code 200.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, I removed `track:` &amp;amp; `artist:` from my query string. But now I am getting unexpected results again. It does not return right results. Same search query if compared with the Web interface &amp;amp; Documentation playground, it (the `search` endpoint) returns completely different / random results.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Again, even if copy-paste the exact same query from documentation playground (which returns expected results) into the code, the `search` endpoint returns empty/null results.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CheapNightbot_0-1726675379171.png" style="width: 400px;"&gt;&lt;img src="https://community.spotify.com/t5/image/serverpage/image-id/181439iB97B914BAF5A7F65/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CheapNightbot_0-1726675379171.png" alt="CheapNightbot_0-1726675379171.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;^ &amp;lt;Response [200]&amp;gt;, but "items" list is empty.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CheapNightbot_1-1726675508968.png" style="width: 400px;"&gt;&lt;img src="https://community.spotify.com/t5/image/serverpage/image-id/181440i5E069627B429B5C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CheapNightbot_1-1726675508968.png" alt="CheapNightbot_1-1726675508968.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;^ Same query on Documentation playground return "items".&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(new here, sorry if the issue isn't clear or I repeated myself)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 16:30:44 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-search-endpoint-unexpected-results/m-p/6353407#M15057</guid>
      <dc:creator>CheapNightbot</dc:creator>
      <dc:date>2024-09-18T16:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Web API `search` endpoint unexpected results.</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-search-endpoint-unexpected-results/m-p/6354228#M15058</link>
      <description>&lt;P&gt;CheapNightBot,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm glad you posted this, because I'm seeing same "unexpected token" issue at the moment. This reminds me of the bug in February of this year that went on a few days as a result of Spotify tinkering on the backend.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We'll have to wait and see.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 21:08:04 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-search-endpoint-unexpected-results/m-p/6354228#M15058</guid>
      <dc:creator>prolificpalmtree</dc:creator>
      <dc:date>2024-09-18T21:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Web API `search` endpoint unexpected results.</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-search-endpoint-unexpected-results/m-p/6394330#M15132</link>
      <description>&lt;P&gt;Oh Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We'll wait...&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":flushed_face:"&gt;😳&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 20:06:30 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-search-endpoint-unexpected-results/m-p/6394330#M15132</guid>
      <dc:creator>CheapNightbot</dc:creator>
      <dc:date>2024-09-27T20:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Web API `search` endpoint unexpected results.</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-search-endpoint-unexpected-results/m-p/6398271#M15140</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for reaching out to the community, and welcome!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The search endpoint is working fine on my end.&lt;/P&gt;&lt;P&gt;The issue with the demo code is that the token is removed in the middle.&lt;/P&gt;&lt;P&gt;To use this endpoint, you’ll need a token generated through the Client Credentials Flow at the very least.&lt;/P&gt;&lt;P&gt;You can get one by going through the &lt;A href="https://developer.spotify.com/documentation/web-api/tutorials/getting-started" target="_blank" rel="noopener"&gt;Getting started with Web API&lt;/A&gt; guide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this helps, and feel free to ask if you have any more questions!&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 28 Sep 2024 15:17:10 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-search-endpoint-unexpected-results/m-p/6398271#M15140</guid>
      <dc:creator>Ximzend</dc:creator>
      <dc:date>2024-09-28T15:17:10Z</dc:date>
    </item>
  </channel>
</rss>

