Shared publicly  - 
 
Two things you need to check if you've implemented the schema.org/SearchAction markup

We're noticing an enthusiastic uptick in the markup implementation after the initial announcement last week! Here are the two main issues we've observed so far, and what you need to do to fix them:

1. Please make sure that, if you replace the curly braces and all that's inside of it with a search term, it'll lead to a valid URL on your site. For instance, if your "target" value is "http://www.example.com/search?q={searchTerm}", please make sure that "http://www.example.com/search?q=foo" and "http://www.example.com/search?q=bar" both lead to search result pages about "foo" and "bar".

2) The "query-input" field must point to the string that's inside the curly braces in the "target" field. For example, if your "target" value is "http://www.example.com/search?q={searchTerm}", you must use "searchTerm" as the "name" within "query-input". 

If you've got more questions, post here in the comments or at the webmaster forum: 
https://productforums.google.com/forum/#!forum/webmasters
32
26
REALSMO's profile photoberto bertolacci's profile photoIsmail Mohamed Sidiya's profile photoAndrea Monti's profile photo
41 comments
 
Thank you for these details, I had an error with the second item. It's fixed since this morning.
Assuming that the markup is ok on my website (http://www.webrankinfo.com/) and that this search form is displayed on Google's SERP, how long should I wait until Google uses my internal search engine (and not a site: command)?
 
+Olivier Duffez glad you were able to detect that and get it fixed.
We'll need to recrawl and reprocess the updated page in order to see that the markup has changed. Afterwards, it should send users to your own site's search results. 
 
Thanks for the clarification, but I have a doubt.
In the query input field
"query-input":"required name=query"
is not clear what "required name" stands for. Is the name attribute of the html input field?
The "required" is the HTML5 attribute of the input field?

Or they are only a fixed thing to write?

According to the microdata example it looks like it is the attribute name, but it's not so clear.

Then another question.
According to the specifications we need block search results page in the robots.txt (and this is fine cause SE should always be blocked), but there are some exceptions.

Example:
for a weather website where the search box bring the user to the location he searched?
What to do in that case?
Obviously you can't block those pages via robots.txt cause they are not real search results pages.
 
Hi +Andrea Pernici
On question (1): 
This is standard schema.org syntax for potentialAction, you can find more details here: http://schema.org/docs/actions.html (I'd recommend to specifically take a look at "Part 3: Action EntryPoints" and "Textual representations of Input and Output") 

On question (2):
We recommend disallowing only for search results pages which bring no value to the user. If after a search on your site the user lands on the weather location page, there's no need to robot that out. If you have "not found" pages, e.g. www.example.com/search/kdljflekjdfkd, it's a good idea to robot out such patterns.   

Hope this helps! Let me know if you need more information. 
 
I've implemented it here giorgiotave.it and it works. I interpreted the implementation thank to the microdata example that is more clear than the json-ld one.
 
Hi Luiz. It doesn't look fine. You should put the query input value in the place of "onboarding". Check also the name of your search input field in the HTML code.
 
Hey +Joost de Valk! Somehow your interesting questions got squeezed in among the other g+ notifications... Here we go:

1. Validation tool: we're working on it! Stay tuned (: In the meantime, you can use the JSON-LD playground to verify the markup:
http://json-ld.org/playground/index.html

2. emerce.nl markup:
Currently it's taking me to the site, not a [site:emerce.nl word] query, however all searches seem to go to the homepage. I tried e.g.  
http://www.emerce.nl/?s=marketing
http://www.emerce.nl/?s=asdfasdf
with the same result. Perhaps there's an alternate search result pattern than "http://www.emerce.nl/?s={search_term}" ?

3. Which code sample to look at: 
The code on the developer site is a better reference. We're working on making them both the same. 

4. SEO plugin implementation: great news! 
Generally, it should work fine as long as the search pattern is correct. Is the search pattern for all these sites: "http://www.example.com/?s={search_term}"?
 
Hope this helps!
 
Hi Mariya, firstly many thanks for helping us all out with our queries - it's great to get help directly from the Google team.

My first question is regarding international sites with each country in a subdirectory under one top level domain, eg. www.example.com/gb/ or /fr/. Will this feature work for this setup?

In this instance do we just add the schema to each country's homepage amending the search URL as appropriate?

Separately, I have seen this feature appearing to work automatically for some big brands that haven't implemented the schema. Is Google able to detect the search URL pattern for some sites and automatically provide this functionality?

Many thanks,

Andy
 
+Andrew Limn​ thanks for the questions! Multiple search patterns on one site are not supported right now, but feedback like this helps us prioritise what improvements to make to the feature.
Do you have an example of a site with such a setup and a search box? We'd be interested in taking a look at that.
 
Hi +Mariya Moeva www.technogym.com would be a good example of a site with this setup. The search box has been showing intermittently in the SERPs for the UK and US sites.

You'll notice the search pattern for each language on this site contains the country directory eg. /us/ and the URL is translated for each country.

Thanks :)
 
