Sitelinks search box can be obtained by adding the following JSON LD code to your website.

<script type="application/ld+json">{   
  "@context": "",   
  "@type": "WebSite",   
  "url": "",   
  "potentialAction": {     
    "@type": "SearchAction",     
    "target": "{search_term_string}",
    "query-input": "required name=search_term_string"   

In the above script replace with your website URL. Replace “q” with your website’s search query parameter. For wordpress sites, replace “q” with “s”.

By Muthali Ganesh

I am an engineer wih a masters in business administration from Chennai, India. I love discovering and sharing hacks.