web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Retrieve Specific Colu...
Power Automate
Suggested Answer

Retrieve Specific Columns from SharePoint List by Created Date Range with REST API

(0) ShareShare
ReportReport
Posted on by 65

Hi Community,

I have a SharePoint list named Tickets with over 10,000 items.

I want to retrieve only selected columns for items created within a specific date range using the SharePoint REST API.

Here’s the query I’m trying:

_api/web/lists/GetByTitle('Tickets')/items?
$select=Id,Title,IssueTitle,Description,Category,Priority,Status,
ExpectedDueDate,ResolutionNotes,SupportComments,ResolvedDate,
ClosedDate,PhoneNumber,Created,Modified,LastUpdatedTime,
MarkAsDelete,MirrorID,OnBehalfOf,
AssignedTo/Id,AssignedTo/Title,AssignedTo/EMail,
RequestedBy/Id,RequestedBy/Title,RequestedBy/EMail,
OnBehalfName/Id,OnBehalfName/Title,OnBehalfName/EMail
&$expand=AssignedTo,RequestedBy,OnBehalfName
&$filter=Created ge datetime'2025-09-01T00:00:00Z' and Created le datetime'2025-09-12T23:59:59Z'
&$top=500

I need to:


  • Retrieve only these columns.

  • Filter by the Created date between 2025-09-01 and 2025-09-12.

  • Handle more than 10,000 items efficiently.

 

Could anyone suggest the best approach or confirm if this query is correct?
Do I need to modify anything for pagination or to avoid the 5,000-item threshold?

Thanks in advance!

Categories:
I have the same question (0)
  • David_MA Profile Picture
    14,761 Super User 2026 Season 1 on at
    I don't do this too often, but you should be able to go to your SharePoint list, and after the https://domain.sharepoint.com/sites/yoursitename/ you can paste in the query string. If it works, you should see data returned in your browser window. Be sure all the fields you select are the internal names. Since I don't see any spaces in any, it looks like that is what you are doing.
     
    If you need to retrieve more than 100 items, you'll need to use paging to get back 100 items at a time, which based on the top 500 in your query, that is what you want to do. You can learn about paging at Paging Microsoft Graph data in your app - Microsoft Graph | Microsoft Learn. I think I've only needed to use this once, so someone else will need to provide assistance if you need this and have trouble with it.
     
    If your list has over 5,000 items, which I think it does since you're asking about 10,000, the fields in your filter need to be indexed in the SharePoint list. Otherwise, the filters will only work on the first 100 items in the list.
  • Suggested answer
    shetanshudharsharma Profile Picture
    154 on at
    Please find my humble reply that i could find via my limited knowledge in combination with Gen AI and google search.
    Let me know if it helps.
     
    To efficiently retrieve only selected columns for items created within a specific date range from a SharePoint list with over 10,000 items, using the REST API, follow best practices for threshold handling and pagination. Your query structure is correct for selection and filtering, but you'll need to enhance it for large-volume retrieval due to SharePoint's 5,000-item view threshold.
    Query Validation
    Your provided REST API query correctly:
    • Selects specific fields via $select
    • Expands multi-person columns using $expand
    • Filters by the Created date with $filter
    • Limits results per call with $top=500
    However, SharePoint REST API has a 5,000-item threshold. For lists above this size, you must use pagination with the ListItemCollectionPosition (server-driven paging) returned in response. $top=500 is appropriate for each page, but to get all items, you need to continue querying using the paging token.
    Best Practices for Large Lists
    • Use server-driven paging: After each request, check for an @odata.nextLink property in the response. Use its URL as the next request to retrieve further pages until no more pages remain.
    • Avoid using $skip for big lists: It is inefficient and not recommended.
    • Do not request all items at once: Stick to $top=500 or $top=1000 for optimal performance.
    • Use index columns: Ensure the Created column is indexed, especially for large lists to prevent errors.
    Pagination Example
    1. Run your query as posted.
    2. Inspect the response for @odata.nextLink
    3. If present, make the next REST call to that URL.
    4. Repeat until all items are retrieved.
    Query Optimization (Sample)
    _api/web/lists/GetByTitle('Tickets')/items?
    $select=Id,Title,IssueTitle,Description,Category,Priority,Status,ExpectedDueDate,ResolutionNotes,SupportComments,ResolvedDate,ClosedDate,PhoneNumber,Created,Modified,LastUpdatedTime,MarkAsDelete,MirrorID,OnBehalfOf,AssignedTo/Id,AssignedTo/Title,AssignedTo/EMail,RequestedBy/Id,RequestedBy/Title,RequestedBy/EMail,OnBehalfName/Id,OnBehalfName/Title,OnBehalfName/EMail
    &$expand=AssignedTo,RequestedBy,OnBehalfName
    &$filter=Created ge datetime'2025-09-01T00:00:00Z' and Created le datetime'2025-09-12T23:59:59Z'
    &$top=500


    Use pagination as described above.

    Additional Recommendations
    • Index your Created column for better performance if not already done.
    • If using Power Automate, consider the "Get items" action with Pagination enabled, though REST remains most flexible.
    • For extremely large exports, consider using SharePoint Graph API or export to CSV via Power Automate or custom scripting for further automation.
    References:
     
     
    Aspect Recommendation Reason Source
    Select columns Use $select Limits data, faster  
    Date filter Index Created Avoid threshold errors  
    Pagination Use @odata.nextLink Efficient paging  
    Item count $top=500 or $top=1000 Stay under 5,000 threshold  

    The query is correct for selection and date filtering. Add server-driven paging logic to handle more than 5,000 items, and index the Created column for threshold compliance.

    Sources:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 468

#2
Haque Profile Picture

Haque 370

#3
Valantis Profile Picture

Valantis 354

Last 30 days Overall leaderboard