Personalized Frames Ranking API

Personalized Frames Ranking

Discover high quality Frames (casts with frames) based on your personalized social graph. This ranking follows an approach very similar to the Global Frame Rankings endpoint described in the previous section, but the difference is that we replace the global graph with a personalized graph specific to the given profile. In other words, Frames are assigned scores that are weighted linear combination of the interactions and trust scores of profiles within a given profile’s personalized (Extended network) trust graph.

Developers can choose their own preferred strategies to rank frames. For simplicity, we have provided a reasonable default parameter setting.

This is a POST request to https://graph.cast.k3l.io/frames/personalized/rankings/fids with a list of input profile FIDs and a few optional parameters that are described below.

The parameters to the API are as follows:

List of FID(s) in the request body - determines the root nodes of the personalized trust graph.

agg - determines the linear combination method where agg=rms specifies Root Mean Square, agg=sumsquare specifies Sum of Squares and agg=sum specifies a simple summation

weights - determines the relative weight of ‘likes’ to ‘casts’ to ‘recasts’. So, weights=L1C10R5 specifies that a ‘cast’ of a frame is worth 10 times as much as a ‘like’ and a ‘recast’ is worth 5 times.

offset - determines how many results to skip. offset=10 will return the 11th rank onwards

k - determines the depth of the personalized trust graph. k=2 would include profiles that are 2-degrees of separation from the given profile.

limit - determines the number of results returnedHere’s an example query:BashCopy

curl -X 'POST' \
  'https://graph.cast.k3l.io/frames/personalized/rankings/fids?agg=sumsquare&weights=L1C10R5&k=2&limit=100' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '[
  3
]'

Ranking for Handles

This is a POST request to https://graph.cast.k3l.io/frames/personalized/rankings/handles with a list of input profile Handles and a few optional parameters that are exactly the same as in the previous API. This API functions identically to the previous API with the only difference being that the input to the API is a list of handles instead of FIDs.

Here’s an example query:

curl -X 'POST' \
  'https://graph.cast.k3l.io/frames/personalized/rankings/handles?agg=rms&weights=L1C10R5&k=2&limit=100' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '[
  "dwr.eth"
]'

Last updated