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

# BetterContact: Enrich

> Find a contact's work email and phone number from their name and company or LinkedIn URL. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Find a contact's work email and phone number from their name and company or LinkedIn URL.

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

## 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(
  'bettercontact_enrich',
  {
    "first_name": "Jane",
    "last_name": "Doe"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute bettercontact_enrich --input '{
  "first_name": "Jane",
  "last_name": "Doe"
}' --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": {
    "success": true,
    "id": "id_123",
    "message": "Example message"
  }
}
```

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

## Input reference

Submit one contact for BetterContact async enrichment. Use bettercontact\_get\_result with the returned request id to retrieve terminal results.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.first_name` | `string` | Yes | — | Contact first name. Minimum length: 1. |
| `payload.last_name` | `string` | Yes | — | Contact last name. Minimum length: 1. |
| `payload.company` | `string` | No | — | Legacy company identifier preserved for migration compatibility. Minimum length: 1. |
| `payload.company_domain` | `string` | No | — | Company domain, for example acme.com. Minimum length: 1. |
| `payload.linkedin_url` | `string` | No | — | Optional LinkedIn profile URL. Minimum length: 1. |
| `payload.custom_fields` | `object` | No | — | Optional identifiers echoed by BetterContact in enrichment results. |
| `payload.enrich_phone_number` | `boolean` | No | `false` | When true, BetterContact also attempts mobile phone enrichment. |
| `payload.enrich_email_address` | `boolean` | No | `true` | Deprecated legacy flag preserved for contract compatibility. |
| `payload.wait_for_completion` | `boolean` | No | `true` | When true or omitted, wait for the BetterContact job to finish and return terminal rows. Set false to return only the async launcher response, then poll bettercontact\_get\_result with the returned request id. |
| `payload.poll_interval_ms` | `integer` | No | `2000` | Polling interval used while wait\_for\_completion is true. Defaults to 2000 ms. Minimum: 250. Maximum: 10000. |
| `payload.max_wait_ms` | `integer` | No | `30000` | Maximum time to wait for a terminal BetterContact result. Defaults to 30000 ms. larger values are clamped to the 30000 ms Deepline async sync-wait ceiling, so a slower job still returns status "running" with a pollable request id rather than blocking past the client read timeout. Minimum: 1000. Maximum: 120000. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Submit one contact for BetterContact async enrichment. Use bettercontact_get_result with the returned request id to retrieve terminal results.",
    "properties": {
      "first_name": {
        "type": "string",
        "description": "Contact first name.",
        "minLength": 1
      },
      "last_name": {
        "type": "string",
        "description": "Contact last name.",
        "minLength": 1
      },
      "company": {
        "type": "string",
        "description": "Legacy company identifier preserved for migration compatibility.",
        "minLength": 1
      },
      "company_domain": {
        "type": "string",
        "description": "Company domain, for example acme.com.",
        "minLength": 1
      },
      "linkedin_url": {
        "type": "string",
        "description": "Optional LinkedIn profile URL.",
        "minLength": 1
      },
      "custom_fields": {
        "type": "object",
        "description": "Optional identifiers echoed by BetterContact in enrichment results.",
        "additionalProperties": true
      },
      "enrich_phone_number": {
        "type": "boolean",
        "description": "When true, BetterContact also attempts mobile phone enrichment.",
        "default": false
      },
      "enrich_email_address": {
        "type": "boolean",
        "description": "Deprecated legacy flag preserved for contract compatibility.",
        "default": true
      },
      "wait_for_completion": {
        "type": "boolean",
        "description": "When true or omitted, wait for the BetterContact job to finish and return terminal rows. Set false to return only the async launcher response, then poll bettercontact_get_result with the returned request id.",
        "default": true
      },
      "poll_interval_ms": {
        "type": "integer",
        "description": "Polling interval used while wait_for_completion is true. Defaults to 2000 ms.",
        "default": 2000,
        "minimum": 250,
        "maximum": 10000
      },
      "max_wait_ms": {
        "type": "integer",
        "description": "Maximum time to wait for a terminal BetterContact result. Defaults to 30000 ms; larger values are clamped to the 30000 ms Deepline async sync-wait ceiling, so a slower job still returns status \"running\" with a pollable request id rather than blocking past the client read timeout.",
        "default": 30000,
        "minimum": 1000,
        "maximum": 120000
      }
    },
    "required": [
      "first_name",
      "last_name"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.success` | `boolean` | No | — | — |
| `result.data.id` | `string` | No | — | — |
| `result.data.message` | `string` | No | — | — |
| `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": {
          "success": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `per_result` (per result).
* Estimated Deepline credits: `0.69` per pricing unit.

## Related documentation

* [BetterContact provider guide](https://deepline.com/docs/providers/bettercontact/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.