Hi +Mariya Moeva, thanks for the great tips and advice.  But following up on Andrew Limn's question, I have a question for you or perhaps +Pierre Far could help us out with this one, too.  For a website that contains a unique homepage for each particular language or region, such as www.example.com/us/ and www.example.com/fr/:

1. Would the URL and target URL used in the markup simply be www.example.com or would it need to be individualized for each unique homepage, such as www.example.com/fr/?

2. And on which pages would the search box markup need to be inserted on?  On all unique homepages, or just one?

Thanks again to you both for your help and advice.

David
 
I see.  Ok, thanks Mariya.  I appreciate your response and the clarification. 
 
Hi Mariya, would you mind giving some feedback on the markup that we've implemented. as we don't seem to be seeing the search box in Google Search as of yet: http://www.scottsofstow.co.uk/ 

<script type="application/ld+json">
{
  "@context":"http://schema.org",
  "@type":"WebSite",
  "url": "http://www.scottsofstow.co.uk",
  "potentialAction": {
    "@type":"SearchAction",
    "target":"http://www.scottsofstow.co.uk/webapp/wcs/stores/servlet/SearchDisplay?storeId=10551&catalogId=22051&sType=SimpleSearch&searchTerm={search_term_string}&source=sitesearch",
    "query-input":"required name=search_term_string"
  }
}
</script>

any comments appreciated.
Thanks,

Rob.
 
I think you are not eligible for the sitelink search box up to now so you have to wait for it. If I'm not wrong the action code is useful only when you have the Sitelink Search Box to alter the normal behaviour and not to make the box appears.
 
Ah, thanks. How do you know if/when you're eligible?
 
Search for your domain name. If the box appear you are eligible.
 
Hey +Robert Stalham! We'll need to recrawl and reprocess the page where you added the markup first. So if  you've added it recently, that might be the cause. 
And then, as +Andrea Pernici mentioned, the triggering is algorithmic, so it might or might not show up after the page is reprocessed, depending on how the algorithms have evaluated the site. 
Thanks +Andrea Pernici for your help here! 
 
Ok, thanks both for your feedback. So in terms of the code itself, all looks ok?
 
+Mariya Moeva can you please take a look at the following markup/site?  We've had it on the site for a few weeks now and haven't seen it show up yet in the sitelinks.  

{
  "@context":"http://schema.org",
  "@type":"WebSite",
  "url": "https://www.rentseeker.ca/",
  "potentialAction": {
    "@type":"SearchAction",
    "target": "https://www.rentseeker.ca/?txtSearch={search_term_string}",
    "query-input": "required name=search_term_string"
  }
}

I'm concerned about what happens after going to the URL, for example:
https://www.rentseeker.ca/?txtSearch=Toronto 
will accept and redirect the users to www.rentseeker.ca/PropertyList.aspx and show the correct results.

Is our problem with https (we can switch to http), or is it with the fact that our resulting URL redirects to another page, even though the correct results are showing.  Or maybe it's something altogether different?
It seems the home page is recrawled regularly.
 
