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

# The Swarm: Theswarm Relationships V3

> Find connected profiles and connection details matching a query. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Find connected profiles and connection details matching a query.

<Info>
  Tool ID: `theswarm_relationships_v3`
</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(
  'theswarm_relationships_v3',
  {
    "query": {}
  },
);

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

### CLI

```bash theme={null}
deepline tools execute theswarm_relationships_v3 --input '{
  "query": {}
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "items": [
      {
        "profile": {
          "full_name": "Example"
        },
        "connections": [
          {}
        ]
      }
    ],
    "count": 123,
    "total_count": 123
  }
}
```

Use `deepline tools get theswarm_relationships_v3 --json` for the latest machine-readable contract.

## Input reference

Find connected profiles with their connection details. Renamed from Network Mapper in v3.

| Name                       | Type      | Required | Default | Details                                                                                                                                                                                                       |
| -------------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.query`            | `object`  | Yes      | —       | Search query in the [ElasticSearch Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html) format. [Find mapping here](https://docs.theswarm.com/docs/mappings/profile-v2) |
| `payload.limit`            | `integer` | No       | `100`   | Limit the number of results Minimum: 0. Maximum: 1000.                                                                                                                                                        |
| `payload.pagination_token` | `string`  | No       | —       | Pagination token received in the previous response                                                                                                                                                            |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Find connected profiles with their connection details. Renamed from Network Mapper in v3.",
    "properties": {
      "query": {
        "type": "object",
        "description": "Search query in the [ElasticSearch Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html) format. [Find mapping here](https://docs.theswarm.com/docs/mappings/profile-v2)"
      },
      "limit": {
        "type": "integer",
        "description": "Limit the number of results",
        "default": 100,
        "minimum": 0,
        "maximum": 1000
      },
      "pagination_token": {
        "type": "string",
        "description": "Pagination token received in the previous response"
      }
    },
    "required": [
      "query"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name                                                                       | Type                                                                                                                                             | Required | Default | Details                                                                                                                                      |
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `result.data`                                                              | `object`                                                                                                                                         | Yes      | —       | Provider response payload.                                                                                                                   |
| `result.data.items`                                                        | `array`                                                                                                                                          | Yes      | —       | —                                                                                                                                            |
| `result.data.items[].profile`                                              | `object`                                                                                                                                         | No       | —       | —                                                                                                                                            |
| `result.data.items[].profile.id`                                           | `string`                                                                                                                                         | No       | —       | Format: `uuid`.                                                                                                                              |
| `result.data.items[].profile.full_name`                                    | `string`                                                                                                                                         | Yes      | —       | —                                                                                                                                            |
| `result.data.items[].profile.current_title`                                | `string`                                                                                                                                         | No       | —       | —                                                                                                                                            |
| `result.data.items[].profile.linkedin_url`                                 | `string`                                                                                                                                         | No       | —       | —                                                                                                                                            |
| `result.data.items[].profile.work_email`                                   | `string`                                                                                                                                         | No       | —       | —                                                                                                                                            |
| `result.data.items[].profile.current_company_name`                         | `string`                                                                                                                                         | No       | —       | —                                                                                                                                            |
| `result.data.items[].profile.current_company_website`                      | `string`                                                                                                                                         | No       | —       | —                                                                                                                                            |
| `result.data.items[].connections`                                          | `array`                                                                                                                                          | No       | —       | —                                                                                                                                            |
| `result.data.items[].connections[].connector_id`                           | `string`                                                                                                                                         | No       | —       | Format: `uuid`.                                                                                                                              |
| `result.data.items[].connections[].connector_name`                         | `string`                                                                                                                                         | No       | —       | —                                                                                                                                            |
| `result.data.items[].connections[].connector_linkedin_url`                 | `string`                                                                                                                                         | No       | —       | —                                                                                                                                            |
| `result.data.items[].connections[].connector_current_title`                | `string`                                                                                                                                         | No       | —       | —                                                                                                                                            |
| `result.data.items[].connections[].connector_current_company_name`         | `string`                                                                                                                                         | No       | —       | —                                                                                                                                            |
| `result.data.items[].connections[].connection_strength_normalized`         | `integer`                                                                                                                                        | No       | —       | —                                                                                                                                            |
| `result.data.items[].connections[].connection_strength`                    | `number`                                                                                                                                         | No       | —       | Format: `float`.                                                                                                                             |
| `result.data.items[].connections[].manual_strength`                        | `number`                                                                                                                                         | No       | —       | Format: `float`.                                                                                                                             |
| `result.data.items[].connections[].sources`                                | `array`                                                                                                                                          | No       | —       | —                                                                                                                                            |
| `result.data.items[].connections[].sources[].origin`                       | `"linkedin_connection" \| "work_overlap" \| "email_contact" \| "calendar_events" \| "manual_import" \| "education_overlap" \| "shared_investor"` | Yes      | —       | Allowed: `linkedin_connection`, `work_overlap`, `email_contact`, `calendar_events`, `manual_import`, `education_overlap`, `shared_investor`. |
| `result.data.items[].connections[].sources[].shared_company`               | `string`                                                                                                                                         | No       | —       | Name of the shared company from work overlap                                                                                                 |
| `result.data.items[].connections[].sources[].shared_company_id`            | `string`                                                                                                                                         | No       | —       | ID of the shared company from work overlap Format: `uuid`.                                                                                   |
| `result.data.items[].connections[].sources[].shared_company_website`       | `string`                                                                                                                                         | No       | —       | Website of the shared company from work overlap                                                                                              |
| `result.data.items[].connections[].sources[].shared_company_linkedin_slug` | `string`                                                                                                                                         | No       | —       | Linkedin Slug of the shared company from work overlap                                                                                        |
| `result.data.items[].connections[].sources[].overlap_start_date`           | `string`                                                                                                                                         | No       | —       | Start Date of work overlap                                                                                                                   |
| `result.data.items[].connections[].sources[].overlap_end_date`             | `string`                                                                                                                                         | No       | —       | End Date of work overlap                                                                                                                     |
| `result.data.items[].connections[].sources[].overlap_duration_months`      | `integer`                                                                                                                                        | No       | —       | Months Duration of work overlap                                                                                                              |
| `result.data.items[].connections[].sources[].shared_school`                | `string`                                                                                                                                         | No       | —       | Name of school from education overlap                                                                                                        |
| `result.data.items[].connections[].sources[].shared_major`                 | `string`                                                                                                                                         | No       | —       | Name of major from education overlap                                                                                                         |
| `result.data.items[].connections[].sources[].graduation_year`              | `string`                                                                                                                                         | No       | —       | Graduation year from education overlap                                                                                                       |
| `result.data.items[].connections[].sources[].investor`                     | `string`                                                                                                                                         | No       | —       | Name of common investor from investor overlap                                                                                                |
| `result.data.items[].connections[].sources[].portfolio_company`            | `string`                                                                                                                                         | No       | —       | Name of portfolio company from investor overlap                                                                                              |
| `result.data.count`                                                        | `integer`                                                                                                                                        | Yes      | —       | —                                                                                                                                            |
| `result.data.total_count`                                                  | `integer`                                                                                                                                        | Yes      | —       | —                                                                                                                                            |
| `result.data.pagination_token`                                             | `string`                                                                                                                                         | No       | —       | Pagination token for the next request                                                                                                        |
| `result.meta`                                                              | `object`                                                                                                                                         | No       | —       | Additional response metadata (status, paging).                                                                                               |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "profile": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "full_name": {
                      "type": "string"
                    },
                    "current_title": {
                      "type": "string"
                    },
                    "linkedin_url": {
                      "type": "string"
                    },
                    "work_email": {
                      "type": "string"
                    },
                    "current_company_name": {
                      "type": "string"
                    },
                    "current_company_website": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "full_name"
                  ],
                  "additionalProperties": false
                },
                "connections": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "connector_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "connector_name": {
                        "type": "string"
                      },
                      "connector_linkedin_url": {
                        "type": "string"
                      },
                      "connector_current_title": {
                        "type": "string"
                      },
                      "connector_current_company_name": {
                        "type": "string"
                      },
                      "connection_strength_normalized": {
                        "type": "integer"
                      },
                      "connection_strength": {
                        "type": "number",
                        "format": "float"
                      },
                      "manual_strength": {
                        "type": "number",
                        "format": "float"
                      },
                      "sources": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "description": "Source of connection, only properties that describe given source are set",
                          "properties": {
                            "origin": {
                              "type": "string",
                              "enum": [
                                "linkedin_connection",
                                "work_overlap",
                                "email_contact",
                                "calendar_events",
                                "manual_import",
                                "education_overlap",
                                "shared_investor"
                              ]
                            },
                            "shared_company": {
                              "type": "string",
                              "description": "Name of the shared company from work overlap"
                            },
                            "shared_company_id": {
                              "type": "string",
                              "description": "ID of the shared company from work overlap",
                              "format": "uuid"
                            },
                            "shared_company_website": {
                              "type": "string",
                              "description": "Website of the shared company from work overlap"
                            },
                            "shared_company_linkedin_slug": {
                              "type": "string",
                              "description": "Linkedin Slug of the shared company from work overlap"
                            },
                            "overlap_start_date": {
                              "type": "string",
                              "description": "Start Date of work overlap"
                            },
                            "overlap_end_date": {
                              "type": "string",
                              "description": "End Date of work overlap"
                            },
                            "overlap_duration_months": {
                              "type": "integer",
                              "description": "Months Duration of work overlap"
                            },
                            "shared_school": {
                              "type": "string",
                              "description": "Name of school from education overlap"
                            },
                            "shared_major": {
                              "type": "string",
                              "description": "Name of major from education overlap"
                            },
                            "graduation_year": {
                              "type": "string",
                              "description": "Graduation year from education overlap"
                            },
                            "investor": {
                              "type": "string",
                              "description": "Name of common investor from investor overlap"
                            },
                            "portfolio_company": {
                              "type": "string",
                              "description": "Name of portfolio company from investor overlap"
                            }
                          },
                          "required": [
                            "origin"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "count": {
            "type": "integer"
          },
          "total_count": {
            "type": "integer"
          },
          "pagination_token": {
            "type": "string",
            "description": "Pagination token for the next request"
          }
        },
        "required": [
          "items",
          "count",
          "total_count"
        ],
        "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

* [The Swarm provider guide](/docs/providers/theswarm/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)
