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

# Icypeas Email Search: Inputs, Cost & CLI Example

> Find a professional email for one person at a company and wait for the final result by default. Includes inputs, outputs, costs, and Deepline CLI examples.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=icypeas_email_search:{"domainOrCompany":"{{domainOrCompany}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                          | Type      | Required | Default | Description                                                                                                                                             |
| ----------------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.firstname`           | `string`  | No       |         | First name of the person.                                                                                                                               |
| `payload.lastname`            | `string`  | No       |         | Last name of the person.                                                                                                                                |
| `payload.domainOrCompany`     | `string`  | Yes      |         | Company domain or name (for example stripe.com).                                                                                                        |
| `payload.wait_for_completion` | `boolean` | No       | `true`  | When true, poll Icypeas until the email search finishes and return the final result.                                                                    |
| `payload.poll_interval_ms`    | `integer` | No       | `2000`  | Polling interval in milliseconds when wait\_for\_completion is true.                                                                                    |
| `payload.max_wait_ms`         | `integer` | No       | `30000` | Maximum time to wait for Icypeas to finish before returning the latest async result. Larger values are clamped to the Deepline async sync-wait ceiling. |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Find a professional email for a person at a company. Waits for the final result by default.",
    "properties": {
      "firstname": {
        "type": "string",
        "description": "First name of the person."
      },
      "lastname": {
        "type": "string",
        "description": "Last name of the person."
      },
      "domainOrCompany": {
        "type": "string",
        "description": "Company domain or name (for example stripe.com)."
      },
      "wait_for_completion": {
        "type": "boolean",
        "description": "When true, poll Icypeas until the email search finishes and return the final result.",
        "default": true
      },
      "poll_interval_ms": {
        "type": "integer",
        "description": "Polling interval in milliseconds when wait_for_completion is true.",
        "default": 2000,
        "minimum": 250,
        "maximum": 10000
      },
      "max_wait_ms": {
        "type": "integer",
        "description": "Maximum time to wait for Icypeas to finish before returning the latest async result. Larger values are clamped to the Deepline async sync-wait ceiling.",
        "default": 30000,
        "minimum": 1000,
        "maximum": 120000
      }
    },
    "required": [
      "domainOrCompany"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `record` | Yes      |         | Provider response payload.                     |
| `result.meta` | `record` | 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.",
        "additionalProperties": {}
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": {}
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute icypeas_email_search --payload '{
  "domainOrCompany": "string"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

* Pricing model: `per_result` (per result).
* Estimated Deepline credits: `0.14` per pricing unit.
* Billing mode: `post_deduct`.
