<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Discovery APIs Archives - SearchStax Docs</title>
	<atom:link href="https://demo.searchstax.com/docs/searchstudio_categories/api-discovery/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Documentation</description>
	<lastBuildDate>Thu, 30 May 2024 05:14:04 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>

<image>
	<url>https://demo.searchstax.com/docs/wp-content/uploads/2023/10/cropped-favicon-32x32.png</url>
	<title>Discovery APIs Archives - SearchStax Docs</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Popular Searches API</title>
		<link>https://demo.searchstax.com/docs/searchstudio/searchstax-studio-popular-searches-api/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 01 Sep 2022 17:11:44 +0000</pubDate>
				<guid isPermaLink="false">https://demo.searchstax.com/docs/?post_type=searchstudio&#038;p=12521</guid>

					<description><![CDATA[<p>Popular Searches API SearchStax Site Search solution&#8217;s Popular Searches API retrieves the most Popular Searches recorded by the Search App during the previous 30 days. This page describes how to&#8230; <a class="more-link" href="https://demo.searchstax.com/docs/searchstudio/searchstax-studio-popular-searches-api/">Continue reading <span class="screen-reader-text">Popular Searches API</span></a></p>
<p>The post <a href="https://demo.searchstax.com/docs/searchstudio/searchstax-studio-popular-searches-api/">Popular Searches API</a> appeared first on <a href="https://demo.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading">Popular Searches API</h1>



<hr class="wp-block-separator has-css-opacity"/>



<p>SearchStax Site Search solution&#8217;s <strong>Popular Searches API</strong> retrieves the most Popular Searches recorded by the Search App during the previous 30 days.</p>



<p></p>



<p>This page describes how to retrieve a Json document of popular-search strings for display on your search page.</p>



<p>The API can be accessed through any tool that assembles HTTP requests and dispatch them to a server. Among these would be the Python <a href="https://pypi.org/project/coreapi/">coreapi</a> package, the <a href="https://www.postman.com/">Postman</a> tool, and cURL. For Windows, use <a href="https://docs.microsoft.com/en-us/powershell/scripting/whats-new/differences-from-windows-powershell?view=powershell-7">PowerShell 7</a>.</p>



<p>Symbols enclosed in carets (&lt; and &gt;) such as&nbsp;<strong>&lt;username&gt;</strong>&nbsp;are metavariables. Substitute your local values when you encounter them in the examples.</p>



<h2 class="wp-block-heading" id="ipfiltering">Popular Search</h2>



<p>This method returns a list of Popular Searches from a Search App. The pool of searches covers the most recent 30 days of search history.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; auto-links: false; title: ; quick-code: false; notranslate">
GET &amp;lt;popular-searches-URL&gt;?language=&amp;lt;code&gt;&amp;amp;page=&amp;lt;n&gt;&amp;amp;num_results=&amp;lt;n&gt;
</pre></div>


<p>where&nbsp;<strong>&lt;popular-searches-URL&gt;</strong>&nbsp;is an endpoint from the <a href="/docs/searchstudio/searchstax-studio-discovery-api-tab/">Discovery API Tab</a> of the <strong>App Settings</strong> screen. Language is an optional two-letter <a href="/docs/searchstudio/searchstax-studio-multi-language-experiences/">language code</a>. <strong>Page</strong> is an optional page within the paginated result set. <strong>Num_results</strong> is an optional limit on the number of searches desired (1 through 20).  </p>



<p>This method uses <strong>Discovery API Key</strong>&nbsp;authorization. The Discovery API key is displayed on the <a href="/docs/searchstudio/searchstax-studio-discovery-api-tab/">Discovery API Tab</a>. It must be passed in the header of the request. </p>



<p>When invoked from Linux (Bash shell):</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; auto-links: false; title: ; quick-code: false; notranslate">
curl &#039;https://app.searchstax.com/api/v1/nn/popular-search/?language=en&amp;num_results=10&#039; -H &#039;Authorization: f17e2131927b055383669327b1dc95338a7bdd7d&#039; 

</pre></div>


<p>The response is a JSON document containing a list of popular searches.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: jscript; auto-links: false; title: ; quick-code: false; notranslate">
{
  &quot;responseHeader&quot;: {
    &quot;zkConnected&quot;: true,
    &quot;status&quot;: 0,
    &quot;QTime&quot;: 1
  },
  &quot;response&quot;: {
    &quot;numFound&quot;: 4,
    &quot;start&quot;: 0,
    &quot;numFoundExact&quot;: true,
    &quot;docs&quot;: &#x5B;
      {
        &quot;query&quot;: &quot;drupal integration&quot;,
        &quot;count&quot;: 12
      },
      {
        &quot;query&quot;: &quot;solr&quot;,
        &quot;count&quot;: 3
      },
      {
        &quot;query&quot;: &quot;sitecore&quot;,
        &quot;count&quot;: 2
      },
      {
        &quot;query&quot;: &quot;test&quot;,
        &quot;count&quot;: 2
      }
    ]
  }
}

</pre></div>


<p>The fields of each popular search have the following meanings:</p>



<ul class="wp-block-list">
<li><strong>query:</strong> The text of a popular search. </li>



<li><strong>count:</strong> How many time the Search App has encountered this search.  </li>
</ul>



<p>The other fields are Solr internal values. </p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading" id="questions">Questions?</h2>



<p>Do not hesitate to contact the <a href="mailto:support@demo.searchstax.com?subject=Studio%3A%20Popular%20Searches%20API" target="_blank" rel="noreferrer noopener">SearchStax Support Desk</a>.</p>
</div></div>
<p>The post <a href="https://demo.searchstax.com/docs/searchstudio/searchstax-studio-popular-searches-api/">Popular Searches API</a> appeared first on <a href="https://demo.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Related Searches API</title>
		<link>https://demo.searchstax.com/docs/searchstudio/related-searches-api/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 21 Dec 2021 20:32:14 +0000</pubDate>
				<guid isPermaLink="false">https://demo.searchstax.com/docs/?post_type=searchstudio&#038;p=10430</guid>

					<description><![CDATA[<p>Related Searches API The SearchStax Site Search solution provides an API that retrieves the Related Searches defined for a specific search phrase in the Search App. Related Searches allows users&#8230; <a class="more-link" href="https://demo.searchstax.com/docs/searchstudio/related-searches-api/">Continue reading <span class="screen-reader-text">Related Searches API</span></a></p>
<p>The post <a href="https://demo.searchstax.com/docs/searchstudio/related-searches-api/">Related Searches API</a> appeared first on <a href="https://demo.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading">Related Searches API</h1>



<hr class="wp-block-separator has-css-opacity"/>



<p>The SearchStax Site Search solution provides an API that retrieves the <a href="/docs/searchstudio/searchstax-studio-related-searches/">Related Searches</a> defined for a specific search phrase in the Search App.</p>



<p>Related Searches allows users to manually define Search terms that are related, and augments them from search terms learned using Artificial Intelligence using Analytics data. For the AI augmented related searches, Analytics should be connected with your Search page and there should be enough searches with clicks available.</p>



<p>This page describes how to retrieve a Json document of related-search strings for display on your search page.</p>



<p>The API can be accessed through any tool that assembles HTTP requests and dispatch them to a server. Among these would be the Python <a href="https://pypi.org/project/coreapi/">coreapi</a> package, the <a href="https://www.postman.com/">Postman</a> tool, and cURL. For Windows, use <a href="https://docs.microsoft.com/en-us/powershell/scripting/whats-new/differences-from-windows-powershell?view=powershell-7">PowerShell 7</a>.</p>



<p>Symbols enclosed in carets (&lt; and &gt;) such as&nbsp;<strong>&lt;username&gt;</strong>&nbsp;are metavariables. Substitute your local values when you encounter them in the examples.</p>



<h2 class="wp-block-heading" id="ipfiltering">Related Search</h2>



<p>This method returns a list of Related Searches from a Search App.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; auto-links: false; title: ; quick-code: false; notranslate">
GET &amp;lt;related-searches-URL&gt;?search=&amp;lt;search-phrase&gt;
</pre></div>


<p>where&nbsp;<strong>&lt;related-searches-URL&gt;</strong>&nbsp;is an endpoint from the <a href="/docs/searchstudio/searchstax-studio-discovery-api-tab/">Discovery API Tab</a> of the App Settings screen, and&nbsp;<strong>&lt;search-phrase&gt;</strong>&nbsp;is the base query that has related searches defined on the <a href="https://demo.searchstax.com/docs/searchstudio/searchstudio-related-searches/">Related Searches</a> screen. </p>



<p>This method uses <strong>SearchAPIKey</strong>&nbsp;authorization. The Search API key is displayed on the <a href="https://demo.searchstax.com/docs/searchstudio/related-searches-api/">Discovery API Tab</a>. It must be passed in the header of the request. </p>



<p>When invoked from Linux (Bash script):</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; auto-links: false; title: ; quick-code: false; notranslate">
URL=&quot;https://app.searchstax.com/api/v1/nn/related-search/&quot;
APIKEY=&quot;456cwe54sasb8e5lu5y6k48j55u95338slas&quot;
KEYWORD=&quot;sitecore&quot;

SEARCHES=$(curl -H &quot;Authorization: $APIKEY&quot; &quot;$URL?search=$KEYWORD&quot;) 

</pre></div>


<p>When invoked from Windows Powershell:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: powershell; auto-links: false; title: ; quick-code: false; notranslate">
# Removes TLS obstacles from connection. Otherwise connections fail. 
&#x5B;Net.ServicePointManager]::SecurityProtocol = &#x5B;Net.SecurityProtocolType]::Tls -bor &#x5B;Net.SecurityProtocolType]::Tls11 -bor &#x5B;Net.SecurityProtocolType]::Tls12

$URL = &quot;https://app.searchstax.com/api/v1/nn/related-search/&quot;
$APIKEY = &quot;81c09977fedb7e89310c87df81d7bc787301155e&quot;
$KEYWORD = &quot;Sitecore&quot;

# Set up HTTP header for authorization token
$headers = New-Object &quot;System.Collections.Generic.Dictionary&#x5B;&#x5B;String],&#x5B;String]]&quot;
$headers.Add(&quot;Authorization&quot;, $APIKEY)

$RESPONSE = Invoke-RestMethod -Method Get -ContentType &#039;application/json&#039; -Headers $headers `
              -uri $($URL+&quot;?search=$KEYWORD&quot;) 
$RESPONSE = $RESPONSE | ConvertTo-Json -Depth 3

Write-Host $RESPONSE
</pre></div>


<p>The response is a JSON document containing a list of related searches.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: jscript; auto-links: false; title: ; quick-code: false; notranslate">
{
  &quot;responseHeader&quot;: {
    &quot;zkConnected&quot;: true,
    &quot;status&quot;: 0,
    &quot;QTime&quot;: 0
  },
  &quot;response&quot;: {
    &quot;numFound&quot;: 5,
    &quot;start&quot;: 0,
    &quot;numFoundExact&quot;: true,
    &quot;docs&quot;: &#x5B;
      {
        &quot;search_term&quot;: &quot;sitecore&quot;,
        &quot;related_search&quot;: &quot;sitecore 10&quot;,
        &quot;related_score&quot;: 1
      },
      {
        &quot;search_term&quot;: &quot;sitecore&quot;,
        &quot;related_search&quot;: &quot;sitecore plugin&quot;,
        &quot;related_score&quot;: 1
      },
      {
        &quot;search_term&quot;: &quot;sitecore&quot;,
        &quot;related_search&quot;: &quot;sitecore replace azure&quot;,
        &quot;related_score&quot;: 1
      },
      {
        &quot;search_term&quot;: &quot;sitecore&quot;,
        &quot;related_search&quot;: &quot;site search for sitecore&quot;,
        &quot;related_score&quot;: 1
      },
      {
        &quot;search_term&quot;: &quot;sitecore&quot;,
        &quot;related_search&quot;: &quot;managed solr for sitecore&quot;,
        &quot;related_score&quot;: 1
      }
    ]
  }
}
</pre></div>


<p>The fields of each related search have the following meanings:</p>



<ul class="wp-block-list">
<li><strong>search_term:</strong> This is the search string that keys to the Related Searches. </li>



<li><strong>related_search:</strong> Each entry contains the string of a single Related Search. </li>



<li><strong>related_score:</strong> A measure of similarity to the search_term. The range of values is 0 to 1. Higher values are more similar. </li>
</ul>



<p></p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading" id="questions">Questions?</h2>



<p>Do not hesitate to contact the <a href="mailto:support@demo.searchstax.com?subject=Studio%3A%20Related%20Searches%20API" target="_blank" rel="noreferrer noopener">SearchStax Support Desk</a>.</p>
</div></div>
<p>The post <a href="https://demo.searchstax.com/docs/searchstudio/related-searches-api/">Related Searches API</a> appeared first on <a href="https://demo.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