Hi +Jacob Gryn​, and happy new year! The markup looks syntactically correct, I'll check regarding the redirects and let you know. It might take until next week though, since most folks are still on holidays. In either case I'll post an update here.
 
I also noticed +Mariya Moeva that the meta  <meta name="google" content="nositelinksearchbox"> is not working.
 
Thanks +Mariya Moeva.

I'm going to meanwhile try removing the s in https, the site is indexed as straight http, so let me try and eliminate that possibility.

How long should it take for the sitelink to show up once it's recrawled? Assuming I can see a cached version of the page on google containing the correct meta data and everything is setup propertly, is it instantaneous, or is there a waiting period.
 
Hi +Jacob Gryn! Confirming that the markup is implemented correctly and the page has been processed on our end; now it's a matter of our algorithms determining when it's relevant to show the sitelinks search box. 

+Andrea Pernici it seems like you need an extra "s" — 'nositelinksearchbox' should read 'nositelinkssearchbox' (-:
 
Fixed the issue Mariya, but after 9 days the box is still there.
 
+Mariya Moeva Great news, however, it's still not showing up.  Are there particular conditions when it may appear?  Does it take a minimum amount of time from once its processed?
 
Hi +Jacob Gryn you are in this case as I explained before:

I think you are not eligible for the sitelink search box up to now so you have to wait for it. If I'm not wrong the action code is useful only when you have the Sitelink Search Box to alter the normal behaviour and not to make the box appears.
 
Hi +Mariya Moeva! We have had the JSON+LD markup since it was first announced and cannot seem to get the site links search box after all of this time. Any advice or suggestions please? Thanks!

        <script type="application/ld+json">
        {
            "@context":"http://schema.org",
            "@type":"WebSite",
            "url": "http://www.displays2go.com/",
            "potentialAction": {
                "@type":"SearchAction",
                "target": "https://www.displays2go.com/Search?q={search_term_string}",
                "query-input": "required name=search_term_string"
            }
        }
        </script>
 
The sitelink search box association is Algo based so you can't do anything simply adding the JSON code +Zachary Zullick 
 
Hi Mariya,

The example on the following url https://developers.google.com/structured-data/slsb-overview has two tabs JSON-LD and Microdata. However there is no change when I click on either of these.

I am assuming that JSON-LD = script tag and Microdata = metadata tags, or do I need to include both on my page for search site box to be active?

Secondly, does the search site box support https (secure) sites?

Also, is the auto complete list being displayed, generated automatically by google?

Thank you for your time.
 
+Abhishek Gairola You only need one of the implementations, whether it is JSON+LD or Microdata. Your assumption is correct, the <script> tag is the JSON+LD implementation and the HTML markup with rich snippets is the Microdata. It seems their javascript code on the Google documentation page is broken and it is supposed to switch between them when you click on it, but instead it is just showing both. It does support https protocol and the autocomplete can be fed from your own website if your website provides it, otherwise it falls back to Google. I'd also recommend implementing an OpenSearch (http://www.opensearch.org/Home) specification xml file on your site as well, as many browsers including Chrome's omnibox will utilize that for a site search.
 
Hi +Zachary Zullick
Thank you for your reply. I realize that displays2go site has also implemented this code. Do you see the search site box on this site? Does google sends an email to web master for approval before adding search box, or it is an automatic process? I also don't see a fixed time provided before the box will be active on the site (once the json codes have been added on the homepage). I guess we have to keep our fingers crossed and wait for it to appear.
 
+Abhishek Gairola We haven't seen it thus far for our site. There is no email AFAIK; it will just happen. It isn't 100% based on the code implementation, that just assists Google in understanding how your site search works. They still have algorithmic signals that determine if the box should show or not. I most often see it on other companies when the search is branded, so I'm assuming that is one of the strongest signals that indicate to show the box for a particular query. If you don't implement the code, it is still possible to acquire the box but likely it will use a Google search with a site: modifier instead of your internal site search. Good luck!
Add a comment...