How to Customize SharePoint Search Results for a Specific List
Question details
The user needs to create a SharePoint page that searches and exclusively displays results from one particular SharePoint list.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Configuring a SharePoint site page to filter and restrict search results to a single target list rather than searching the entire site.
- Observed behavior
- The goal is to set up a targeted search page with custom queries and filters instead of relying on the default site-wide SharePoint search box.
Ensure you have Site Owner or Site Collection Administrator permissions to add custom web parts to your SharePoint site. You will also need access to your tenant's SharePoint App Catalog to deploy the necessary solution packages.
Use PnP Modern Search Web Parts
Deploying the open-source PnP Modern Search Web Parts allows for deep customization of search queries, enabling you to target a specific list ID or URL path.
The default SharePoint search box searches the entire site or hub. To restrict search results to a single list and display them on a custom page, the community-driven PnP Modern Search Web Parts provide the flexibility to define exact search query parameters and filters.
Go to the official GitHub repository for PnP Modern Search (microsoft-search.github.io/pnp-modern-search) and download the latest .sppkg release file.
Navigate to your SharePoint Admin Center, open the 'More features' page, and select 'Apps'. Upload the .sppkg file to the tenant App Catalog to make it available across your SharePoint sites.
Navigate to the SharePoint page you want to customize and click 'Edit'. Click the '+' icon to add a new web part, search for 'PnP', and add both the 'PnP - Search Box' and 'PnP - Search Results' web parts to the page.
Select the 'PnP - Search Results' web part and click the 'Edit web part' pencil icon. In the configuration panel, modify the Query template to include your specific list path. For example: {searchTerms} Path:"https://yourtenant.sharepoint.com/sites/yoursite/Lists/YourList".
In the Search Results configuration pane, go to the third page of settings and turn on 'Use input query text'. Select the PnP Search Box you added earlier as the data source so that user inputs filter the list results.
Once configured, click 'Republish' on the top right of the SharePoint page. Run a test search to confirm it only returns items from your designated list.

Edit and Manage Documents Seamlessly with WPS Office
While SharePoint is excellent for managing lists and sites, working with actual documents requires a reliable office suite. WPS Office is a lightweight, fully-featured alternative to Microsoft Office that lets you view, edit, and collaborate on Word, Excel, and PowerPoint files natively. It offers high compatibility with Microsoft formats and a highly user-friendly interface.
- 1. Download and Install WPS Office: Get the free installer from the official WPS website and complete the quick installation process on your PC or Mac.
- 2. Download your SharePoint documents: Locate the target document within your SharePoint list or library, select it, and click 'Download'.
- 3. Edit with full compatibility: Open the downloaded file in WPS Office. Edit your content using standard formatting tools and save it directly in its original Microsoft format before uploading it back to SharePoint.

Frequently Asked Questions
Can I restrict out-of-the-box SharePoint search results to one list without using custom web parts?
It is very limited. You can use the standard Highlighted Content web part to filter items by a specific list based on properties, but it lacks an interactive search box for users. For a true search-box experience targeting a single list, using PnP Modern Search Web Parts is the recommended approach.
What is the best query format to target a specific SharePoint list?
In your search query template, you should use the Path or ListId property restrictions. Appending `ListId:<Your-List-GUID>` or `Path:"https://tenant.sharepoint.com/sites/site/Lists/ListName"` will successfully restrict the scope of the search results to that exact list.
Are PnP Modern Search Web Parts officially supported by Microsoft?
PnP (Patterns and Practices) is an open-source initiative driven by Microsoft employees and the community. While widely used and highly reliable in enterprise environments, it is community-supported and questions or issues should be directed to the SharePoint Development forums or GitHub repository.
How do I find the List ID (GUID) for my SharePoint list?
Navigate to your SharePoint list, click the gear icon in the top right, and select 'List settings'. Check the URL in your web browser; the List ID is the alphanumeric string following `List=%7B` and ending before `%7D`.




