> ## 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.

# Affinity: V2 Inferred Connections Coworkers Get

> Get Coworker Inferred Connections. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Get Coworker Inferred Connections.

<Info>
  Tool ID: `affinity_v2_inferred_connections_coworkers_get`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'affinity_v2_inferred_connections_coworkers_get',
  {
    "filter": "example"
  },
);

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

### CLI

```bash theme={null}
deepline tools execute affinity_v2_inferred_connections_coworkers_get --input '{
  "filter": "example"
}' --json
```

## Example response

The static output schema is not detailed enough to generate a reliable example. Use `deepline tools get affinity_v2_inferred_connections_coworkers_get --json` for the complete live contract.

## Input reference

\| ⚠️ This endpoint is currently in BETA | |--| Returns inferred connections based on shared work history, grouped by the target person, strongest first. A connection is the belief that a `source` (a person in your Affinity data, with an `id`, whom you know) might know a `target` (a person not in your Affinity data, described only, whom you want to know), because the two had overlapping employment at a shared company. The same target can be reachable through several people you know. Connections are grouped by target: each item in `data` is one target together with the `connections` to them. Within a target, connections are ordered strongest first; targets are ordered by their strongest connection, strongest first. Each `target` carries the company they work at **today** in `target.currentCompany`: the company at which they are a potential contact now, which is not necessarily the shared See the live schema below for the complete notes.

