> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Unipile: List Following

> List the accounts a user follows. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

List the accounts a user follows.

> [!NOTE]
>
> Tool ID: `unipile_list_following`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'unipile_list_following',
  {
    "user_id": "user_123",
    "account_id": "123456789"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute unipile_list_following --input '{
  "user_id": "user_123",
  "account_id": "123456789"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "object": "UserRelationsList",
    "items": [
      {
        "object": "UserRelation",
        "first_name": "Jane",
        "last_name": "Doe",
        "headline": "example",
        "public_identifier": "example_123",
        "public_profile_url": "https://example.com",
        "created_at": 123,
        "member_id": "member_123",
        "member_urn": "example",
        "connection_urn": "example"
      }
    ],
    "cursor": "cursor_123"
  }
}
```

Use `deepline describe unipile_list_following --json` for the latest machine-readable contract.

## Input reference

Returns a list of all the followed accounts of an account. Ensure careful implementation of this action and consult provider limits and restrictions: [https://developer.unipile.com/docs/provider-limits-and-restrictions](https://developer.unipile.com/docs/provider-limits-and-restrictions)

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.user_id` | `string` | Yes | — | `Instagram only` The user to get the followed accounts from (provider\_id or username). |
| `payload.cursor` | `string` | No | — | A cursor for pagination purposes. To get the next page of entries, you need to make a new request and fulfill this field with the cursor received in the preceding request. This process should be repeated until all entries have been retrieved. Minimum length: 1. |
| `payload.limit` | `integer` | No | — | A limit for the number of items returned in the response. The value can be set between 1 and 1000. Minimum: 1. Maximum: 1000. |
| `payload.account_id` | `string` | Yes | — | The account to get the followed accounts from. (if user\_id is not provided) |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Returns a list of all the followed accounts of an account. Ensure careful implementation of this action and consult provider limits and restrictions: https://developer.unipile.com/docs/provider-limits-and-restrictions",
    "properties": {
      "user_id": {
        "type": "string",
        "description": "`Instagram only` The user to get the followed accounts from (provider_id or username)."
      },
      "cursor": {
        "type": "string",
        "description": "A cursor for pagination purposes. To get the next page of entries, you need to make a new request and fulfill this field with the cursor received in the preceding request. This process should be repeated until all entries have been retrieved.",
        "minLength": 1
      },
      "limit": {
        "type": "integer",
        "description": "A limit for the number of items returned in the response. The value can be set between 1 and 1000.",
        "minimum": 1,
        "maximum": 1000
      },
      "account_id": {
        "type": "string",
        "description": "The account to get the followed accounts from. (if user_id is not provided)"
      }
    },
    "required": [
      "user_id",
      "account_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.object` | `"UserRelationsList"` | Yes | — | Allowed: `UserRelationsList`. |
| `result.data.items` | `array` | Yes | — | — |
| `result.data.items[].object` | `"UserRelation"` | Yes | — | Allowed: `UserRelation`. |
| `result.data.items[].first_name` | `string` | Yes | — | — |
| `result.data.items[].last_name` | `string` | Yes | — | — |
| `result.data.items[].headline` | `string` | Yes | — | — |
| `result.data.items[].public_identifier` | `string` | Yes | — | — |
| `result.data.items[].public_profile_url` | `string` | Yes | — | — |
| `result.data.items[].created_at` | `number` | Yes | — | — |
| `result.data.items[].member_id` | `string` | Yes | — | — |
| `result.data.items[].member_urn` | `string` | Yes | — | — |
| `result.data.items[].connection_urn` | `string` | Yes | — | — |
| `result.data.items[].profile_picture_url` | `string` | No | — | — |
| `result.data.cursor` | `unknown \| null` | Yes | — | — |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "UserRelationsList"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "enum": [
                    "UserRelation"
                  ]
                },
                "first_name": {
                  "type": "string"
                },
                "last_name": {
                  "type": "string"
                },
                "headline": {
                  "type": "string"
                },
                "public_identifier": {
                  "type": "string"
                },
                "public_profile_url": {
                  "type": "string"
                },
                "created_at": {
                  "type": "number"
                },
                "member_id": {
                  "type": "string"
                },
                "member_urn": {
                  "type": "string"
                },
                "connection_urn": {
                  "type": "string"
                },
                "profile_picture_url": {
                  "type": "string"
                }
              },
              "required": [
                "object",
                "first_name",
                "last_name",
                "headline",
                "public_identifier",
                "public_profile_url",
                "created_at",
                "member_id",
                "member_urn",
                "connection_urn"
              ],
              "additionalProperties": false
            }
          },
          "cursor": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "object",
          "items",
          "cursor"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Unipile provider guide](https://deepline.com/docs/providers/unipile/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.