Track user interaction with search results.
Records user engagement (clicks, views, etc.) for analytics and potential search optimization (Learning to Rank).
Authentication:
X-Public-API-Key headerRecommended Headers:
X-Session-ID: Session identifier for tracking user journeyInteraction Types:
VIEW: Result was visible in viewportCLICK: User clicked on resultPOSITIVE_FEEDBACK: User explicitly liked resultNEGATIVE_FEEDBACK: User explicitly disliked resultPURCHASE: User purchased/convertedADD_TO_CART: User added to cartWISHLIST: User added to wishlistLONG_VIEW: User spent significant time viewingSHARE: User shared resultBOOKMARK: User bookmarked resultExample:
curl -X POST "https://api.mixpeek.com/v1/public/retrievers/video-search/interactions" \
-H "X-Public-API-Key: prk_abc123..." \
-H "X-Session-ID: sess_xyz..." \
-H "Content-Type: application/json" \
-d '{
"document_id": "doc_123",
"interaction_type": ["CLICK"],
"position": 2,
"execution_id": "exec_abc",
"query_snapshot": {"query": "red car"}
}'
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Public name of the published retriever
Request to track a single interaction from public retriever.
Simplified wrapper around SearchInteraction for public API use.
ID of the document that was interacted with (from search results)
Type(s) of interaction that occurred
1Types of user interactions with search results.
These interaction types are used to track user behavior and improve retrieval quality through Learning to Rank (LTR), collaborative filtering, and embedding fine-tuning.
Values: VIEW: User viewed a search result CLICK: User clicked on a search result POSITIVE_FEEDBACK: User explicitly marked result as relevant/helpful NEGATIVE_FEEDBACK: User explicitly marked result as not relevant PURCHASE: User purchased the item (high-value conversion signal) ADD_TO_CART: User added item to cart (mid-funnel signal) WISHLIST: User saved item for later (engagement signal) LONG_VIEW: User spent significant time viewing (dwell time) SHARE: User shared the result (strong engagement signal) BOOKMARK: User bookmarked the result QUERY_REFINEMENT: User modified their search query ZERO_RESULTS: Query yielded no results (helps identify gaps) FILTER_TOGGLE: User modified filters (helps understand intent) SKIP: User skipped over result to click something lower (negative signal) RETURN_TO_RESULTS: User quickly returned to results (negative signal)
Usage in Retrieval Optimization: - LTR (Learning to Rank): Train models to predict click-through rates - Collaborative Filtering: Find similar users/items based on interactions - Embedding Fine-tuning: Adjust embeddings based on what users actually click - Query Understanding: Analyze refinements and zero-result queries - Result Quality: Identify poorly-performing results via skip/return patterns
view, click, positive_feedback, negative_feedback, purchase, add_to_cart, wishlist, long_view, share, bookmark, query_refinement, zero_results, filter_toggle, skip, return_to_results Position in search results (0-indexed)
x >= 0ID of the retriever execution that generated these results. HIGHLY RECOMMENDED for analytics.
"exec_abc123xyz"
Snapshot of the query that generated these results. HIGHLY RECOMMENDED for training optimization.
{ "text": "wireless headphones" }Initial retrieval score of this document
0.95
Total number of results shown
x >= 110
Session identifier for tracking user journey
"sess_abc123"
Additional context about the interaction
Successful Response