> For the complete documentation index, see [llms.txt](https://relationlabs.gitbook.io/relation-graph/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://relationlabs.gitbook.io/relation-graph/api/multi-dimensional-recommendation.md).

# Multi-dimensional Recommendation

## <mark style="color:blue;">GET</mark> /api/v1/multi-dimensional-recommendation

* Through this API, you will receive a recommendation list: data (users) that have some association with the user (not 1-degree). This data is calculated by Relation based on the user's authorized social data and relationship graph, including but not limited to:
  * Having mutual friends
  * Interacted with the same contract
  * Holding the same NFT
  * Following the same users
  * Users with the same followers
* Header

| Field  | Type   | Required | Remarks                                                                                           |
| ------ | ------ | -------- | ------------------------------------------------------------------------------------------------- |
| ApiKey | String | true     | [ApiKey](/relation-graph/api/multi-dimensional-recommendation.md) obtained from the administrator |

* Request Parameters

| Field           | Type    | Required | Remarks                                                                                            |
| --------------- | ------- | -------- | -------------------------------------------------------------------------------------------------- |
| address         | String  | fasle    | EOA Address                                                                                        |
| twitterUsername | String  | fasle    | twitter username                                                                                   |
| steamId         | String  | fasle    | steamId                                                                                            |
| limit           | Integer | true     | Query limit (up to 100)                                                                            |
| cursor          | String  | true     | Cursor data returned by last page. If it is empty, it means the caller is querying the first page. |

* Request Example

```shell
curl  GET 'https://api.relationlabs.ai/api/v1/multiDimensionalRecommendation?address=0x9bd286ef4e3d9ec1af6c6ae9da2f0b3617deab13&limit=10&cursor=a1228c5910a04c94b70e18694d72cbb0' \
--header 'ApiKey: <ApiKey>'
```

* Response Parameters

| Field | Type   | Remarks        |
| ----- | ------ | -------------- |
| code  | String | Return code    |
| desc  | String | Return message |
| data  | List   | Data           |

The UserInfo field consists of the following subfields:

| Field       | Type     | Remarks                   |
| ----------- | -------- | ------------------------- |
| relationId  | Relation | Relation information      |
| address     | List     | Address list              |
| twitter     | Twitter  | Twitter information       |
| steam       | Steam    | Steam information         |
| description | String   | Reason for recommendation |

* Response Body

```json
{
  "code": "0",
  "desc": "success",
  "data": {
    "cursor": "a8728c5910a04c94b70e18694d72cbb0",
    "list": [
      {
        "address": [],
        "relation": {
          "relationId": "d4swz-zaaaa-aaaaj-at5fa-cai",
          "name": "test_user",
          "avatar": "https://3fypb-gqaaa-aaaag-aaedq-cai.ic1.io/nft/eth/relation-test-club/16.png"
        },
        "twitter": {
          "username": "VitalikButerin",
          "name": "vitalik.eth",
          "avatar": "https://pbs.twimg.com/profile_images/977496875887558661/L86xyLF4_400x400.jpg"
        },
        "steam": {
          "steamId": "178691028912",
          "name": "vitalik",
          "avatar": "https://pbs.twimg.com/profile_images/977496875887558661/L86xyLF4_400x400.jpg"
        },
        "description": "Followed by marutti.eth, sha256111 and 24 others you follow"
      }
    ]
  }
}
```

* Return Code

| code | desc    | Remarks                           |
| ---- | ------- | --------------------------------- |
| 0    | success | the flag for a successful request |
