How to apply Rest API query filter in SharePoint 2013

This SharePoint Rest API tutorial, you will learn how to apply REST Query Filter to Field with the SharePoint 2013 REST API.

SharePoint development using JavaScript for any time I require unique customization not possible using out of the box. One of the technical challenges you may come across in your travels is trying to perform a GET of list items and filtering where a column value. It seems pretty straightforward right?

In old days working with SharePoint lists or library, many times we came across querying lists and applying filter on list items using CAML Query. We all know constructing long CAML query gets confusing and many lines of chunks as well.

But no worries REST is the life saver; with REST it’s very easy to filter lists and gives to flexibility using few lines or sometimes just one line of code.

In this post, I will be showing how you can use REST to filter or query on SharePoint lists and returns data as you want.

You’ll first start to craft your URI like the following:

https://<siteUrl>/_api/Web/Lists/GetByTitle(‘listname’)/items?$select*&$filter= Title eq ‘test’
  • $Select: Lets you select list columns you want to return
  • $filter: Condition based results.

Refer to the following images and code for clear understanding.

sharepoint 2013 rest api filter

Rest API Query Filter in SharePoint

1st Approach:

Open the browser and add the following URL in the address bar:

https://hostssite/apps/TestAppsite/_api/Web/Lists/GetByTitle(‘Divisions’)/items?$select=*&$filter=Title eq ‘test1’
sharepoint 2013 rest api filter

2nd Approach: using jquery

Step 1: Navigate to your SharePoint 2013 site.

Step 2: From this page select the Site Actions | Edit Page.

Edit the page, go to the “Insert” tab in the Ribbon and click the “Web Part” option. In the “Web Parts”dialogue, go to the “Media and Content” category, select the “Script Editor” Web Part and click the “Add button”.

Step 3: Once the Web Part is inserted into the page, you will see an “EDIT SNIPPET” link; click it. You can insert the HTML and/or JavaScript as in the following code snippet:

function Divsion ()
var listName = "Divisions";
var itemId="";
var Ownurl = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle(‘ Divisions’)/items?$select=OwnerEmailID&$filter=Title eq ‘test1′";
url: Ownurl,
headers: { Accept: "application/json;odata=verbose" },
success: function (data) {
var items = data.d.results;
if (items[0].OwnerEmailID != "") {
itemId = items[0].OwnerEmailID;

},eror: function (data) {
alert("An error occurred. Please try again.");

You may like following SharePoint Rest API tutorials:

Here, we checked how to apply the Rest API query filter in SharePoint 2013/2016 or SharePoint Online.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

Sagar Pardeshi

I am Developer working on Microsoft Technologies for the past 6+years. I am very much passionate about programming and my core skills are SharePoint, ASP.NET & C#,Jquery,Javascript,REST. I am running this blog to share my experience & learning with the community I am an MCP, MCTS .NET & Sharepoint 2010, MCPD Sharepoint 2010, and MCSD HTML 5,Sharepoint 2013 Core Solutions. I am currently working on Sharepoint 2010, MOSS 2007, Sharepoint 2013,Sharepoint 2013 App Dev, C#, ASP.NET, and SQL Server 2008.