Announcements

Paging object - "total" Key not matching items.length()

Reply

Paging object - "total" Key not matching items.length()

Newbie

Attempting a search request.

I receive a proper response. However, the "total" attribute does not match the length of the "items" attribute (array).

 

What does the "total" attribute represent, if not the total size of the "items" array?


Docs [https://developer.spotify.com/documentation/web-api/reference/search/search/#paging-object] say:

totalintegerThe total number of items available to return.

 

Example request (GET):

returns 8 items but has [total=11] (while [offset=0 & limit=20])
 
JSON response attached 
1 Reply

Re: Paging object - "total" Key not matching items.length()

Rock Star 16
Rock Star 16

Hey @Shoukry866,

 

Hmm, that doesn't look right. I'll pass this on to the right folks. I'll get back to you as soon as I have more information about this.

 

Thanks, have a good one,

Hubo

HuboRock Star 16
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.
SUGGESTED POSTS