How to limit response data from api?

[details=“System Information”]

  • Strapi Version: 4.2
  • Operating System: windows
  • Database: mysql
  • Node Version: 16.13.1
  • NPM Version: 8.2.0
  • Yarn Version: -
    I have been searching for a while how to replace my current url to limit the response of products from backend.

Using strpi 3.8.6 i was using http://localhost:1337/products?_limit=5&_sort=:DESC

but now it does’t work anymore and trying the same in 4.2 doesnt filter the limit or sort

1 Like

StrapiV4 does not have _limit and _sort params. See the following document.

Add this to the end of your API call:

&pagination[pageSize]=1