Skip to main content
Version: V1

Recommendations

We've built a recommendation index into our protocol for general follow suggestions. The index jumpstarts by aggregating connections from open data sources, including Ethereum blockchain, Foundation.app, Rarible, etc. It generates a personalized "recommended addresses to follow" list for every address.

The Recommendation API is to suggest such possible connections for users. It will return a list of addresses that a, have the same followers with the searched address, or, b, have already followed or been followed by the searched address on other platforms.

You can find the step by step instructions on how to set up GraphQL client in your application and write a simple Get Recommendation query in the Read Recommendations section.

Definition

The definition of recommendations query is:

recommendations (address: String!, filter: RecommFilter, network: Network, first: Int, after: String) RecommendationResponse!

For input params:

FieldTypeDescriptionRequired/Optional
addressString!The address that you want to get recommendations forRequired
filterEnumType of connection filter.Optional. Currently supports SOCIAL.
networkNetworkThe blockchain network for the queried address.Optional. Default value is ETH.
namespaceStringThe source of the connection.Optional. Default value is CyberConnect.
firstIntThe number of entries this query should returnOptional. Default is 20 and the maximum value is 50.
afterStringAfter which index this query should beginOptional. Default value is -1.

For first and after usage, please refer to Pagination section.

For returning fields, "SUCCESS" means you have made a successful request and can then use the data. You may see "INDEXING" for recommendation results if you have put in an address that has never been queried before. In such a case, our recommendation system will run in the background to get the results prepared. You can come back to check later.

pageInfo is used to do pagination. Also, you can refer to Pagination section for more details.

There are 5 fields for each object in list:

FieldTypeDescription
addressStringThe string of recommended address
domainStringThe string of recommended address' domain name
avatarStringThe URL string of recommended address' avatar
recommendationReasonStringThe reason why we recommend this address
followerCountIntThe number of recommended address' followers

Example

This is an example of a query to fetch recommendations data that you can also test out in the Playground:

query QueryRecommendation {
recommendations(
address: "0x148d59faf10b52063071eddf4aaf63a395f2d41c"
filter: SOCIAL
network: ETH
first: 1
) {
result
data {
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
list {
address
domain
avatar
recommendationReason
followerCount
}
}
}
}
Designed by