When doing a GET call to the List API from JavaScript: "/_api/web/lists/GetByTitle('ListName')/items" the results returned are limited to 100 rows.

Is there any way to return more rows in the result, like return 1000 rows instead? Or do I have to resort to paging?

6 Answers 6


The limit is due to server-driven paging. It protects against developers inadvertently making a request that returns large result sets.

You can use $top if you really want a large result set to be returned. Otherwise you can get the results a page at a time by checking __next. If it has a value, it contains the url that will return the next set of items. If it's null, you've hit the end of the result set.

function callToHostWeb() {
    var message = jQuery("#message");

    var hostUrl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
    var appUrl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));

    var scriptbase = hostUrl + "/_layouts/15/";
    var url = appUrl + "/_api/SP.AppContextSite(@target)/Web/Lists/getByTitle('Order Details')/Items?$select=Title&@target='" + hostUrl + "'";
    jQuery.getScript(scriptbase + "SP.RequestExecutor.js", getOrderDetails);

    function getOrderDetails() {
        var executor = new SP.RequestExecutor(appUrl);
                url: url,
                method: "GET",
                dataType: "json",
                headers: {
                    Accept: "application/json;odata=verbose"
                success: function (data) {
                    var response = JSON.parse(data.body);
                    message.append(String.format("Retrieved {0} items", response.d.results.length));

                    if (response.d.__next) {
                        url = response.d.__next;
                error: function (data, errorCode, errorMessage) {

    function getQueryStringParameter(paramToRetrieve) {
        var params =
        var strParams = "";
        for (var i = 0; i < params.length; i = i + 1) {
            var singleParam = params[i].split("=");
            if (singleParam[0] == paramToRetrieve)
                return singleParam[1];
  • 3
    Just wanted to confirm that $top is the one you should be going after. $limit does not work for me in SharePoint 2013.
    – koniczynek
    Commented Jan 3, 2014 at 12:34
  • $limit didn't work for me either
    – yngrdyn
    Commented Mar 22, 2016 at 15:04
  • Good answer +1. However your callback on success may need to work on all results. See my answer for handling that case. Commented Apr 21, 2016 at 11:07
  • i there any way to get all data of list using REST. Because i dont want to give static limit to top. i am making graph from that records . so i want all data of list. Commented Aug 11, 2016 at 5:17
  • 1
    what if we want to use filter like _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('ListName')/items?$filter=ColumnName eq 'abc'&$top=1000". Where we have more than 5000 items having value 'abc' in the ColumnName. Will it work?
    – Harsh
    Commented Dec 13, 2017 at 8:57
  • The problem with $top is that you do a single ajax call with potentially a lot of results in your response. This may cause performance issues. Commented Apr 21, 2016 at 11:11

the "$limit=" option above does NOT work. however, the $top= does.

  • 1
    The problem with $top is that you do a single ajax call with potentially a lot of results in your response. This may cause performance issues. Commented Apr 21, 2016 at 11:11

The option of querying items with $top is not advisable for performance reasons and impact on the network traffic.

The best option is recursion. Note: Normally you have a callback on success and you may have to work on all items: in that case you need to concat all results before executing the callback. Also you may need a check on complete callback. The following example address this use case:

function GetAllItems (ListGuid, Query, OnSuccess, OnComplete) {

    function GetItems() {
            url: url,
            method: "GET",
            headers: { "Accept": "application/json;odata=verbose" },
            success: function (data) {
                results = results.concat(data.d.results);
                if (data.d.__next) {
                    url = data.d.__next;
                else {
                    nonext = true;
                    if (typeof OnSuccess != 'undefined') OnSuccess(results);
            error: SPUtils.onQueryFailed,
            complete: function () {
                if (typeof OnComplete != 'undefined' && nonext) {

    var nonext = false;
    var results = [];
    var url = LMS.WebApi + "/lists(guid'" + ListGuid + "')/items?" + Query;
  • 3
    Just a note; data.d.__next will be data['odata.nextLink'] if you are using odata=nometadata , verbose should not be used imo unless there is a reason for it. Commented May 5, 2016 at 18:28
  • @AndersAune good point, in most scenarios nometadata provides all we need with minimal payload. Commented May 6, 2016 at 9:01
  • 1
    Clean code!!! ++
    – EasyE
    Commented Oct 3, 2016 at 22:15
  • 1
    I disagree - if you literally want all of the items, a single request is more performant and has less network overhead. If you're display items to a user, however, you'll want to use paging. If you're doing a "type-ahead" dropdown, you'll want to limit. But if you actually want all items, request all items in a single request. Commented Jun 20, 2018 at 9:07
  • also, this isn't recursion Commented Jun 20, 2018 at 10:42

100 items is the default limit Please use $top in your request:

  • 2
    $limit does not work Commented Apr 21, 2016 at 11:09

You need to be sure to have $skiptoken=Paged=TRUE for this to work in 2013.

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