SharePoint 2013: Using the search REST service from an app for SharePoint

A new code sample has been released on MSDN that demonstrates how to return search results in an app for SharePoint.

“The SearchApp sample accepts a query using the keyword query language (KQL) syntax as an input. It subsequently makes a call to the search engine using the search Representational State Transfer (REST) service. The results are then displayed in a table, which is built dynamically using JQuery and JavaScript.”

The screen shot below shows search results displayed on the home page of the sample:

Figure 1. Home.aspx page in the app, displaying the search results

SharePoint 2013 Search Sample

Go get it here and even more SharePoint 2013 sample code here.