Syntax
REST API endpoint to use in Add-ins: <appweburl>/_api/SP.AppContextSite(@target)/web?$select= NoCrawl&@target=<hostweburl>
Embed Code Snippet
The following code snippet can be embeded in SharePoint page or in content editor web part as a script. This example is used to check whether the search is enabled for the SharePoint website.
Add-in Code Snippet The following code snippet is used in SharePoint Add-in to get the boolean property of NoCrawl for the SharePoint website.