core + auto (Auto Extension): terms relating to automobiles.

SearchAction

Canonical URL: http://schema.org/SearchAction

No comment

Usage: Over 1,000,000 domains


Examples

Example 1
John searched for 'What is the answer to life the universe and everything?'.
This example is JSON only.
This example is JSON only.
<script type="application/ld+json">
  // John searched for 'What is the answer to life the universe and everything?'.
{
  "@context": "http://schema.org",
  "@type": "SearchAction",
  "agent": {
    "@type": "Person",
    "name": "John"
  },
  "query": "What is the answer to life the universe and everything?"
}
</script>
Example 2
John searched for hotels.
This example is JSON only.
This example is JSON only.
<script type="application/ld+json">
  // John searched for hotels.
{
  "@context": "http://schema.org",
  "@type": "SearchAction",
  "agent": {
    "@type": "Person",
    "name": "John"
  },
  "query": {
    "@type": "Class",
    "name": "http://schema.org/Hotel"
  }
}
</script>
Example 3
<p>(A WebSite describing its search options)</p>
<div itemscope itemtype="http://schema.org/WebSite">
    <link itemprop="url" href="http://www.example.com/"/>
    <form itemprop="potentialAction" itemscope itemtype="http://schema.org/SearchAction">
	  <meta itemprop="target" content="http://example.com/search?q={query}"/>
      <input itemprop="query-input" type="text" name="query"/>
      <input type="submit"/>
    </form>
</div>
<div vocab="http://schema.org/" typeof="WebSite">
    <meta property="url" href="http://www.example.com/"/>
    <form property="potentialAction" typeof="http://schema.org/SearchAction">
      <meta property="target" content="http://www.example.com/search?q={query}"/>
      <input property="query-input" type="text" name="query">
      <input type="submit">
    </form>
</div>
<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "WebSite",
    "url": "http://example.com/",
    "potentialAction": {
      "@type": "SearchAction",
      "target": "http://example.com/search?&q={query}",
      "query-input": "required"
    }
}
</script>

Schema Version 3.2