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

# Ipqs Batch Phone Validate: Inputs, Cost & CLI Example

> Screen up to 100 known phone numbers for fraud and DNC risk after primary phone validation. Deepline runs at most 5 IPQS checks concurrently.

## 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=ipqs_batch_phone_validate:{"phone_batch":"{{phone_batch}}"}' --json
```

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

## Input Schema

| Name                  | Type          | Required | Default | Description                                                                                                                           |
| --------------------- | ------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.phone_batch` | `array`       | Yes      |         | Array of phone objects to validate in batch (1-100). Deepline runs at most 5 IPQS checks concurrently, so larger batches can be slow. |
| `payload.country`     | `array`       | No       |         | ISO-3166 country codes to bias lookup (e.g. \["US","CA"]).                                                                            |
| `payload.strictness`  | `0 \| 1 \| 2` | No       |         | Strictness level 0-2. Higher = more false positives but catches more fraud.                                                           |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Validate up to 100 phone numbers in one synthetic batch. Deepline runs at most 5 IPQS checks concurrently, so larger batches can be slow. 1 credit per phone.",
    "properties": {
      "phone_batch": {
        "type": "array",
        "description": "Array of phone objects to validate in batch (1-100). Deepline runs at most 5 IPQS checks concurrently, so larger batches can be slow.",
        "minItems": 1,
        "maxItems": 100,
        "items": {
          "type": "object",
          "properties": {
            "phone": {
              "type": "string",
              "description": "Phone number to validate.",
              "minLength": 1
            },
            "contact_name": {
              "type": "string",
              "description": "Optional contact name for context."
            }
          },
          "required": [
            "phone"
          ],
          "additionalProperties": false
        }
      },
      "country": {
        "type": "array",
        "description": "ISO-3166 country codes to bias lookup (e.g. [\"US\",\"CA\"]).",
        "items": {
          "type": "string",
          "minLength": 1
        }
      },
      "strictness": {
        "description": "Strictness level 0-2. Higher = more false positives but catches more fraud.",
        "anyOf": [
          {
            "type": "number",
            "const": 0
          },
          {
            "type": "number",
            "const": 1
          },
          {
            "type": "number",
            "const": 2
          }
        ]
      }
    },
    "required": [
      "phone_batch"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name            | Type     | Required | Default | Description |
| --------------- | -------- | -------- | ------- | ----------- |
| `result.status` | `string` | Yes      |         |             |
| `result.result` | `object` | Yes      |         |             |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "status": {
        "type": "string"
      },
      "result": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "phone_batch": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "valid": {
                          "type": "boolean"
                        },
                        "line_type": {
                          "type": "string"
                        },
                        "carrier": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "valid",
                        "line_type",
                        "carrier"
                      ],
                      "additionalProperties": true
                    },
                    {
                      "type": "object",
                      "properties": {
                        "valid": {
                          "type": "boolean"
                        },
                        "line_type": {
                          "type": "null"
                        },
                        "carrier": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "valid",
                        "line_type",
                        "carrier"
                      ],
                      "additionalProperties": true
                    }
                  ]
                }
              }
            },
            "required": [
              "phone_batch"
            ],
            "additionalProperties": true
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      }
    },
    "required": [
      "status",
      "result"
    ],
    "additionalProperties": true
  }
  ```
</details>

## Advanced: Direct CLI

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

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