The trending content API returns a ranked list of popular content over the last 24h which has increased in popularity the most, and is relevant to the target users interests

📘

Prerequisites

Before obtaining meaningful data from this API ensure that

  • You have you API apikey. Contact us to find out how to get access.
  • To personalise responses it is vital to capture an end user identifier as part of behaviour capture. Without such user ids, the api will be able to surface popular content across your whole user-base, but will not be able to return personalised, relevant, content.

Example Call

Querying the trending content API is as simple as making a call to the endpoint and including your apikey and a valid end user id.

Details of the request and response objects are given in Request/Response

{
  "apikey": <your apikey>,
  "max_results": 10,
  "customer_enduser_id": <end user id>
}
curl -X 'POST' \
  'https://personafinai.azurewebsites.net/v2/personalized/content/trending' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '{
  "apikey": <your apikey>,
  "max_results": 10,
  "customer_enduser_id": <end user id>
}'

The API will return a list of identifier values corresponding to content items. These can be passed into the Content Search API to retrieve the complete content item. For details on this, see the example in Content Search

Request/Response

Request Object

The API request expects the following endpoint url and body parameters

POST https://personafinai.azurewebsites.net/v2/personalized/content/trending

FieldDescription
apikey
string
Authentication key to use to retrieve data
maxresults
_int
The number of results to return
customerenduser_id
_string
Value used to identify user on target platform

Response Object

The API will respond with an object containing the following

FieldDescription
updated
datetime
Datetime that the dataset returned was last computed for the given user
dataPoints
object
List of the trending items found
dataPoints.identifier
string
The identifier assigned to a given piece of content. This can be used to retrieve content using the Content Search Endpoint
dataPoints.distribution
float
The items rank score relative to the other items
dataPoints.count
int
The volume of interactions found against the specific item

Notes

Language
Click Try It! to start a request and see the response here!