Recommended profiles

📘

Full code example

https://github.com/lens-protocol/api-examples/blob/master/src/profile/recommended-profiles.ts

The API right now has basic ways to get popular profiles. It does not support a paging list as of yet. The API will undergo continuous improvement to ensure that it is returning profiles that are more relevant to the user using machine learning. By using this API you inherit all improvements without needing to change code.

API details

query RecommendedProfiles {
  recommendedProfiles {
        id
      name
      bio
      attributes {
        displayType
        traitType
        key
        value
      }
        followNftAddress
      metadata
      isDefault
      picture {
        ... on NftImage {
          contractAddress
          tokenId
          uri
          verified
        }
        ... on MediaSet {
          original {
            url
            mimeType
          }
        }
        __typename
      }
      handle
      coverPicture {
        ... on NftImage {
          contractAddress
          tokenId
          uri
          verified
        }
        ... on MediaSet {
          original {
            url
            mimeType
          }
        }
        __typename
      }
      ownedBy
      dispatcher {
        address
        canUseRelay
      }
      stats {
        totalFollowers
        totalFollowing
        totalPosts
        totalComments
        totalMirrors
        totalPublications
        totalCollects
      }
      followModule {
        ... on FeeFollowModuleSettings {
          type
          amount {
            asset {
              symbol
              name
              decimals
              address
            }
            value
          }
          recipient
        }
        ... on ProfileFollowModuleSettings {
         type
        }
        ... on RevertFollowModuleSettings {
         type
        }
      }
  }
}
{
  "data": {
    "recommendedProfiles": [
      {
        "id": "0x11",
        "name": null,
        "bio": null,
        "attributes": [
          {
            "displayType": null,
            "traitType": null,
            "key": "custom_field",
            "value": "yes this is custom"
          }
        ],
        "followNftAddress": null,
        "metadata": "ipfs://QmSfyMcnh1wnJHrAWCBjZHapTS859oNSsuDFiAPPdAHgHP",
        "isDefault": false,
        "picture": null,
        "handle": "hh",
        "coverPicture": null,
        "ownedBy": "0x5905232b8ea73f1F2FCBE4297573733bf41b666d",
        "dispatcher": null,
        "stats": {
          "totalFollowers": 2,
          "totalFollowing": 0,
          "totalPosts": 4,
          "totalComments": 0,
          "totalMirrors": 0,
          "totalPublications": 4,
          "totalCollects": 0
        },
        "followModule": null
      },
      {
        "id": "0x14",
        "name": null,
        "bio": null,
        "location": null,
        "website": null,
        "twitter": null,
        "attributes": [
          {
            "displayType": null,
            "traitType": null,
            "key": "custom_field",
            "value": "yes this is custom"
          }
        ],
        "followNftAddress": null,
        "metadata": "ipfs://QmSfyMcnh1wnJHrAWCBjZHapTS859oNSsuDFiAPPdAHgHP",
        "isDefault": false,
        "picture": null,
        "handle": "lucasaave",
        "coverPicture": null,
        "ownedBy": "0x7953FE8b8cC7c6391683353aE016B9D90f072767",
        "depatcher": null,
        "stats": {
          "totalFollowers": 2,
          "totalFollowing": 0,
          "totalPosts": 0,
          "totalComments": 5,
          "totalMirrors": 0,
          "totalPublications": 5,
          "totalCollects": 0
        },
        "followModule": null
      },
      {
        "id": "0x06",
        "name": null,
        "bio": null,
        "attributes": [
          {
            "displayType": null,
            "traitType": null,
            "key": "custom_field",
            "value": "yes this is custom"
          }
        ],
        "followNftAddress": null,
        "metadata": "ipfs://QmSfyMcnh1wnJHrAWCBjZHapTS859oNSsuDFiAPPdAHgHP",
        "isDefault": false,
        "picture": null,
        "handle": "lucas",
        "coverPicture": null,
        "ownedBy": "0x6ea7c12CbB8480236716d1EEB0B31C2950166F3B",
        "dispatcher": null,
        "stats": {
          "totalFollowers": 2,
          "totalFollowing": 0,
          "totalPosts": 2,
          "totalComments": 1,
          "totalMirrors": 1,
          "totalPublications": 4,
          "totalCollects": 0
        },
        "followModule": null
      },
      {
        "id": "0x13",
        "name": null,
        "bio": null,
        "attributes": [
          {
            "displayType": null,
            "traitType": null,
            "key": "custom_field",
            "value": "yes this is custom"
          }
        ],
        "followNftAddress": null,
        "metadata": "ipfs://QmSfyMcnh1wnJHrAWCBjZHapTS859oNSsuDFiAPPdAHgHP",
        "isDefault": false,
        "picture": null,
        "handle": "pawelprofile",
        "coverPicture": null,
        "ownedBy": "0xb19C2890cf947AD3f0b7d7E5A9ffBce36d3f9bd2",
        "dispatcher": null,
        "stats": {
          "totalFollowers": 2,
          "totalFollowing": 8,
          "totalPosts": 3,
          "totalComments": 1,
          "totalMirrors": 0,
          "totalPublications": 4,
          "totalCollects": 0
        },
        "followModule": null
      },
      {
        "id": "0x01",
        "name": null,
        "bio": null,
        "attributes": [
          {
            "displayType": null,
            "traitType": null,
            "key": "custom_field",
            "value": "yes this is custom"
          }
        ],
        "followNftAddress": null,
        "metadata": "ipfs://QmSfyMcnh1wnJHrAWCBjZHapTS859oNSsuDFiAPPdAHgHP",
        "isDefault": false,
        "picture": null,
        "handle": "hey",
        "coverPicture": null,
        "ownedBy": "0xD020E01C0c90Ab005A01482d34B808874345FD82",
        "dispatcher": null,
        "stats": {
          "totalFollowers": 2,
          "totalFollowing": 1,
          "totalPosts": 1,
          "totalComments": 0,
          "totalMirrors": 0,
          "totalPublications": 1,
          "totalCollects": 0
        },
        "followModule": null
      }
    ]
  }
}
type Query { 
    recommendedProfiles: [Profile!]!
}