How to retrieve all SharePoint Online List Items using Rest API

We can fetch data from SharePoint in various ways - CSOM (client side object model), JSOM (JavaScript Object Model), Server Object Model, Graph API, Rest API.

REST API has been one of the most popular choice for developers. Major advantage is that REST is faster, universally accepted standard, platform independent.

With SharePoint, you can quickly test the REST call in your browser (try url from address bar) to check the returned response before actually using it.

REST API to get all items from SharePoint List/Document Library

Use GetByTitle('[List Name]')
This gets all list items from selected list
[Tenant] = name of your tenant
[SiteName] = Name of Site Collection / Sub site
[ListName] = Name of your SharePoint list

Get only selected column

Append ?$select=[Column Name]
This gets Title field value of all list items from selected list

Get multiple columns

Append ?$select=[Column Name 1,Column Name 2]
This gets Title and Date field value of all list items from selected list

You can further filter, order and sort columns in the REST query.
This link can be used with an AJAX function in your HTML and JQuery/JavaScript code to process and display the results ==> data.d.

The REST call will work with any language - .Net, JAVA, PHP, HTML, etc.

Try Out Code2care Dev Tools:


Android Java Linux Microsoft Google Python macOS Notepad++ Microsoft Teams CSS PHP SharePoint Html Linux C Programs Bootstrap jQuery Sublime Android Studio Facebook Eclipse WhatsApp News MySQL Json HowTos JavaScript FTP S3


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Tutorials, Trouble-Shooting steps, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.
🎉 We are celebrating the 10th years of Code2care! Thank you for all your support! We hope we made a difference.
We strong support Gender Equality & Diversity.

We stand in solidarity with Ukraine - Make a donation to UNHCR -