Skip to content

Similar Products

GEThttps://rebuyengine.com/api/v1/products/similar_products

Use Cases

Use this endpoint to find products that are similar. For example, if a customer is buying Product A, use this endpoint to surface and suggest similar products B & C.

Query Parameters

shopify_product_ids · string
Shopify product id that you'd like similar products for.
limit · string · Default: 5
Used to limit the number of products returned.
country_code · string

The ISO 3166-1 alpha-2 country code (e.g., US, CA, GB) corresponding to a Market region. Retrieves variant pricing from the Market’s catalog. The prices returned reflect the shop’s first active Market that matches the provided country_code. Only products included in that Market’s catalog will be returned in the response — products excluded from the catalog will not appear.

Required Shopify Scope: read_markets

Replaces the deprecated presentment_prices query parameter.

Code Example

// GET https://rebuyengine.com/api/v1/products/similar_products
const params = new URLSearchParams({
  shopify_product_ids: "YOUR_VALUE",
  limit: "YOUR_VALUE"
});

fetch(`https://rebuyengine.com/api/v1/products/similar_products?${params}`)
  .then(response => response.json())
  .then(data => console.log(data));

Response Examples

200 - 200

{
  "data": [
    {
      "admin_graphql_api_id": "gid://shopify/Product/562405015588",
      "body_html": "50/50 T + FREE SWAG AND SHIPPING!!$Yes$#<br>",
      "created_at": "2018-03-20T18:16:12Z",
      "description": "50/50 T + FREE SWAG AND SHIPPING!!$Yes$#",
      "handle": "hanes-50-50-t-shirt",
      "id": 562405015588,
      "image": {
        "admin_graphql_api_id": "gid://shopify/ProductImage/2155956699172",
        "alt": null,
        "height": 1528,
        "id": 2155956699172,
        "position": 1,
        "product_id": 562405015588,
        "src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Hanes_50_50_T-shirt-lime-A.png?v=1573880386",
        "variant_ids": [
          7162531512356
        ],
        "width": 1528
      },
      "images": [
        {
          "admin_graphql_api_id": "gid://shopify/ProductImage/2155956699172",
          "alt": null,
          "height": 1528,
          "id": 2155956699172,
          "position": 1,
          "product_id": 562405015588,
          "src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Hanes_50_50_T-shirt-lime-A.png?v=1573880386",
          "variant_ids": [
            7162531512356
          ],
          "width": 1528
        },
        {
          "admin_graphql_api_id": "gid://shopify/ProductImage/2155957157924",
          "alt": null,
          "height": 1528,
          "id": 2155957157924,
          "position": 2,
          "product_id": 562405015588,
          "src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Hanes_50_50_T-shirt-lime-B.png?v=1573880386",
          "variant_ids": [],
          "width": 1528
        },
        {
          "admin_graphql_api_id": "gid://shopify/ProductImage/2155957387300",
          "alt": null,
          "height": 1528,
          "id": 2155957387300,
          "position": 3,
          "product_id": 562405015588,
          "src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Hanes_50_50_T-shirt-yellow-A.png?v=1573880386",
          "variant_ids": [
            7162531545124
          ],
          "width": 1528
        },
        {
          "admin_graphql_api_id": "gid://shopify/ProductImage/2155957583908",
          "alt": null,
          "height": 1528,
          "id": 2155957583908,
          "position": 4,
          "product_id": 562405015588,
          "src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Hanes_50_50_T-shirt-yellow-B.png?v=1573880386",
          "variant_ids": [],
          "width": 1528
        }
      ],
      "options": [
        {
          "id": 833046904868,
          "name": "Color",
          "position": 1,
          "product_id": 562405015588,
          "values": [
            "Lime",
            "Yellow"
          ]
        },
        {
          "id": 9306242121764,
          "name": "Size",
          "position": 2,
          "product_id": 562405015588,
          "values": [
            "Small",
            "Medium",
            "Large"
          ]
        }
      ],
      "product_type": "Arts & Entertainment",
      "published_at": "1970-01-01T00:00:00Z",
      "status": "draft",
      "tags": "clothing,shirt",
      "template_suffix": "",
      "title": "50/50 T - Maybe The Best T Shirt On The Marketd",
      "updated_at": "2022-07-05T19:37:31Z",
      "vendor": "Example Brand",
      "variants": [
        {
          "admin_graphql_api_id": "gid://shopify/ProductVariant/7162531512356",
          "barcode": "",
          "compare_at_price": "12.00",
          "created_at": "2018-03-20T18:16:12Z",
          "fulfillment_service": "manual",
          "grams": 0,
          "id": 7162531512356,
          "image_id": 2155956699172,
          "inventory_management": "shopify",
          "inventory_policy": "deny",
          "inventory_quantity": 0,
          "metafields": [],
          "option1": "Lime",
          "option2": "Small",
          "option3": null,
          "position": 1,
          "price": "10.00",
          "product_id": 562405015588,
          "requires_shipping": true,
          "sku": "H5050TS-1",
          "tax_code": null,
          "taxable": true,
          "title": "Lime / Small",
          "updated_at": "2022-07-05T19:37:31Z",
          "weight": 0,
          "weight_unit": "pounds"
        },
        {
          "admin_graphql_api_id": "gid://shopify/ProductVariant/40322979135524",
          "barcode": "",
          "compare_at_price": "12.00",
          "created_at": "2022-07-05T19:37:31Z",
          "fulfillment_service": "manual",
          "grams": 0,
          "id": 40322979135524,
          "image_id": null,
          "inventory_management": "shopify",
          "inventory_policy": "deny",
          "inventory_quantity": 0,
          "metafields": [],
          "option1": "Lime",
          "option2": "Medium",
          "option3": null,
          "position": 2,
          "price": "10.00",
          "product_id": 562405015588,
          "requires_shipping": true,
          "sku": "",
          "tax_code": null,
          "taxable": true,
          "title": "Lime / Medium",
          "updated_at": "2022-07-05T19:37:31Z",
          "weight": 0,
          "weight_unit": "pounds"
        },
        {
          "admin_graphql_api_id": "gid://shopify/ProductVariant/40322979168292",
          "barcode": "",
          "compare_at_price": "12.00",
          "created_at": "2022-07-05T19:37:31Z",
          "fulfillment_service": "manual",
          "grams": 0,
          "id": 40322979168292,
          "image_id": null,
          "inventory_management": "shopify",
          "inventory_policy": "deny",
          "inventory_quantity": 0,
          "metafields": [],
          "option1": "Lime",
          "option2": "Large",
          "option3": null,
          "position": 3,
          "price": "10.00",
          "product_id": 562405015588,
          "requires_shipping": true,
          "sku": "",
          "tax_code": null,
          "taxable": true,
          "title": "Lime / Large",
          "updated_at": "2022-07-05T19:37:31Z",
          "weight": 0,
          "weight_unit": "pounds"
        },
        {
          "admin_graphql_api_id": "gid://shopify/ProductVariant/7162531545124",
          "barcode": "",
          "compare_at_price": null,
          "created_at": "2018-03-20T18:16:12Z",
          "fulfillment_service": "manual",
          "grams": 0,
          "id": 7162531545124,
          "image_id": 2155957387300,
          "inventory_management": "shopify",
          "inventory_policy": "continue",
          "inventory_quantity": -2,
          "metafields": [],
          "option1": "Yellow",
          "option2": "Small",
          "option3": null,
          "position": 4,
          "price": "8.00",
          "product_id": 562405015588,
          "requires_shipping": true,
          "sku": "H5050TS-2",
          "tax_code": null,
          "taxable": true,
          "title": "Yellow / Small",
          "updated_at": "2022-07-05T19:37:31Z",
          "weight": 0,
          "weight_unit": "pounds"
        },
        {
          "admin_graphql_api_id": "gid://shopify/ProductVariant/40322979201060",
          "barcode": "",
          "compare_at_price": "12.00",
          "created_at": "2022-07-05T19:37:31Z",
          "fulfillment_service": "manual",
          "grams": 0,
          "id": 40322979201060,
          "image_id": null,
          "inventory_management": "shopify",
          "inventory_policy": "deny",
          "inventory_quantity": 0,
          "metafields": [],
          "option1": "Yellow",
          "option2": "Medium",
          "option3": null,
          "position": 5,
          "price": "10.00",
          "product_id": 562405015588,
          "requires_shipping": true,
          "sku": "",
          "tax_code": null,
          "taxable": true,
          "title": "Yellow / Medium",
          "updated_at": "2022-07-05T19:37:31Z",
          "weight": 0,
          "weight_unit": "pounds"
        },
        {
          "admin_graphql_api_id": "gid://shopify/ProductVariant/40322979233828",
          "barcode": "",
          "compare_at_price": "12.00",
          "created_at": "2022-07-05T19:37:31Z",
          "fulfillment_service": "manual",
          "grams": 0,
          "id": 40322979233828,
          "image_id": null,
          "inventory_management": "shopify",
          "inventory_policy": "deny",
          "inventory_quantity": 0,
          "metafields": [],
          "option1": "Yellow",
          "option2": "Large",
          "option3": null,
          "position": 6,
          "price": "10.00",
          "product_id": 562405015588,
          "requires_shipping": true,
          "sku": "",
          "tax_code": null,
          "taxable": true,
          "title": "Yellow / Large",
          "updated_at": "2022-07-05T19:37:31Z",
          "weight": 0,
          "weight_unit": "pounds"
        }
      ],
      "owner": "45"
    }
  ]
}

400 - 400

{
  "error": "Invalid key"
}