Recently I have been looking into incorporating structured data on the website so when looked up on Google a little search box will appear under the link.
I have however noticed that there are 2 different types of search box generated by structured data:
If we look at https://www.google.co.uk/search?q=ebay
The search bar appearing underneath allows for typing in phrase and after pressing save we are being redirected to ebay website containing search results for that phrase.
If we look at https://www.google.co.uk/search?q=youtube
The search bar in this case allows us to type in phrase and google will displays results from the youtube.com but embeded within google website.
I am actually looking to implement 2 method but anywhere I look I see examples to the 1st method. I am therefore looking for any links pointing me in the right direction or any advise.
Presumably apart from different code snippet than below one:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "https://www.example-petstore.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://query.example-petstore.com/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
My results would need to be structured in the correct way so when received by Google they can be displayed in Google styled way.