Skip to content

For You

For You recommendations

POST /indexes/{index_name}/recommend

Purpose

Surface personalized product selections based on a user's interaction history, preferences, and behavioral patterns. Leverages past purchases, clicks, cart additions, and browsing behavior to deliver highly relevant recommendations that match individual customer preferences and increase engagement.

Background

Personalized recommendations use machine learning to analyze user behavior patterns including purchase history, product views, cart additions, and engagement signals. The system builds individual preference profiles to identify products that align with each user's demonstrated interests, shopping patterns, and brand affinities.

When to use

  • Homepage personalization: Show tailored content for returning visitors and logged-in users
  • Email marketing: Create personalized product recommendations in newsletters and campaigns
  • Account dashboards: Display relevant suggestions in user profiles and account pages
  • Re-engagement campaigns: Target users with products based on their historical preferences

Example uses

Use Case Description Interaction Source Business Impact
Homepage "For You" Section Display personalized recommendations on homepage for logged-in users Purchase + browse + cart history Increases engagement, improves homepage relevance
Email Recommendations Include "Based on Your Purchases" or "You Might Like" in email campaigns Purchase history + recent views Drives return visits, increases email CTR
Account Dashboard Show "Recommended for You" in user account or profile pages Complete interaction history Extends session time, improves loyalty
Retargeting Campaigns Target users with ads featuring products aligned with their preferences Behavioral data + preferences Improves ad relevance, increases conversion rates
Mobile App Personalization Create personalized product feeds within mobile applications App usage + purchase patterns Enhances app engagement, drives mobile sales

Input sources (interaction types)

  • Purchase History: Products previously bought by the user - strongest personalization signal
  • Cart Activity: Items added to cart (even if not purchased) - indicates strong interest
  • Product Views: Recently viewed or frequently browsed items - shows browsing preferences
  • Engagement Signals: Likes, saves, shares, or other interaction data - reveals preferences
  • Search Patterns: Historical search queries and clicked results - indicates intent and interests

Example (cURL)

curl -X POST "https://api.marqo.ai/indexes/product-catalog/recommend" \
  -H "Authorization: Bearer $MARQO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "for_you",
    "user_id": "abc123",
    "interaction_types": ["purchase", "cart", "view"],
    "limit": 12
  }'

Parameters

Name Type Required Description Example
method string yes Recommendation strategy identifier. "for_you"
user_id string yes User identifier for personalization. "abc123"
interaction_types array[string] no Types of interactions to consider (purchase, cart, view, engagement). Default: all types. ["purchase", "cart"]
limit integer no Max number of results to return. Defaults to 10. 12
offset integer no Offset for pagination. 0
filters object no Server-side constraints (e.g., in_stock, price ranges, brand, category). See Marqo Filter DSL. { "in_stock": true }
session_id string no Optional session identifier. "xyz789"