I have a list with more then 100 rows, so I added limit to the url.

I have two questions:

  1. How can I set it to not limit with no write a specific number (like 1000)?
  2. How can I add a filter to the list?
  3. I tried to do

    /_api/web/lists/GetByTitle('ListName')/items?$limit=1000&$filter= status eq 'ok'

    but it's not working for me.


To return unlimited results, just drop the $limit=1000 from the query.

EDIT: Indeed SharePoint by default returns 100 items of the list. The correct way to return a bigger subset of items would be to use $top= in the query. However, note that this default value of 100 is implemented most importantly for performance reasons. This means that it would be advised to implement paging for your returned items showing e.g. 100, 200 or 1000 items per page. This has been discussed e.g. here: List API get all items limited to 100 rows

To properly filter the return, the syntax needs to be $filter=<column> <operator> '<value>'. Pay attention to the spaces! So in your cases the query would be:

/_api/web/lists/GetByTitle('ListName')/items?$top=1000&$filter=status eq 'ok'
| improve this answer | |
  • If I drop it, It's return only 100 items... – uriel Jun 15 '17 at 8:50
  • @uriel you are correct, I edited the answer. – moe Jun 15 '17 at 8:57
  • it's not working :( – uriel Jun 15 '17 at 10:24
  • @uriel do you actually have a column by the name status in your list? Are there list items which actually have a value of ok in the status field? – moe Jun 15 '17 at 10:36

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.