Product Recommendations API reference

The following calls can be submitted via the Product Recommendations API to your Shopify shop.

For more information on how to use product recommendations on your Shopify shop, see the following tutorials:

GET /recommendations/products.json

For a given product, display recommended products on the product page.

Query parameters

product_id (required): The unique product ID of the product that you want to show recommended products for.

limit (optional): Limits number of results, up to a maximum of ten. Using the limit parameter cannot increase the number of results over ten. A maximum of ten results are given when this is not used.

section_id (optional): The unique section ID of the section file that you want render with product recommendations. When this parameter is used, the JSON response is a string of HTML of the rendered section.

Example call using jQuery:

Example call using Fetch:

Responses

The response of the Product Recommendations API is a JSON object when a product_id is provided with no accompanying section_id. When a section_id is provided, the response will be a string of HTML.

Products response

When a valid product_id parameter is provided with no optional section_id, the endpoint returns a JSON object. Example JSON object: