URL query parameters

Published

URL query parameters consist of key-value pairs that help customize the content. This can be the sorting and type of products displayed on collection pages or articles on blog pages, allowing for more specific requests. The queries are added after the URL starting with a questionmark, ?.

Filter options

Option Operators Description
tags {“equals”, “contains”, “starts_with”, “ends_with”} product or article tagged with
type {“equals”, “contains”, “starts_with”, “ends_with”} product type
title {“equals”, “contains”, “starts_with”, “ends_with”} product or article title
vendor {“equals”, “contains”, “starts_with”, “ends_with”} product vendor
variant {“equals”, “contains”} product variant
price {“equals”, “greater_than”, “less_than”} product price
compare_at_price {“equals”, “greater_than”, “less_than”} compare at price on product
price-min {“equals”} price_min >=
price-max {“equals”} price_max <=
sale {“equals”} on sale (compare_at_price > price)
onsale same as sale=true

For example /collection/our-versions?type=software&vendor=Cradle&price=>100&tags=cms&sort=price-asc will show products with the product type equal to software that has vendor Cradle and a price over 100 a tag cms with the list shown with price in ascending order.

Price range example

The following query will display products with a price between 4 and 5.

 https://mydomain.com/collection/shirts?price-min=4&price-max=5

Operators

"contains": "%",
"equals": "=",
"not": "!",
"greater_than": ">",
"less_than": "<",
"starts_with": "^",
"ends_with": "$",

For tags

"and" : ",",
"or" : "+"

Example with “and” and “or” for tags

tags=a+b,c+d : “(a OR b) AND (b OR c)”

Sorting options

The sort option will show the list of items (products or article) in a specified order, for example, adding sort=price-asc will order products by price, lowest price first.

https://mydomain.com/collection/shirts/?sort=price-asc
Values Description
alpha-asc Title ascending alphabetically A-Z
alpha-desc Title descending alphabetically A-Z
title-asc Title ascending alphabetically A-Z
title-desc Title descending alphabetically A-Z
price-desc Products displayed in order by price, highest to lowest
price-asc Products displayed in order by price, lowest to highest
created-desc Creation date newest to oldest
created-asc Creation date oldest to newest
published-desc Publish date newest to oldest
published-asc Publish date oldest to newest
updated-desc Update date newest to oldest
updated-asc Update date oldest to newest