Five Number tools
Five Number tools › SharePoint REST Query Builder

SharePoint REST Query Builder

Build a SharePoint REST _api query without remembering the OData quirks. Pick an endpoint, set $select, $filter, $expand, $orderby and $top, and get the URL plus the Power Automate HTTP action, PnP.js, PnP PowerShell and cURL. It handles the SharePoint-specific bits: datetime'...' dates, substringof with its reversed arguments, and the $expand a lookup needs.

Everything is built in your browser. Nothing is sent anywhere.
Start from an example

Build the query

Combine with

Output

REST URL

        
Power Automate (Send an HTTP request to SharePoint)

        
PnP.js (TypeScript)

        
PnP PowerShell

        
cURL

        

SharePoint REST notes

  • Field names are internal names, not display names. “Assigned To” is usually AssignedTo, and a space in a name becomes _x0020_.
  • Dates use the OData v3 literal, Modified ge datetime'2026-01-01T00:00:00', not a bare ISO string.
  • Contains is substringof('text', Field) with the value first, which is the reverse of startswith(Field, 'text'). SharePoint REST has no endswith.
  • Lookup and person fields: filter by id with AuthorId eq 5, or by a property like Author/Title eq 'Sam' after adding the field to $expand. Selecting Author/Title also needs $expand=Author.
  • Yes/No fields filter as eq 1 or eq 0.
  • Over 5000 items: a query that is not covered by an index throws the list view threshold error. Filter or order on an indexed column, keep $top at or below the page size, and follow the odata.nextLink (the __next URL) for the next page. $skip is not honoured on list items, though it works on lists, fields, users and groups.
  • In PowerShell and cURL the $ in $select must stay literal, so this tool single-quotes those strings for you.

Disclaimer

These tools are provided free and as-is, with no warranty of any kind. Results are best-effort and can be incomplete or out of date, so always verify them against official Microsoft documentation before you act on them.

fivenumber tools is an independent project and is not affiliated with, sponsored by, or endorsed by Microsoft. Microsoft, Microsoft 365, SharePoint, Entra, OneDrive and Copilot are trademarks of the Microsoft group of companies.

Send feedback

Found this useful, or hit a snag? Tell me what worked and what would make it better. Your note comes straight to me.

Thanks, your feedback was sent.

I read every note. If you left your email, I may follow up.