<?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 Re: v1/search API 'offset' parameter issue in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/v1-search-API-offset-parameter-issue/m-p/5627509#M10447</link>
    <description>&lt;P&gt;On further investigation results are not consistently empty when setting the 'offset' parameter to more than 100. For example the cut off point for this search currently appears to be 133.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Request&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl 
--request GET \
--url 'https://api.spotify.com/v1/search?q=Miles+Davis&amp;amp;type=album&amp;amp;offset=133'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Response&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
   "albums":{
      "href":"https://api.spotify.com/v1/search?query=Miles+Davis&amp;amp;type=album&amp;amp;locale=en-GB%2Cen%3Bq%3D0.5&amp;amp;offset=133&amp;amp;limit=20",
      "limit":20,
      "next":"https://api.spotify.com/v1/search?query=Miles+Davis&amp;amp;type=album&amp;amp;locale=en-GB%2Cen%3Bq%3D0.5&amp;amp;offset=153&amp;amp;limit=20",
      "offset":133,
      "previous":"https://api.spotify.com/v1/search?query=Miles+Davis&amp;amp;type=album&amp;amp;locale=en-GB%2Cen%3Bq%3D0.5&amp;amp;offset=113&amp;amp;limit=20",
      "total":1000,
      "items":[
         
      ]
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The items array is empty even though the total number of expected results is 1000. Lowering 'offset' returns populated items.&lt;BR /&gt;&lt;BR /&gt;Can anyone replicate this behaviour?&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2023 11:18:14 GMT</pubDate>
    <dc:creator>ultramush</dc:creator>
    <dc:date>2023-08-25T11:18:14Z</dc:date>
    <item>
      <title>v1/search API 'offset' parameter issue</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/v1-search-API-offset-parameter-issue/m-p/5627189#M10429</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When requesting search results with an 'offset' parameter of more than 99 the response json contains an empy item array, even when the total number of results is more than 100. For example, I get the following response with an 'offset' parameter of 100. However, the total number of expected results is 848 so in this case I would expect an full array of 50 items due to the 'limit' parameter being set to 50.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;curl --request GET \&lt;BR /&gt;--url '&lt;A href="https://api.spotify.com/v1/search?q=label%3AKompakt&amp;amp;type=album&amp;amp;limit=50&amp;amp;offset=100" target="_blank" rel="noopener"&gt;https://api.spotify.com/v1/search?q=label%3AKompakt&amp;amp;type=album&amp;amp;limit=50&amp;amp;offset=100&lt;/A&gt;'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
   "albums":{
      "href":"https://api.spotify.com/v1/search?query=label%3AKompakt&amp;amp;type=album&amp;amp;locale=en-GB%2Cen%3Bq%3D0.5&amp;amp;offset=100&amp;amp;limit=50",
      "limit":50,
      "next":"https://api.spotify.com/v1/search?query=label%3AKompakt&amp;amp;type=album&amp;amp;locale=en-GB%2Cen%3Bq%3D0.5&amp;amp;offset=150&amp;amp;limit=50",
      "offset":100,
      "previous":"https://api.spotify.com/v1/search?query=label%3AKompakt&amp;amp;type=album&amp;amp;locale=en-GB%2Cen%3Bq%3D0.5&amp;amp;offset=50&amp;amp;limit=50",
      "total":848,
      "items":[
         
      ]
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With 'offset' of 99, only 1 item is returned...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
   "albums":{
      "href":"https://api.spotify.com/v1/search?query=label%3AKompakt&amp;amp;type=album&amp;amp;locale=en-GB%2Cen%3Bq%3D0.5&amp;amp;offset=99&amp;amp;limit=50",
      "limit":50,
      "next":"https://api.spotify.com/v1/search?query=label%3AKompakt&amp;amp;type=album&amp;amp;locale=en-GB%2Cen%3Bq%3D0.5&amp;amp;offset=149&amp;amp;limit=50",
      "offset":99,
      "previous":"https://api.spotify.com/v1/search?query=label%3AKompakt&amp;amp;type=album&amp;amp;locale=en-GB%2Cen%3Bq%3D0.5&amp;amp;offset=49&amp;amp;limit=50",
      "total":848,
      "items":[
         {
            "album_type":"single",
            "total_tracks":2,
            "available_markets":[
            ],
            "external_urls":{
               "spotify":"https://open.spotify.com/album/00aoFgHb7qw8PMkYxQZw9W"
            },
            "href":"https://api.spotify.com/v1/albums/00aoFgHb7qw8PMkYxQZw9W",
            "id":"00aoFgHb7qw8PMkYxQZw9W",
            "images":[
               {
                  "url":"https://i.scdn.co/image/ab67616d0000b27349f793dd743b337a1e8fa7ac",
                  "height":640,
                  "width":640
               },
               {
                  "url":"https://i.scdn.co/image/ab67616d00001e0249f793dd743b337a1e8fa7ac",
                  "height":300,
                  "width":300
               },
               {
                  "url":"https://i.scdn.co/image/ab67616d0000485149f793dd743b337a1e8fa7ac",
                  "height":64,
                  "width":64
               }
            ],
            "name":"Walls vs. Gerd Janson &amp;amp; Prins Thomas",
            "release_date":"2012-09-03",
            "release_date_precision":"day",
            "type":"album",
            "uri":"spotify:album:00aoFgHb7qw8PMkYxQZw9W",
            "artists":[
               {
                  "external_urls":{
                     "spotify":"https://open.spotify.com/artist/4zLjvhhQ5WLRFCKPPgx8q6"
                  },
                  "href":"https://api.spotify.com/v1/artists/4zLjvhhQ5WLRFCKPPgx8q6",
                  "id":"4zLjvhhQ5WLRFCKPPgx8q6",
                  "name":"Walls",
                  "type":"artist",
                  "uri":"spotify:artist:4zLjvhhQ5WLRFCKPPgx8q6"
               }
            ]
         }
      ]
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Please note &lt;STRONG&gt;I am not attempting to retrive more than 100 results with one request&lt;/STRONG&gt;. I am limiting the result items to 50 and adjusting the 'offset' parameter to retrive the full result set of 848 over multiple queries. Using the url specified in the 'next' property in the json response also yeilds no results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as I can tell the behaviour has changed over the last week or two. It was previously possible to get the the full result set of 848 items using the 'next' url.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please could you confirm if this is expected behaviour or a newly introduced issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 07:08:57 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/v1-search-API-offset-parameter-issue/m-p/5627189#M10429</guid>
      <dc:creator>ultramush</dc:creator>
      <dc:date>2023-08-25T07:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: v1/search API 'offset' parameter issue</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/v1-search-API-offset-parameter-issue/m-p/5627509#M10447</link>
      <description>&lt;P&gt;On further investigation results are not consistently empty when setting the 'offset' parameter to more than 100. For example the cut off point for this search currently appears to be 133.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Request&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl 
--request GET \
--url 'https://api.spotify.com/v1/search?q=Miles+Davis&amp;amp;type=album&amp;amp;offset=133'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Response&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
   "albums":{
      "href":"https://api.spotify.com/v1/search?query=Miles+Davis&amp;amp;type=album&amp;amp;locale=en-GB%2Cen%3Bq%3D0.5&amp;amp;offset=133&amp;amp;limit=20",
      "limit":20,
      "next":"https://api.spotify.com/v1/search?query=Miles+Davis&amp;amp;type=album&amp;amp;locale=en-GB%2Cen%3Bq%3D0.5&amp;amp;offset=153&amp;amp;limit=20",
      "offset":133,
      "previous":"https://api.spotify.com/v1/search?query=Miles+Davis&amp;amp;type=album&amp;amp;locale=en-GB%2Cen%3Bq%3D0.5&amp;amp;offset=113&amp;amp;limit=20",
      "total":1000,
      "items":[
         
      ]
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The items array is empty even though the total number of expected results is 1000. Lowering 'offset' returns populated items.&lt;BR /&gt;&lt;BR /&gt;Can anyone replicate this behaviour?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 11:18:14 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/v1-search-API-offset-parameter-issue/m-p/5627509#M10447</guid>
      <dc:creator>ultramush</dc:creator>
      <dc:date>2023-08-25T11:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: v1/search API 'offset' parameter issue</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/v1-search-API-offset-parameter-issue/m-p/5635035#M10712</link>
      <description>&lt;P&gt;I've seen the same behaviour. For me, the offset number is 99. Anything above that returns and empty items array.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Would love to know why this is happening all of a sudden.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;UPDATE:&lt;BR /&gt;Weird. Moments after I posted the issue resolved itself. Offset is behaving as expected as of Sep 12 12:15pm AST&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 15:17:27 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/v1-search-API-offset-parameter-issue/m-p/5635035#M10712</guid>
      <dc:creator>seeingwhereitgoes</dc:creator>
      <dc:date>2023-09-12T15:17:27Z</dc:date>
    </item>
  </channel>
</rss>

