> ## Documentation Index
> Fetch the complete documentation index at: https://product-discovery.developer.voyado.com/llms.txt
> Use this file to discover all available pages before exploring further.

# In-page search

> Add in-page search to landing pages with the q query parameter, plus guidelines for search scope, layout, no-hits views, and pinned products.

In-page search is available as an optional query parameter (`q`) on [landing pages](/elevate/docs/api/storefront/v3/queries/landing-page). This feature delivers the same robust search functionality as our standard search but with results specifically filtered to the current landing page context. Results are ranked using both our semantic match algorithm and the product lifecycle algorithm, aligning with the ranking logic of our standard search.

In-page search is particularly beneficial for specification-driven sites with large categories and numerous important keywords. It is especially useful in cases where the existing facets may be insufficient for narrowing down the search.

## Guidelines for implementing in-page search

To optimize user experience and distinguish in-page search from the site's main search, follow these best practices:

<Steps>
  <Step title="Enable instant search">
    Implement dynamic updates to search results with each keystroke (instant search) to enhance user interaction and streamline the search process.
  </Step>

  <Step title="Clarify the search scope">
    Clearly differentiate between the main site search and in-page search by communicating the scope each one covers. This ensures users understand where they are searching, either across the entire site or within a specific page category.
  </Step>

  <Step title="Establish visual hierarchy and layout">
    Ensure the main site search is visually prominent, with adequate spacing between the two search bars. This helps prevent users from accidentally performing a scoped in-page search when they intended to search the entire site.
  </Step>

  <Step title="Use supporting text">
    Provide helpful text for each search input field. For example:

    * Main search — "Search everything at Acme"
    * In-page search — "Search within category X"
  </Step>

  <Step title="Indicate search scope in results">
    Include the scope in the search result titles. For instance: "Results in category X for 'search term'".
  </Step>

  <Step title="Design a clear no-hits view">
    When no results are found, make it clear that the user performed a scoped search. Offer the option to re-run the query in the full main search scope with a single click.
  </Step>

  <Step title="Minimize pinned products or slices">
    Avoid pinned products or featured slices on pages with in-page search. This prevents confusion when the natural rank order is applied during search, making pinned items appear to disappear.
  </Step>

  <Step title="Hide in-page search when results are limited">
    Consider hiding the in-page search bar if the total number of products in the result is fewer than 20, as this may not provide enough value for a scoped search.
  </Step>
</Steps>
