Cookies & analytics

    We use cookies for analytics and to serve ads. Accept to enable Google Analytics and AdSense. You can decline to stay opt-out.

    SwiftSchema Logo

    SwiftSchema

    Intuitive Schema Generation at Your Fingertips

    AboutLearnContact
      Stack

      Documentation Search Stack

      Doc search portals with WebSite + SearchResultsPage context, FAQs, and breadcrumb navigation.

      Open generatorValidate in Rich Results Test

      When to use this stack

      • Documentation search landing pages (sitewide docs search)
      • Search results pages for developer docs and guides
      • Pages where FAQs clarify indexing, scope, and result freshness

      What's included

      • Declares the docs site and connects the search action.

      • Search Results Page
        Open generator

        Labels the page as a search results surface within docs.

      • Frequently Asked Questions
        Open generator

        Answers how indexing works, what’s included, and freshness.

      • Breadcrumb
        Open generator

        Provides navigation context to the search page.

      Required properties (stack union)

      Ensure every applicable required property is present in your implementation. Nested props reference their parent objects (for example, `offers.priceCurrency`).

      itemListElement[].name
      mainEntity[].@type=Question
      mainEntity[].acceptedAnswer.text
      name
      url

      Recommended properties (stack union)

      description
      itemListElement[].item
      mainEntity[].acceptedAnswer.text
      mainEntity[].author.name
      mainEntity[].name
      potentialAction.query-input
      potentialAction.target

      Combined JSON-LD

      Paste as a single script tag. Keep product details, offer data, shipping/returns, and FAQ answers in sync with the page.

      Validate
      [
        {
          "@context": "https://schema.org",
          "@type": "WebSite",
          "@id": "https://www.example.com/docs#website",
          "name": "Example Docs",
          "url": "https://www.example.com/docs",
          "potentialAction": {
            "@type": "SearchAction",
            "target": "https://www.example.com/docs/search?q={search_term_string}",
            "query-input": "required name=search_term_string"
          }
        },
        {
          "@context": "https://schema.org",
          "@type": "SearchResultsPage",
          "@id": "https://www.example.com/docs/search#page",
          "name": "Search Docs",
          "description": "Search API references, guides, and tutorials.",
          "url": "https://www.example.com/docs/search"
        },
        {
          "@context": "https://schema.org",
          "@type": "FAQPage",
          "mainEntity": [
            {
              "@type": "Question",
              "name": "What does the search index include?",
              "acceptedAnswer": {
                "@type": "Answer",
                "text": "All public API reference, tutorials, changelog entries, and guides are indexed."
              }
            },
            {
              "@type": "Question",
              "name": "How fresh are the results?",
              "acceptedAnswer": {
                "@type": "Answer",
                "text": "Docs are reindexed hourly. Newly published pages appear within 60 minutes."
              }
            },
            {
              "@type": "Question",
              "name": "Do you support operators or filters?",
              "acceptedAnswer": {
                "@type": "Answer",
                "text": "Use filters in the UI for product area, version, and date. Boolean operators are not supported."
              }
            }
          ]
        },
        {
          "@context": "https://schema.org",
          "@type": "BreadcrumbList",
          "itemListElement": [
            { "@type": "ListItem", "position": 1, "name": "Home", "item": "https://www.example.com" },
            { "@type": "ListItem", "position": 2, "name": "Docs", "item": "https://www.example.com/docs" },
            { "@type": "ListItem", "position": 3, "name": "Search", "item": "https://www.example.com/docs/search" }
          ]
        }
      ]

      Implementation steps

      1. Start from your live product detail page content; ensure titles, prices, and availability match the page.
      2. Embed one JSON-LD script in the head or just before the closing body tag using the combined example as a template.
      3. Fill shipping details for each region you serve and keep them aligned with on-page shipping tables.
      4. Attach your canonical MerchantReturnPolicy URL and keep the policy text in sync with Merchant Center.
      5. Add 3–6 FAQs that address purchase blockers (shipping, returns, compatibility) and keep answers consistent with visible content.
      6. Validate in the Rich Results Test and revalidate after price/availability/policy changes.

      Common errors and fixes

      FAQs

      Do I need both WebSite and SearchResultsPage?

      Yes. WebSite defines the docs domain and search action; SearchResultsPage labels the results page itself.

      Can I include live results?

      If you show a default query, ensure the on-page content matches what is returned and align JSON-LD URLs to the visible page.

      References