Skip to main content
Glama
search.md2.05 kB
# Search Liquid Object Information about a storefront search query. For implementation details, see [Storefront search](https://shopify.dev/themes/navigation-search/search). ## Properties ### default_sort_by **Type:** string "The default sort order of the search results, which is `relevance`." ### filters **Type:** array of filter Displays filters configured on the search page. Only relevant filters appear, and the array remains empty if results exceed 1000 products. For setup instructions, visit the [Shopify Help Center](https://help.shopify.com/manual/online-store/themes/customizing-themes/storefront-filters). ### performed **Type:** boolean Returns `true` when a search completes successfully; `false` otherwise. ### results Contains search matches, which can be articles, pages, or products. Each result includes an `object_type` property identifying its type. Use the [paginate tag](https://shopify.dev/docs/api/liquid/tags/paginate) to limit results to 50 per page maximum. ### results_count **Type:** number The total number of results returned. ### sort_by The current sort order, determined by the `sort_by` URL parameter. Returns `nil` if no parameter exists. ### sort_options **Type:** array of sort_option Available sorting options for results. ### terms **Type:** string The search query entered by the user. Pair with the [`highlight` filter](https://shopify.dev/docs/api/liquid/filters/highlight) to emphasize terms in results. ### types **Type:** array of string Object types searched: `article`, `page`, or `product`, determined by the `type` query parameter. ## Example JSON ```json { "default_sort_by": "relevance", "filters": {}, "performed": true, "results": [], "results_count": 16, "sort_by": "relevance", "sort_options": [], "terms": "potion", "types": ["article", "page", "product"] } ``` ## Templates Using Search - [Theme architecture](https://shopify.dev/themes/architecture/templates/search) - [search template](https://shopify.dev/themes/architecture/templates/search)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/florinel-chis/shopify-liquid-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server