Free Sitelinks Search Box Schema Generator
Generate the JSON-LD structured data markup that enables the Google Sitelinks Search Box for your website. Enter your site URL and search action URL template to get a ready-to-paste <script type="application/ld+json"> snippet.
Generate Sitelinks Search Box Schema
Your homepage URL — must match your canonical homepage URL.
Your site's search URL with {search_term_string} as the placeholder where the user's query will be inserted.
What Is the Sitelinks Search Box?
The Sitelinks Search Box is a Google Search feature that shows a search input field directly within your site's search result listing. When users search for your brand name, Google may display an embedded search box that lets them search your website right from the search results page — without needing to visit your site first.
This feature typically appears for well-known brands and websites with strong sitelinks. By adding the correct structured data to your homepage, you tell Google the URL pattern for your internal search engine, increasing the chances of this feature appearing and ensuring it works correctly.
How Sitelinks Search Box Schema Works
The schema uses the WebSite type with a SearchAction to define your site's search URL pattern. Here are the required properties:
- @type: WebSite — Identifies the page as a website
- url — Your homepage URL (must match your canonical homepage URL)
- potentialAction.@type: SearchAction — Defines the search action
- target.urlTemplate — Your search URL with the
{search_term_string}placeholder where the query goes - query-input — Must be set to
required name=search_term_string
How to Use This Tool
- Enter your website URL — Type or paste your homepage URL (e.g.,
https://example.com) - Enter your search action URL template — Provide the URL pattern for your site's search results, replacing the query with
{search_term_string}(e.g.,https://example.com/search?q={search_term_string}) - Click "Generate Schema" — The tool creates the complete JSON-LD markup with the proper structure
- Copy the output — Use the copy button to grab either the raw JSON-LD or the full HTML snippet with the
<script>wrapper - Add to your homepage — Paste the HTML snippet into the
<head>section of your homepage
Implementation Guide
Follow these guidelines to correctly implement the Sitelinks Search Box schema on your website:
- Homepage only: The schema should only be placed on your homepage. Google ignores Sitelinks Search Box markup on other pages.
- Use JSON-LD format: Google recommends JSON-LD over Microdata or RDFa for structured data. This tool generates the recommended JSON-LD format.
- Match your canonical URL: The
urlproperty must exactly match the canonical URL of your homepage. - Ensure your search works: The search URL template must lead to a functioning search results page on your site. Google will test it.
- Use HTTPS: Both your site URL and search URL should use HTTPS for security and SEO best practices.
- Test with Google's Rich Results Test: After implementation, validate your markup using Google's Rich Results Test to confirm it's error-free.
Frequently Asked Questions
What is the Sitelinks Search Box?
The Sitelinks Search Box is a Google Search feature that displays a search input directly within your site's search result listing. It allows users to search your website without first visiting it, improving user experience and click-through rates. It typically appears for navigational brand queries.
Do I need structured data for the Sitelinks Search Box to appear?
Adding WebSite schema with a SearchAction markup tells Google the URL pattern for your site's internal search. While Google may show the search box without markup, adding the structured data ensures Google uses your preferred search URL and increases the likelihood of the feature appearing.
What is the {search_term_string} placeholder?
The {search_term_string} placeholder in the URL template tells Google where to insert the user's search query. For example, if your search URL is https://example.com/search?q=shoes, the template would be https://example.com/search?q={search_term_string}.
Where should I place the Sitelinks Search Box schema?
The JSON-LD markup should be placed on your homepage only, inside a <script type="application/ld+json"> tag in the <head> or <body> section. Google only considers the Sitelinks Search Box for a site's homepage.
Can I opt out of the Sitelinks Search Box?
Yes. If you don't want Google to show the search box for your site, add a nositelinkssearchbox meta tag to your homepage: <meta name="google" content="nositelinkssearchbox" />. This tells Google not to display the feature for your site.
Track Your Brand Across Google & AI
QuickSEO connects your Google Search Console data with AI visibility tracking across ChatGPT, Claude, and Gemini — all in one dashboard.
Try QuickSEO →