SharePoint REST API Builder
Build SharePoint REST API URLs visually — pick an operation, configure OData parameters, and copy code snippets in JavaScript, PnPjs, or PowerShell.
Site URL
Operation
OData Query Options
Retrieve all lists and libraries in the site
What is the SharePoint REST API?
The SharePoint REST API lets you interact with SharePoint data over HTTP. You can read, create, update, and delete list items, documents, users, and site settings using standard REST calls. It works with any language — JavaScript, C#, PowerShell, Python — as long as you can make HTTP requests.
Common OData Parameters
$select— Choose which fields to return (reduces payload size)$filter— Server-side filtering using OData expressions$expand— Include related entities (e.g., Author, Editor lookup fields)$orderby— Sort results by a field (appenddescfor descending)$top— Limit the number of results returned
Authentication
In SPFx web parts, authentication is handled automatically via the context. For external apps, use Microsoft Entra ID (Azure AD) app registration with Sites.Read.All or Sites.ReadWrite.All permissions.
Frequently Asked Questions
The SharePoint REST API allows developers to interact with SharePoint data remotely using standard HTTP requests (GET, POST, PATCH, DELETE). Any language or platform that can make HTTP calls — JavaScript, Python, PowerShell, Power Automate — can use it.
SharePoint supports: $select (choose columns), $filter (filter rows), $expand (include lookups), $orderby (sort), $top (limit results), and $skip (pagination). Note: $skip does not work with list items — use $skiptoken instead.
The X-RequestDigest header is a security token required for all POST/PATCH/DELETE requests to prevent cross-site request forgery (CSRF). Get it from /_api/contextinfo or use the __REQUESTDIGEST hidden field in classic SharePoint pages.
Use $expand=LookupColumn&$select=LookupColumn/Title,LookupColumn/Id. You must use the internal name of the lookup column (check via /_api/web/lists/getbytitle('List')/fields). Multi-value lookups require the same syntax.
SharePoint REST API returns a maximum of 5000 items per query. For lists with more items, you must use pagination via the @odata.nextLink URL or index your columns. Views with more than 5000 unindexed items will also fail.
Yes. The builder outputs code snippets for: raw fetch(), jQuery AJAX, @pnp/sp (PnPjs), and PnP PowerShell. Each snippet includes proper headers, authentication patterns, and error handling.
For files under 250MB, use the chunked upload API: start with StartUpload, send chunks via ContinueUpload, and finish with FinishUpload. For files under 4MB, the simpler Add endpoint works.