Shopify Product Recommendations API

Get product recommendations

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

shopify-product-recommendations-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Shopify Admin REST About Product Recommendations API
  description: The Shopify Admin REST API lets you build apps and integrations that extend and enhance the Shopify admin. Access products, customers, orders, inventory, fulfillment, and more. Endpoints are organized by resource type and versioned by release date.
  version: 2025-01
  contact:
    name: Shopify
    url: https://shopify.dev/docs/api/admin-rest
    email: api@shopify.com
  license:
    name: Shopify API Terms
    url: https://www.shopify.com/legal/api-terms
  x-date: '2026-03-04'
servers:
- url: https://{store}.myshopify.com/admin/api/2025-01
  description: Shopify Admin REST API
  variables:
    store:
      default: my-store
      description: The Shopify store subdomain
security:
- AccessToken: []
tags:
- name: Product Recommendations
  description: Get product recommendations
paths:
  /recommendations/products.json:
    get:
      operationId: getProductRecommendations
      summary: Shopify Get product recommendations
      description: Retrieves product recommendations for a given product. Returns related or complementary products based on purchase history, product descriptions, and related collections.
      tags:
      - Product Recommendations
      parameters:
      - name: product_id
        in: query
        required: true
        description: The product ID to get recommendations for
        schema:
          type: integer
      - name: limit
        in: query
        description: Number of recommendations (1-10, default 10)
        schema:
          type: integer
          minimum: 1
          maximum: 10
          default: 10
      - name: intent
        in: query
        description: The recommendation intent
        schema:
          type: string
          enum:
          - related
          - complementary
          default: related
      responses:
        '200':
          description: Product recommendations
          content:
            application/json:
              schema:
                type: object
                properties:
                  intent:
                    type: string
                  products:
                    type: array
                    items:
                      $ref: '#/components/schemas/StorefrontProduct'
        '404':
          description: Product not found
        '422':
          description: Invalid parameter
components:
  schemas:
    StorefrontProduct:
      type: object
      description: A product as returned by the storefront Ajax API
      properties:
        id:
          type: integer
        title:
          type: string
        handle:
          type: string
        description:
          type: string
        published_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        vendor:
          type: string
        type:
          type: string
        tags:
          type: array
          items:
            type: string
        price:
          type: integer
          description: Price in cents
        price_min:
          type: integer
        price_max:
          type: integer
        available:
          type: boolean
        price_varies:
          type: boolean
        compare_at_price:
          type:
          - integer
          - 'null'
        compare_at_price_min:
          type: integer
        compare_at_price_max:
          type: integer
        compare_at_price_varies:
          type: boolean
        variants:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              title:
                type: string
              option1:
                type:
                - string
                - 'null'
              option2:
                type:
                - string
                - 'null'
              option3:
                type:
                - string
                - 'null'
              sku:
                type:
                - string
                - 'null'
              requires_shipping:
                type: boolean
              taxable:
                type: boolean
              featured_image:
                type:
                - object
                - 'null'
              available:
                type: boolean
              name:
                type: string
              public_title:
                type:
                - string
                - 'null'
              price:
                type: integer
              weight:
                type: integer
              compare_at_price:
                type:
                - integer
                - 'null'
              barcode:
                type:
                - string
                - 'null'
        images:
          type: array
          items:
            type: string
            format: uri
        featured_image:
          type: string
          format: uri
        options:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              position:
                type: integer
              values:
                type: array
                items:
                  type: string
        url:
          type: string
        media:
          type: array
          items:
            type: object
            properties:
              alt:
                type:
                - string
                - 'null'
              id:
                type: integer
              position:
                type: integer
              media_type:
                type: string
              src:
                type: string
                format: uri
              width:
                type: integer
              height:
                type: integer
  securitySchemes:
    AccessToken:
      type: apiKey
      name: X-Shopify-Access-Token
      in: header
      description: Access token obtained via OAuth