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

> Find people in your Affinity network who share work history with a target person, strongest first. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Find people in your Affinity network who share work history with a target person, strongest first.

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

## 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(
  'affinity_v2_inferred_connections_coworkers_get',
  {
    "filter": "example"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute affinity_v2_inferred_connections_coworkers_get --input '{
  "filter": "example"
}' --json
```

## Example response

The static output schema lacks the details for a reliable example. Use `deepline describe 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={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "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={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "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](https://deepline.com/docs/providers/affinity/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.