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

# Lemlist: Get Contact Sourcing

> Get Contact Sourcing Run. Includes SDK V2 and CLI requests, input constraints, response fields, and Deepline credit cost.

Get Contact Sourcing Run.

<Info>
  Tool ID: `lemlist_get_contact_sourcing`
</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(
  'lemlist_get_contact_sourcing',
  {
    "runId": "run_123",
    "companyId": "company_123"
  },
);

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

### CLI

```bash theme={null}
deepline tools execute lemlist_get_contact_sourcing --input '{
  "runId": "run_123",
  "companyId": "company_123"
}' --json
```

## Example response

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

```json theme={null}
{
  "data": {
    "runId": "run_123",
    "companyId": "company_123",
    "status": "pending"
  }
}
```

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

## Input reference

Reads one contact-sourcing run — by its own id, or the latest run of an account. The HTTP status carries the run state: `200` the run completed and `contacts` is filled, `202` the run is still queued or going (poll again), `400` the run failed and `error` says why, `404` no such run. Exactly one of `runId` or `companyId` is required.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.runId` | `string` | No | — | The run to read, as returned by `POST /contact-sourcing`. |
| `payload.companyId` | `string` | No | — | Read the LATEST run of this account instead (`cpn_xxx` format). |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Reads one contact-sourcing run — by its own id, or the latest run of an account. The HTTP status carries the run state: `200` the run completed and `contacts` is filled, `202` the run is still queued or going (poll again), `400` the run failed and `error` says why, `404` no such run. Exactly one of `runId` or `companyId` is required.",
    "properties": {
      "runId": {
        "type": "string",
        "description": "The run to read, as returned by `POST /contact-sourcing`."
      },
      "companyId": {
        "type": "string",
        "description": "Read the LATEST run of this account instead (`cpn_xxx` format)."
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.runId` | `string` | No | — | — |
| `result.data.companyId` | `string` | No | — | — |
| `result.data.status` | `"pending" \| "running" \| "completed" \| "failed"` | No | — | Allowed: `pending`, `running`, `completed`, `failed`. |
| `result.data.ranAt` | `string` | No | — | Format: `date-time`. |
| `result.data.completedAt` | `string` | No | — | Format: `date-time`. |
| `result.data.reasoning` | `string` | No | — | The AI's read-out of the account — why it picked these people, or found nobody. |
| `result.data.error` | `string` | No | — | Only on a failed run. |
| `result.data.contacts` | `array` | No | — | — |
| `result.data.contacts[].leadId` | `string` | No | — | People-Database id. Pass it to `POST /contact-sourcing/contacts` to add this person as a contact. |
| `result.data.contacts[].role` | `"decision_maker" \| "user" \| "influencer"` | No | — | Allowed: `decision_maker`, `user`, `influencer`. |
| `result.data.contacts[].fitScore` | `number` | No | — | How well the person matches the team's ICP, 0-100. |
| `result.data.contacts[].reasoning` | `string` | No | — | — |
| `result.data.contacts[].fullName` | `string` | No | — | — |
| `result.data.contacts[].jobTitle` | `string` | No | — | — |
| `result.data.contacts[].linkedinUrl` | `string` | No | — | — |
| `result.data.contacts[].country` | `string` | No | — | — |
| `result.data.contacts[].companyName` | `string` | No | — | The person's CURRENT employer, which is not always the account classified. |
| `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": {
          "runId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "completed",
              "failed"
            ]
          },
          "ranAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "reasoning": {
            "type": "string",
            "description": "The AI's read-out of the account — why it picked these people, or found nobody."
          },
          "error": {
            "type": "string",
            "description": "Only on a failed run."
          },
          "contacts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "leadId": {
                  "type": "string",
                  "description": "People-Database id. Pass it to `POST /contact-sourcing/contacts` to add this person as a contact."
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "decision_maker",
                    "user",
                    "influencer"
                  ]
                },
                "fitScore": {
                  "type": "number",
                  "description": "How well the person matches the team's ICP, 0-100."
                },
                "reasoning": {
                  "type": "string"
                },
                "fullName": {
                  "type": "string"
                },
                "jobTitle": {
                  "type": "string"
                },
                "linkedinUrl": {
                  "type": "string"
                },
                "country": {
                  "type": "string"
                },
                "companyName": {
                  "type": "string",
                  "description": "The person's CURRENT employer, which is not always the account classified."
                }
              },
              "additionalProperties": false
            }
          }
        },
        "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

* [Lemlist provider guide](/docs/providers/lemlist/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)


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