logo
search
SharePoint Document Issues

How to Fix SharePoint REST API Returning Incomplete List Items

Partner EditorPartner Editor Oct 10, 2026 869 views

Question details

The user needs to retrieve all records from a SharePoint list using the REST API, but the response returns fewer items than the list contains.

How to Fix SharePoint REST API Returning Incomplete List Items
Product
SharePoint
Device & OS
not provided
Scenario
Querying a SharePoint list via the REST API to fetch a complete dataset of list items.
Observed behavior
The API response misses several list items and returns an incomplete dataset, even when the $top parameter value is increased.
Before you start

Ensure you have an API testing tool like Postman or a browser with developer tools enabled to properly inspect the JSON responses and endpoint behaviors.

Solution 1Recommended

Handle Server-Driven Pagination Using @odata.nextLink

SharePoint paginates large API responses by default. You must follow the pagination link to retrieve all list items.

When querying a large SharePoint list, the REST API often limits the number of items returned in a single call to optimize performance. Increasing the $top query parameter won't bypass server-side limits. Instead, you need to check for a pagination token.

1
Inspect the JSON Response

Execute your initial SharePoint REST API GET request and look at the bottom of the returned JSON payload.

2
Locate the @odata.nextLink Property

Search for the '@odata.nextLink' or '__next' property in the response object. This property contains the URL required to fetch the next batch of list items.

3
Fetch Subsequent Pages

Send a new GET request using the exact URL provided in the '@odata.nextLink' property. Repeat this process programmatically in a loop until the API response no longer includes an '@odata.nextLink' property.

Handle Server-Driven Pagination Using @odata.nextLink
Automation Tip: If you are using Power Automate or a custom script, ensure your HTTP action or loop is configured to follow pagination automatically.
Free Microsoft Office alternative

Streamline Your Work with WPS Office

While resolving complex SharePoint and Microsoft API issues can be time-consuming, handling your actual documents shouldn't be. Try WPS Office as a free, lightweight, and incredibly capable alternative for all your Word, Excel, and PowerPoint needs.

  1. 1. Download the Installer: Visit the official WPS website and download the free installation package for your operating system.
  2. 2. Install WPS Office: Run the setup file and follow the on-screen prompts to complete the lightweight installation in minutes.
  3. 3. Open Your Documents: Launch WPS Office and directly open your existing Microsoft Office files with full formatting preserved.
Seamlessly compatible with all Microsoft Office formats (.docx, .xlsx, .pptx)Lightweight architecture ensures fast installation and startupFamiliar tabbed user interface makes migration effortlessBuilt-in PDF editing and conversion tools at no extra cost
microsoft office alternative - wps office

Frequently Asked Questions

Why does setting $top=5000 not return all items from my SharePoint list?

Even with $top=5000, server-side limits, lookup column thresholds, or network timeouts may force SharePoint to return fewer items. You must check the response for an @odata.nextLink and use it to retrieve the remaining items.

Does the SharePoint REST API hide items I don't have permission to see?

Yes. The SharePoint REST API is strictly security-trimmed. It will successfully execute but only return the specific list items that the authenticated account has explicit permissions to read.

What is @odata.nextLink in the SharePoint REST API response?

The @odata.nextLink is a URL provided at the end of a paginated JSON response. It acts as a token, allowing you to fetch the next sequential batch of items that did not fit into the initial API response.

Can lookup columns affect how many items the REST API returns?

Yes. If your API query relies heavily on $expand or filters against complex lookup columns, it may hit the internal lookup threshold, causing the query to fail or return partial results to maintain database performance.