You need the ‘SearchAction’ parameter only if you page supports a site search function.
As per Google " Sitelinks search queries send the user to the search results page for your site or app, so you need a functioning search engine to power this feature. "
In theory you need to have a wixLocation.query function running on your page’s onReady function which will grab the search term from the URL and run a filter/search according to it.
For example Pinterest’s Structured Data is this:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "https://www.pinterest.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://www.pinterest.com/search/pins/?q={searchbox_target}&referrer=sitelinks_searchbox", //note this line
"query-input": "required name=searchbox_target"
}
}
</script>
If you see above you will notice that Pinterest’s search results page is https://www.pinterest.com/search/pins and they have a search engine on their page which takes the parameter after ?q= and shows the relevant pins
This means if you go to this URL https://www.pinterest.com/search/pins/?q=cats you will see a lot of cat images.
If you do have a search engine on your page then leave it as it is and have the page pull out the query parameter (q) else remove that part from your markup