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

# Leadmagic Email Validation: Inputs, Cost & CLI Example

> Validate an email address for deliverability and retrieve associated company information. 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=leadmagic_email_validation:{"email":"{{email}}"}' --json
```

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

## Input Schema

| Name                 | Type     | Required | Default | Description                          |
| -------------------- | -------- | -------- | ------- | ------------------------------------ |
| `payload.email`      | `string` | Yes      |         | Email address to validate.           |
| `payload.first_name` | `string` | No       |         | First name of the person (optional). |
| `payload.last_name`  | `string` | No       |         | Last name of the person (optional).  |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Validate an email address for deliverability and retrieve associated company information.",
    "properties": {
      "email": {
        "type": "string",
        "description": "Email address to validate."
      },
      "first_name": {
        "type": "string",
        "description": "First name of the person (optional)."
      },
      "last_name": {
        "type": "string",
        "description": "Last name of the person (optional)."
      }
    },
    "required": [
      "email"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `object` | Yes      |         | Provider response payload.                     |
| `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": {
          "email": {
            "type": "string"
          },
          "email_status": {
            "type": "string",
            "enum": [
              "valid",
              "valid_catch_all",
              "invalid",
              "unknown",
              "catch_all"
            ]
          },
          "message": {
            "type": "string"
          },
          "is_domain_catch_all": {
            "type": "boolean"
          },
          "mx_record": {
            "type": "string"
          },
          "mx_provider": {
            "type": "string"
          },
          "mx_security_gateway": {
            "type": "boolean"
          },
          "company_name": {
            "type": "string"
          },
          "company_industry": {
            "type": "string"
          },
          "company_size": {
            "type": "string"
          },
          "company_founded": {
            "type": "integer"
          },
          "company_type": {
            "type": "string"
          },
          "company_linkedin_url": {
            "type": "string"
          },
          "company_linkedin_id": {
            "type": "string"
          },
          "company_facebook_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_twitter_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_location": {
            "type": "object",
            "description": "Geographic location information",
            "properties": {
              "name": {
                "type": "string"
              },
              "locality": {
                "type": "string"
              },
              "region": {
                "type": "string"
              },
              "metro": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "continent": {
                "type": "string"
              },
              "street_address": {
                "type": "string"
              },
              "address_line_2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "type": "string"
              },
              "geo": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "email",
          "email_status"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

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

```bash theme={null}
deepline tools execute leadmagic_email_validation --payload '{
  "email": "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.09` per pricing unit.
* Billing mode: `post_deduct`.
