List products with search, filter, sort, and pagination
Changed onMirrors the GraphQL products query. Any query param outside the reserved set (query, sort, order, page, per_page, locale, channel, filter, suggest) is treated as a filterable attribute — so new attributes like material, pattern, etc. work automatically without schema changes.
Request
- Base URLhttp://localhost:8000/api/shop
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Search term (matches SKU or product name).
Elasticsearch only: when the store searches with Elasticsearch, the query is swapped for its "did you mean" suggestion (see GET /api/shop/search-redirect). Send 0 to search the exact query instead.
Compound sort token. One of: name-asc, name-desc, price-asc, price-desc, created_at-desc (newest first), created_at-asc (oldest first), updated_at-desc, updated_at-asc, id-asc, id-desc. May also be used with a separate order param (e.g. sort=name&order=desc).
Sort direction when sort is a bare key (e.g. sort=name&order=desc). Ignored if sort already has a -asc/-desc suffix.
Page number (1-based).
Items per page. Default matches the GraphQL first default.
Product type.
Filter products by category ID.
Compound price range — from,to (e.g. 10,200). Alternative to price_from + price_to.
Minimum price (inclusive).
Maximum price (inclusive).
Only return products flagged as new.
Only return products flagged as featured.
Attribute filters as a dynamic key/value map. In Swagger UI, click "Add string item" to add a row, enter the attribute code as the key (e.g. brand, color, size, material, any filterable attribute) and the option ID as the value. Multi-select: comma-separate option IDs (e.g. 1,2,3). Generates URLs like ?filter[brand]=38&filter[color]=3. A raw JSON filter string is also accepted for GraphQL parity, e.g. {"color":{"match":"3","match_type":"PARTIAL"}}.
{
"brand": "38",
"color": "3"
}Headers
Storefront API Key for authentication. Required for all shop/storefront API requests.
Locale code for localized data (e.g. "en", "fr", "ar"). Defaults to channel's default locale.
Channel code (e.g. "default"). Defaults to the current channel.
Currency code (e.g. "USD", "EUR", "INR"). Defaults to channel's base currency.
Response
A paginated list of products matching the search, filter, and sort criteria.
Changes
- info
added the new optional
queryrequest parametersuggest
- info