> For the complete documentation index, see [llms.txt](https://relationlabs.gitbook.io/relation-one-api/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-one-api/api/recommendation.md).

# Recommendation

## <mark style="color:blue;">GET</mark> /api/v1/recommend

* Note: The recommendation engine recommends potential friends to users based on whom they follow on twitter, users' on-chain transactions on the Ethereum blockchain, the NFTs they hold, and whom they are following at this moment.
* Header

| Field         | Type   | Remarks                                                                                           |
| ------------- | ------ | ------------------------------------------------------------------------------------------------- |
| ApiKey        | String | [ApiKey](/relation-one-api/guide/glossary.md#apikey) acquired from the admin                      |
| Authorization | String | Bearer ${unifiedAuthToken} , in which the unifiedAuthToken is the result returned by /api/v1/auth |

* Request Parameters

| Field  | Type   | Remarks                                                                                            |
| ------ | ------ | -------------------------------------------------------------------------------------------------- |
| limit  | int    | Query limit (up to 100)                                                                            |
| cursor | string | 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/recommend?cursor=a604fdd8e80142dfaf07af11096d5150&limit=10' \
--header 'Authorization: Bearer ey1JhbGciOiJFUzI1NiJ9.eyJqdGkiOiIyYzAzYTMwZGY4NjY0Mjk5OWZlMDcwODhh1MzVhNGU0YiIsImlzcyI6InJlbGF0aW9ubGFicy5haSIsImlhdCI6MTY2MTQwNTQxOSwic3ViIjoiYmFmMzQta2lhYWEtYWFhYWstYWNnamEtY2FpIiwiZXhwIjoxNjYyMDEwMjE5fQ.1EVbUxmtVCm6aEVZtEAji1KuCM1dsZEOMExcYvT-GdKrHRQ1qzyghXsNZSdSDUAwoSe9jGV48_1zdi2Rlrylw3Q' \
--header 'ApiKey: <ApiKey>'
```

* Response Parameters

| Field | Type              | Remarks            |
| ----- | ----------------- | ------------------ |
| code  | String            | the Return Code    |
| desc  | String            | the Return Message |
| data  | RecommendResponse | the Data           |

The RecommendResponse field consists of the following subfields:

| Field  | Type                 | Remarks           |
| ------ | -------------------- | ----------------- |
| cursor | String               | the cursor        |
| list   | List\[RecommendUser] | list of followers |

The RecommendUser field consists of the following subfields:

| Field           | Type    | Remarks                                                                                                                        |
| --------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
| relationId      | String  | User's relationId                                                                                                              |
| name            | String  | User name                                                                                                                      |
| avatar          | String  | User's avatar                                                                                                                  |
| recommendReason | String  | Reason for recommendation:Following on twitterCounterparty on ethereumHolder of ${nft name}Followed by ${followingUser's name} |
| following       | boolean | Following or not: true for following; false for not                                                                            |

* Response Body

```json
{
    "code": "0",
    "desc": "success",
    "data": {
        "cursor": "a8728c5910a04c94b70e18694d72cbb0",
        "list": [
            {
                "relationId": "aoafg-eqaaa-aaaaj-afena-cai",
                "name": "test_user",
                "avatar": "https://3fypb-gqaaa-aaaag-aaedq-cai.ic1.io/avatar/nft/eth/0xed5af388653567af2f388e6224dc7c4b3241c544/1.jpg",
                "recommendReason": "Holder of Azuki",
                "following": false
            },
            ...
        ]
    }
}
```

* Return Code

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://relationlabs.gitbook.io/relation-one-api/api/recommendation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