| Name                 | Type      | Required | Default | Details                                                                                                                                                                                                                                                      |
| -------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `payload.filter`     | `string`  | Yes      | —       | Filter options. At least one filter is required; the only currently supported filter is `target.currentCompany.id`, which narrows the targets to the one company the `target` person currently works at. Filtering on more than one company returns a `400`. |
| `payload.cursor`     | `string`  | No       | —       | Cursor for the next or previous page                                                                                                                                                                                                                         |
| `payload.limit`      | `integer` | No       | `20`    | Number of targets to include in the page Format: `int32`. Minimum: 1. Maximum: 50.                                                                                                                                                                           |
| `payload.totalCount` | `boolean` | No       | `false` | Include total count of the collection in the pagination response                                                                                                                                                                                             |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "| ⚠️ This endpoint is currently in BETA | |--| Returns inferred connections based on shared work history, grouped by the target person, strongest first. A connection is the belief that a `source` (a person in your Affinity data, with an `id`, whom you know) might know a `target` (a person not in your Affinity data, described only, whom you want to know), because the two had overlapping employment at a shared company. The same target can be reachable through several people you know. Connections are grouped by target: each item in `data` is one target together with the `connections` to them. Within a target, connections are ordered strongest first; targets are ordered by their strongest connection, strongest first. Each `target` carries the company they work at **today** in `target.currentCompany`: the company at which they are a potential contact now, which is not necessarily the shared employer behind the connection. The `filter` parameter is required and must contain at least one filter. The only currently supported filter is `target.currentCompany.id`, which narrows the targets to a single such company. ## Filters | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `target.currentCompany.id` | `integer` | The id of the company the `target` person currently works at. Must reference a single company; filtering on more than one (e.g. `target.currentCompany.id = 1 \\| target.currentCompany.id = 2`) returns a `400`. | `=` | `target.currentCompany.id = 123` |",
    "properties": {
      "filter": {
        "type": "string",
        "description": "Filter options. At least one filter is required; the only currently supported filter is `target.currentCompany.id`, which narrows the targets to the one company the `target` person currently works at. Filtering on more than one company returns a `400`."
      },
      "cursor": {
        "type": "string",
        "description": "Cursor for the next or previous page"
      },
      "limit": {
        "type": "integer",
        "description": "Number of targets to include in the page",
        "default": 20,
        "minimum": 1,
        "maximum": 50,
        "format": "int32"
      },
      "totalCount": {
        "type": "boolean",
        "description": "Include total count of the collection in the pagination response",
        "default": false
      }
    },
    "required": [
      "filter"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name                                                               | Type             | Required | Default | Details                                                 |
| ------------------------------------------------------------------ | ---------------- | -------- | ------- | ------------------------------------------------------- |
| `result.data`                                                      | `object`         | Yes      | —       | —                                                       |
| `result.data.data`                                                 | `array`          | Yes      | —       | Maximum items: 50.                                      |
| `result.data.data[].target`                                        | `object`         | Yes      | —       | —                                                       |
| `result.data.data[].target.fullName`                               | `string \| null` | Yes      | —       | —                                                       |
| `result.data.data[].target.linkedinUrl`                            | `string \| null` | Yes      | —       | —                                                       |
| `result.data.data[].target.currentCompany`                         | `object`         | Yes      | —       | —                                                       |
| `result.data.data[].target.currentCompany.id`                      | `integer`        | Yes      | —       | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.data[].target.currentCompany.name`                    | `string \| null` | Yes      | —       | —                                                       |
| `result.data.data[].target.currentCompany.domain`                  | `string \| null` | Yes      | —       | —                                                       |
| `result.data.data[].connections`                                   | `array`          | Yes      | —       | Minimum items: 1. Maximum items: 50.                    |
| `result.data.data[].connections[].source`                          | `object`         | Yes      | —       | —                                                       |
| `result.data.data[].connections[].source.id`                       | `integer`        | Yes      | —       | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.data[].connections[].source.firstName`                | `string \| null` | Yes      | —       | —                                                       |
| `result.data.data[].connections[].source.lastName`                 | `string \| null` | Yes      | —       | —                                                       |
| `result.data.data[].connections[].source.primaryEmailAddress`      | `string \| null` | Yes      | —       | Format: `email`.                                        |
| `result.data.data[].connections[].inference`                       | `object`         | Yes      | —       | —                                                       |
| `result.data.data[].connections[].inference.sharedEmployer`        | `object`         | Yes      | —       | —                                                       |
| `result.data.data[].connections[].inference.sharedEmployer.id`     | `integer`        | Yes      | —       | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.data[].connections[].inference.sharedEmployer.name`   | `string \| null` | Yes      | —       | —                                                       |
| `result.data.data[].connections[].inference.sharedEmployer.domain` | `string \| null` | Yes      | —       | —                                                       |
| `result.data.data[].connections[].inference.overlapStartDate`      | `string`         | Yes      | —       | Format: `date`.                                         |
| `result.data.data[].connections[].inference.overlapEndDate`        | `string`         | Yes      | —       | Format: `date`.                                         |
| `result.data.pagination`                                           | `object`         | Yes      | —       | —                                                       |
| `result.data.pagination.prevUrl`                                   | `string \| null` | No       | —       | Format: `uri`.                                          |
| `result.data.pagination.nextUrl`                                   | `string \| null` | No       | —       | Format: `uri`.                                          |
| `result.meta`                                                      | `object`         | No       | —       | —                                                       |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "data": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "object",
              "properties": {
                "target": {
                  "type": "object",
                  "properties": {
                    "fullName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "linkedinUrl": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "currentCompany": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991,
                          "format": "int64"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "domain": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "domain"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "fullName",
                    "title",
                    "linkedinUrl",
                    "currentCompany"
                  ],
                  "additionalProperties": false
                },
                "connections": {
                  "type": "array",
                  "minItems": 1,
                  "maxItems": 50,
                  "items": {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 9007199254740991,
                            "format": "int64"
                          },
                          "firstName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "lastName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "primaryEmailAddress": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "email"
                          }
                        },
                        "required": [
                          "id",
                          "firstName",
                          "lastName",
                          "primaryEmailAddress"
                        ],
                        "additionalProperties": false
                      },
                      "inference": {
                        "type": "object",
                        "properties": {
                          "sharedEmployer": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 9007199254740991,
                                "format": "int64"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "domain": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "domain"
                            ],
                            "additionalProperties": false
                          },
                          "overlapStartDate": {
                            "type": "string",
                            "format": "date"
                          },
                          "overlapEndDate": {
                            "type": "string",
                            "format": "date"
                          }
                        },
                        "required": [
                          "sharedEmployer",
                          "overlapStartDate",
                          "overlapEndDate"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "source",
                      "inference"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "target",
                "connections"
              ],
              "additionalProperties": false
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "prevUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              },
              "nextUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "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

* [Affinity provider guide](/docs/providers/affinity/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
