Forum Discussion
anonms2200
Jul 18, 2024Copper Contributor
SharePoint Search REST API Parsing Limits
What is the number of documents the API can parse when given a query?
Jul 18, 2024
Rest API with return maxmimum of 5000 item, so you need to use pagination to get more than that
anonms2200
Jul 18, 2024Copper Contributor
To return these 5000 items, do you know how many documents it can search through before it times out or locates these 5000 items
- Jul 18, 2024Think you are misinterpreting or you need to explain in more detail what you want to do!
So you Send a Rest Request to SharePoint with your Query, You will get a result up to 5000 items in a JSON. This JSON contain information such as name, location etc etc but not content etc.
Check this link to get a better understanding!
https://learn.microsoft.com/en-us/sharepoint/dev/general-development/sharepoint-search-rest-api-overview- anonms2200Jul 18, 2024Copper ContributorSorry for the confusion. I have a rather large SharePoint document library so when I send a rest request to SharePoint with my query, will the API query my entire library or is there a limit?
For instance, let's say my library has 20,000 documents, will the API be able to iterate through all 20,000 documents? Is there a limit that the API can iterate through?- Jul 18, 2024So you will get the first 5000 items using $top=5000, so getting the next 5000 you need to use paginagtion to get 5001 - 10 001 And then handle the next one etc etc.
Check these links!
https://learn.microsoft.com/en-us/sharepoint/dev/general-development/pagination-for-large-result-sets
https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/use-odata-query-operations-in-sharepoint-rest-requests#page-through-returned-items
https://learn.microsoft.com/en-us/sharepoint/dev/general-development/pagination-for-large-result-sets