Loading...
Loading...
JSON-LD output
Enter your homepage URL and search URL pattern to generate WebSite SearchAction JSON-LD.
Provide your homepage URL, which anchors the WebSite entity in the markup.
Paste your internal search URL using the {search_term_string} placeholder where the query goes.
Add the generated WebSite SearchAction markup to your homepage head section.
The sitelinks searchbox is a search field Google can display directly under your site's main result for brand and navigational queries. It lets users search your site straight from Google. WebSite schema with a SearchAction potentialAction tells Google your internal search URL pattern so it can power that box.
Run a search on your own site and look at the resulting URL. If searching for shoes produces example.com/search?q=shoes, your pattern is https://example.com/search?q={search_term_string}. The {search_term_string} placeholder is required and must match the query-input target name exactly. Replace the example query with the placeholder token.
The query-input property declares which part of the URL template the user's search term fills. Its value must be required name=search_term_string, and that name has to match the {search_term_string} token in your target URL. If they do not match, Google ignores the markup and the searchbox will not appear.
No. Google decides whether to display the sitelinks searchbox algorithmically and only for sites it considers established enough, usually for brand or navigational queries. Valid schema makes you eligible and lets you control the search URL used, but it does not force the feature to appear for every site.
Place it on your homepage, since the sitelinks searchbox is associated with your site's primary result. Add a single WebSite object with the potentialAction. Do not duplicate it across many pages; one authoritative declaration on the homepage is the correct and recommended approach.
Yes, that is the main benefit. By defining the target URL template you ensure Google routes users to your real internal search endpoint with the correct parameter. Without the schema, Google may guess or omit the box entirely, so providing the exact pattern keeps the experience accurate.
Yes. The schema only describes an existing search functionality; it does not create one. Your site must have a real search page that accepts a query parameter and returns results. Pointing the SearchAction at a non-functional or fabricated endpoint provides a broken experience and is discouraged.