I need to get the last ten created item from my list ; I used TOP in my query but this it doesn't work , still give me all items without filtering : this is my query :

var queryGet= "?$filter=Title ne 'reply'&top=3" 

any ideas.


For listing item in a particular order you should use orderby in the URL

var queryGet = "?filter=Title ne 'reply'&$top=10&$orderby=Created desc"
  • it still give me all items , the top=10 doesnt work – Imen Turki Dec 22 '14 at 15:38
  • sorry a typo.. use $top. See my updated answer – Amal Hashim Dec 22 '14 at 15:38
_api/web/Lists/GetByTitle('ListName')/items?$top=10&$select=Title&$orderby=Title desc
  • 1
    Please explain your answer a bit so the person asking the question gets the knowledge behind it. – Arsalan Adam Khatri Apr 17 '17 at 10:39
  • 1
    This doesn't add anything, as the accepted answer already mentioned the $orderby parameter. – wjervis Apr 17 '17 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.