Smarter ideas worth writing about.

SharePoint Online - Searching the Internet

Recently, I had a client request to be able to search their public website from a page in SharePoint Online (SPO) web site. Knowing that there was an InternetSearchResults result source available by default in SPO, I knew that this should be easy to accomplish. But after working with SharePoint for over 10 years, I should have remembered that just because something can be done in SharePoint it may take more effort than expected to implement. The InternetSearchResults result source uses the OpenSearch 1.0/1.1 protocol and it turned out that there is virtually no documentation provided by Microsoft regarding the use of this protocol.

Paul Stork SharePoint Server MVP at Microsoft, provided me some clues in his response to a post on the Microsoft TechNet forum where a similar question was asked, but this did not provide me the full answer to my problem. 

In the SP Admin Center, the Search page contains a link to Manage Result Sources. On this page, the InternetSearchResults source contains the following query:

http://search.live.com/results.aspx?q={searchTerms}&count={itemsPerPage}&first={startItem}&mkt={language}&format=rss&FORM=SHAREF

Since this syntax calls search.live.com it is obviously quite old (Bing replaced Live around 2009).  Even though it still functions, I decided that I would rather use bing.com. I did some research and found that:

  1. the acceptable parameters for an OpenSearch query are shown at OpenSearch parameters.
  2. the advanced search keywords for Bing at Bing Parameters

I thought that I would be able to simply add the parameter “site” to the end of the search query and set it to my client’s public web site domain as follows.

https://bing.com/search?q={searchTerms}&count={itemsPerPage}&first={startItem}&mkt={language}&format=rss&FORM=SHAREF&site:client.com

However, this did NOT work.

I did some testing and thinking and realized that since the “site” parameter is the most limiting value of the query that it would need to be at the beginning of the statement. Some other articles state that the “site” parameter can follow the Search Terms, but my tests did not confirm that syntax.

I found that a specific internet site could be searched in SPO (as well as other SP versions) by using the following syntax.

http://bing.com/search?q=site:client.com&{searchTerms}&count={itemsPerPage}&first={startItem}&mkt={language}&format=rss&FORM=SHAREF

So, if you're looking to search the internet from your SharePoint Online site, this would be the simplest approach.

Share:

About The Author

Business Productivity Consultant
As a Principal Consultant in the Business Productivity practice in Charlotte NC, Dean is responsible for working with clients to plan and implement Office 365 and SharePoint systems. In addition to these responsibilities, he is currently leading the effort in this office to provide consulting services for Microsoft’s Enterprise Mobility Suite.

Recent Posts