Related Content Recommendations

The related content algorithms return content related to the current asset, which you can display on a web page or within in App.

Note: Rather than constructing ad hoc requests (with individual parameters for each request), consider using discovery profiles to centralize your settings and recommendations behavior. Discovery profiles are defined configurations of settings created by you, which you then reuse by reference on the GET routes. For more information, see Discovery Profiles.

About Related Content

The related content algorithms initially use metadata to determine relationships, but optimize the results based on user behavior. For example, the algorithms might find relationships between ice hockey, ice skating, and Zamboni videos. Over time, it might discover that some people watch ice hockey videos and Zamboni videos, others watch ice skating and Zamboni videos, and others only watch Zamboni videos.

As you view related content results, you will find some of the relationships between content to be obvious. However, there are many that might be less obvious. For example, with sports videos, the related content algorithms might group:

  • Highlight videos
  • Bloopers
  • Top performances across sports
  • The best of extreme sports

Although these themes are obvious, other less obvious themes might appear. Additionally, the results are dynamic. As users view different content over time, the recommended videos also change.

Steps

Use the following steps to configure Discovery to return related content recommendations.
  1. Choose an asset for which to get related content. The following example returns two videos that are related to asset xtNnJ4OkQzLNI1wI2rYDvl5saZphlRaI:
    [GET]/v2/discover/similar/assets/"asset_id-h?limit=2               
    Backlot returns a response similar to the following.
    {  
       "results":[  
          {  
             "name":"Highlight Of The Night",
             "description":"Team1 take advantage of Player1 absence in Game 2 and roll to 109-92 win.",
             "embed_code":"embed_code",
             "external_id":"external_id",
             "preview_image_url":"image_url",
             "duration":"91000",
             "hostedAtURL":null,
             "bucket_info":"1{\"bucket_info_id",
             "reason":"top"
          },
          {  
             "name":"Player1, Team1 Take 2-0 Lead",
             "description":"Player scores 38 to lead the Team1 to the 104-100 win over Team2.",
             "embed_code":"embed_code",
             "external_id":"external_id",
             "preview_image_url":"image_url",
             "duration":"61000",
             "hostedAtURL":null,
             "bucket_info":"bucket_info_id",
             "reason":"top"
          }
       ]
    }            
  2. Get the information from each result to generate web page content.
    Note: Be sure to retain a copy of the bucket_info associated with each recommendation for use in the final step.
    The following example shows simple HTML content.
Note:

Try out the code samples using your account credentials in the Ooyala Scratchpad. For information about using the Scratchpad, see Practice Making Requests with the Scratchpad. To launch the scratchpad, go to Ooyala API Scratchpad.

해당 내용이 도움 되었습니까?