REST API
POST /graph/silos
Personalized and Customizable Carousels of Data.
POST https://api.mediahound.net/graph/silos
Overview
Imagine you want to present your Users with carousels of content, each highlighting different facets of personalized and recommended content.
As illustrated, the User is shown 3 rows of suggestions. Each row is one Silo:
- The first displays Movie and ShowSeries recommendations based on the User's Likes.
- The second makes personalized Movie suggestions that are currently available to watch on a few Sources.
- The third displays Movies from a Graph Lens -- a highly specific grouping of movies with a descriptive title like "B-Movie Comedies Set in Space".
Silos
Silos empower you to make an endless stream of carousels that engage your Users with highly specific and targeted content. The response looks like a two dimensional array of objects, where each of the inner arrays represents one cohesive set of Content (i.e., Horror Comedies on Netflix Instant).
Silos have a learning curve. Before you dive into how to create Silos, you must be comfortable working with Factors, Filters, and Components from our Hound Query Language. Silos build heavily on HQL and internally utilize the underlying services of Relate, Explore and Lookup.
The silo endpoint allows you to specify the types of silos that you would like to see on a page. Below we will break down the specific configurations that are available.
Types of Silos
Type | Description |
---|---|
Recommended For You | Classic Recommendations based off all Seed Data |
Explore | Based on Popularity - does not use Seed Data |
Based On Item | Recommendations based heavily on 1 item |
Graph Lens | Curated sets of 3 traits that go well together recommended for the user. |
Explore Graph Lens | Curated sets of 3 traits that go well together sorted by popularity |
Content | Recommendations based on a curated set of titles |
Collection | Inject an editorial collection of content hand-generated by your editorial team |
Silos are constructed as JSON and passed into the silos endpoint as the POST body. The Silos Language inherits some things from Factors, Filters, and Components, so go read-up if you're unfamiliar.
HQL JSON Parameters
Silos does not use the page
parameter to paginate through silos. The Paging Info Object comes with a next
attribute that has a body
. This body can be used as a request body to get the "next page" of silos.
Property | Description |
---|---|
ids | List of content MHIDs that the user had a positive affinity for |
filters | Required object. See Filters. Blueprint level filters override the global filters. |
components | Optional Array. See Components. |
pageSize | Optional Integer. Number of silos to be returned. See the Paging Info Object. |
siloPageSize | Number of titles per silo. See the Paging Info Object. |
blueprints | List of Blueprints of the types of silos you would like returned. |
Blueprint
Blueprints describe how to generate each of the silos in the returned result. You can mix and match blueprints and specify how they should be positioned in the response body and how they should repeat.
Property | Description |
---|---|
type | The type of silo that you want to generate. One of: RecommendedForYou , Explore , BasedOnItem , GraphLens , ExploreGraphLens , Content , Collection . |
positions | Static indexes that the silo should appear in. Array of integers. Can NOT be used with probability . |
probability | How likely it should be for this silo to appear in one of the remaining slots. Can NOT be used with positions . |
filters | Blueprint specific filters. See Filters. |
params | Type-specific blueprint parameters. |
Blueprint Params
Each Blueprint type has a different set of params
that control it.
Recommended For You
Property | Description | Type | Example |
---|---|---|---|
name | Title for the Silo | String | Movies for You |
Explore
Property | Description | Type | Example |
---|---|---|---|
name | Title for the Silo | String | Trending Movies |
Based On Item
Property | Description | Type | Example |
---|---|---|---|
nameGenerator | Title for the Silo that injects seed data in place of “\$1” | String | Because You Watched $1 |
Explore Graph Lens
Property | Description | Type | Examle |
---|---|---|---|
nameGenerator | Title for the Silo that injects seed data in place of “\$1” | String | Because You Watched $1 |
Graph Lens
No params
.
Example One
Request
Let's say you would like to request 4 silos.
- 1 "RecommendedForYou" silo
- 3 "BasedOnItem" silos
{"ids": ["mhmovUdrcjcpagFVWeBWRYP9QzPz5FHzGInuF7i3AWaN","mhmovXOJQTjfw9gVJzNWZMUnH35jZITMYkzwibRLqxon","mhmovwLXNsSIcooIQgitkcBT5syRQ2Q5bykjOYkeTcLN"],"components": [{"name": "metadata"}],"blueprints": [{"type": "RecommendedForYou","params": {"name": "Movies For You"},"filters": {"returnType": {"$eq": "Movie"}}},{"type": "BasedOnItem","params": {"nameGenerator": "Because you liked $1"}}]}
Response
The response will be a bit large so let's break it up to simplify.
Silos returns an array of silos. Each silo has a title, a Paging Info Object, and an array of Object Context Pairs.
{"silos": [{"content": OBJECT_CONTEXT_PAIR[],"pagingInfo": PAGING_INFO_OBJECT,"title": "Movies For You"},{"content": OBJECT_CONTEXT_PAIR[],"pagingInfo": PAGING_INFO_OBJECT,"title": "Because you liked Toy Story"},{"content": OBJECT_CONTEXT_PAIR[],"pagingInfo": PAGING_INFO_OBJECT,"title": "Because you liked Cars 2"},{"content": OBJECT_CONTEXT_PAIR[],"pagingInfo": PAGING_INFO_OBJECT,"title": "Because you liked Shrek"}],"pagingInfo": PAGING_INFO_OBJECT}
. In this case object
will contain movie metadata.
"silos": [{"content": [{"object": {"mhid": "mhmovvLNsiON72F3up5CX7boQjhPmxmo2pwxfitMZmQW","name": "Aladdin","description": "A peasant with a heart of gold stumbles upon a garrulous genie, voiced by Robin Williams, who grants him wishes. With the help of the genie and a magic carpet, he sets off to impress a beautiful princess.","altId": "mhmov-aladdin","releaseDate": 722649600}},...],"pagingInfo": PAGING_INFO_OBJECT,"title": "Movies For You"},...],