How to Fix SharePoint REST API Returning Incomplete List Items
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.

- 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.
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.
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.
Execute your initial SharePoint REST API GET request and look at the bottom of the returned JSON payload.
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.
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.

Verify User Permissions and List View Thresholds
Ensure the requesting account has adequate permissions and that the query isn't being restricted by SharePoint's threshold limits.
Consult Microsoft Q&A for Advanced API Troubleshooting
For deep API endpoint behavior issues, utilize Microsoft's developer communities.
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. Download the Installer: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install WPS Office: Run the setup file and follow the on-screen prompts to complete the lightweight installation in minutes.
- 3. Open Your Documents: Launch WPS Office and directly open your existing Microsoft Office files with full formatting preserved.

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.




