Rest API Filter Methods On SharePoint List Items

In this blog we will see how to filter SharePoint list items using Rest API. We can filter items based on field title, field ID or modified date of items.  In Rest API through  url parameter we can easily perform filtering on SharePoint list items. For filter methods url parameter is composed of three components.

  • Field name
  • Operator such as eq,lt,le,gt,ge,ne
  • Value for filtering

In this blog we have a custom list “Employee”. We will filter the employee name having age greater than 30.

Add a script editor on your home page. Go to edit mode and these below codes in script editor webparts.

<script src=””></script>
var requestUri = _spPageContextInfo.webAbsoluteUrl +
“/_api/web/lists/getByTitle(‘Employee’)/items/?$filter=Age gt 30”;
url: requestUri,
type: “GET”,
headers: {
“accept”:”application/json; odata=verbose”

success: onSuccess,
error: onError

function onSuccess(data) {
var items = data.d.results;
var result=””;
for (var i = 0; i < items.length; i++) {
result +=items[i].Id+ ” : ” + items[i].First_x0020_Name +’\n’;
alert (result);
function onError(error) {


<input type=”button” id=”btnClick” value=”Filter List Items By Title(Age greater Than 30)”/>

After saving the page you will see a button has been added to the homepage.


Click on the button displays an alert showing all employee’s ID and name having age greater than 30.


Applying Rest API filter query method on Sharepoint List Items
Sharepoint Using Rest API for filtering Sharepoint List Items
SharePoint Rest API Filter Example
Rest API Filter Conditions on Sharepoint
Rest API Filter Methods On SharePoint ListItems


Add Your Comments

Your email address will not be published. Required fields are marked *