I want to use schema.org for describing the search engine in my website. I've seen this technique in these pages:
- https://developers.google.com/structured-data/slsb-overview#how_do_you_set_it_up
- https://schema.org/docs/actions.html
Here is the current code:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "http://example.com/",
"name": "Website-Name",
"potentialAction": {
"@type": "SearchAction",
"target": "http://example.com/?q={q}",
"query-input": "required name=q"
}
}
</script>
Although I understand this code, in fact my search engine includes another input (a select tag) that has (of course) a default value. I want to include that parameter in the JSON-LD code and specify the default value.
Is it possible? Or should I change the target to http://example.com/?q={q}¶m=defaultValue
?
UPDATE: This answer: https://stackoverflow.com/a/30061501/1726461 is not a duplicate of my answer, because it hasn't really solved: The whole answer is based on a mistake - the JSON-LD may have multiple equal properties, as can be seen at https://developers.google.com/structured-data/slsb-overview#how_do_you_set_it_up under site+app tab and in the source-code of https://www.pinterest.com (they use Microdata instead JSON-LD). Furthermore, it hasn't gotten many votes so it's not very useful.