2

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:

  1. 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.

  2. 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.

unor
  • 92,415
  • 26
  • 211
  • 360
azgooon
  • 304
  • 1
  • 4
  • 13
  • This is really interesting. Two thoughts come to mind... 1) Could be that Google is doing this specifically for YouTube. Do you have any examples from other "regular" sites? 2) You might be able to use the standard SearchAction code and set your target to Google (e.g. https://www.google.co.uk/search?q={search_term_string}%20site%3Amysite.com) Also - this might be a good question for the webmasters stack exchange who deal more with SEO – Stu Furlong Feb 16 '19 at 05:56
  • Sorry @StuFurlong for not comming back to you sooner. I got different task assigned and as It's almost completed I though I will do some research about the SearchActions. So interestingly I couldn't find more examples like YouTube across "regular" websites and moreover now I cannot see this feature for YouTube too whereas i.e eBay search works as it was before. This makes me think that this could have been bespoke feature developed just for YouTube. As it stand at the moment I may have to stick to the regular search action. Thanks a lot for getting involved - appreciated that. Regards – azgooon Mar 08 '19 at 09:49

0 Answers0