title: Google sitelink search box with Google custom search
body: <p>We want to implement Google sitelink search box with Google custom search. In the Google <a href="https://developers.google.com/structured-data/slsb-overview" rel="nofollow noreferrer">documentation</a>, I found that we need to include the below code to enable sitelink search box</p>
  
  <pre><code>    &lt;script type="application/ld+json"&gt;
  {
     "@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"
     }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>But we are stuck at "target" node in the above properties. Since we dont have any own search page, we want to use Google custom searh, so what value should I fill in this "target" node.</p>
  
  <p>We have already created a Google custom search engine for our site. And found below code there </p>
  
  <pre><code>&lt;script&gt;
    (function() {
      var cx = 'CX_ID';
      var gcse = document.createElement('script');
      gcse.type = 'text/javascript';
      gcse.async = true;
      gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
          '//www.google.com/cse/cse.js?cx=' + cx;
      var s = document.getElementsByTagName('script')[0];
      s.parentNode.insertBefore(gcse, s);
    })();
  &lt;/script&gt;
  &lt;gcse:search&gt;&lt;/gcse:search&gt;
  </code></pre>
  
  <p>We want to implement sitelink search box like <a href="http://mashable.com/" rel="nofollow noreferrer">Mashable</a>, <a href="http://www.imdb.com/" rel="nofollow noreferrer">Imdb</a></p>
  
  <p><img src="https://i.stack.imgur.com/8N5Ba.jpg" alt="enter image description here"></p>
  
  <p>Please suggest, how to point Google custom search in sitelink search box code.</p>
  
  <p>Thanks</p>