Fetch products by a ranking strategy (bestsellers, new arrivals, trending) with rich criteria filters, full-text query, cursor pagination, and facet aggregations.
Documentation Index
Fetch the complete documentation index at: https://docs.glood.ai/llms.txt
Use this file to discover all available pages before exploring further.
/recommendations and /recommendations/automatic, no product_ids are required. It is the right endpoint for:
/recommendations/automatic — same filter shape, same Joi schema — extended with four additional dimensions (excluded_tags, collections, product_types, price). Those extensions are also accepted by the automatic endpoint going forward.
Authorization: Bearer <shop storefront token> and x-shop: <myshopify domain> on every call. See Get Started → Headless Authentication for token provisioning.| Strategy | What it returns |
|---|---|
BESTSELLERS | Products ranked by revenue over the last 7, 15, or 30 days (selectable via strategy_options.sales_time_period, default 7). |
NEW_ARRIVALS | Most recently published products. |
TRENDING | Products currently gaining popularity based on recent sales velocity and acceleration. |
filter is fully optional. Each sub-field is independently optional and combined as an AND:
tags / excluded_tags — include / exclude by product tag.vendors — vendor names (exact match).product_types — product type values.collections — collection IDs the product must belong to.price.min / price.max — price range in shop currency.variants.is_in_stock, variants.available_for_sale — variant-level availability (matches any variant).variants.options[] — variant option matches (e.g. Color: Black).variants.sku[] — variant SKU match.metafields[] — match by {namespace, key, value}; requires a filterKey to exist on the indexed product.query is provided, a multi_match clause is added across title^3, description, tags, vendor, productType with operator: AND, lenient: true. The strategy sort still wins — products matching the text query are ranked by sales (or recency / trending score), not by BM25 relevance. For relevance-first text search, use the AI Search endpoint instead.
facets: ["vendor", "product_type", "tag", "price"] (any subset) to receive aggregations alongside the products. Each facet returns top values with counts. The price facet returns fixed buckets (0-50, 50-100, 100-250, 250+).
Facet counts are computed using a post-filter model — each facet’s counts ignore that dimension’s filter so a sidebar UI can show “all available vendors” even when the user has selected one. Other filters still apply.
pagination.limit (1–100, default 24). Subsequent pages pass the cursor returned in the previous response.
The response includes pagination.total and pagination.totalRelation ("eq" or "gte"). Elasticsearch caps totals at 10,000 by default — when the relation is "gte", the real total is ≥ that value.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Shopify store URL
"shop.myshopify.com"
Request body
Ranking strategy to apply
BESTSELLERS, NEW_ARRIVALS, TRENDING Response shape for each product entry.
product_details, product_ids Strategy-specific tuning. Currently only BESTSELLERS uses this.
Optional free-text query. Applied as a multi_match across title, description, tags, vendor, and product_type. The strategy sort still wins; products matching the text query rank by sales/recency/trending score, not BM25.
Same filter shape as /recommendations/automatic, extended with excluded_tags, collections, product_types, and price.
Facet dimensions to return alongside the products. Facets are computed only when this array is non-empty.
vendor, product_type, tag, price Top recommendations