Edit in JSFiddle

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "WebSite",
  "url": "https://www.ejemplo.com/",
  "potentialAction": {
    "@type": "SearchAction",
    "target": "https://query.ejemplo.com/search?q={search_term_string}",
    "query-input": "required name=search_term_string"
  }
}
</script>