Get Particular SP List Items Using Content Search WebPart (CSWP) in SharePoint Online

What is Content Search Webpart?

  • This Webpart is introduced in SP 2013. It is powerful.
  • Display content on your SharePoint pages by configuring simple and advanced queries in a Content Search Web Part.
  • One of the best feature in SharePoint Online will return the data very quickly compared to content query Webpart.
  • Content Search allows you to query and display the information from any site collection and beyond.

Steps

Follow the listed steps given below to add CSWP in your SP page.

Step 1

Open your SharePoint site.

SharePoint

Step 2

Now, go to the page, where you need to add CSWP.

SharePoint
Step 3

Edit the page by clicking the page tab on the top ribbon bar.

SharePoint
Step 4

On the click on the Add a Web part, after you clicked, you can see many categories.

SharePoint
Step 5

Select Content Rollup section. We can see the Content Search Webpart on the right side.

SharePoint

Step 6

Click Add button to add CSWP on your page.

SharePoint

Step 7

Finally, content search Webpart will be added on your page and it will show the recent items from your site.
SharePoint
Step 8

Now, edit the page and edit the Web part properties to configure the search Query.

SharePoint

Step 9

On the Webpart properties pane, click Change Query button under search criteria. After you clicked, you will get the pop up.

SharePoint

Step 10

In the pop up screen, click Switch to Advanced Mode to configure the query, as shown below.

SharePoint

Step 11

Now, select a Query result source, Keyword Filter and Property Filter.

  • Result Source – Local SharePoint results.
  • Keyword Filters – Only returns the lists and the libraries.
  • Property Filter – ListID , Manual Value.

Note

ListID is list GUID (take list GUID from the list settings URL).

SharePoint

Step 12

After you provided all the details, click Add Property Filter button and Test the Query. Click OK button.

When you click Test Query button, you will get the relevant results on the right side, as shown below.

SharePoint

Step 13

Now, do the property mappings on the Web part properties Window and click OK button.

SharePoint

Finally Content Search Webpart will be added on your page with the particular list items.

SharePoint

Summary

In this article, we have explored how to get the list items, using content search Webpart in SharePoint Online. Happy searching.