What is Content Search Webpart?

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.

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.