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

# Searchbug: Actions/phone Validation

> Validate a US or Canadian phone number before outbound by checking connection status, line type, carrier, portability, and available DNC/TCPA signals.

Validate a US or Canadian phone number before outbound by checking connection status, line type, carrier, portability, and available DNC/TCPA signals.

<Info>
  Tool ID: `searchbug_phone_validation`
</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(
  'searchbug_phone_validation',
  {
    "phone": "+14155550123"
  },
);

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

### CLI

```bash theme={null}
deepline tools execute searchbug_phone_validation --input '{
  "phone": "+14155550123"
}' --json
```

## Example response

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

```json theme={null}
{
  "data": {
    "Status": "example",
    "Data": {
      "PHONE": {
        "NUMBER": "example",
        "NUMBER2": "example",
        "STATUS": "example",
        "DNC": "example",
        "TCPA": "example",
        "TYPE": "example",
        "VOIP": "example",
        "CARRIER": "example",
        "PORTED": "example",
        "STATE": "California",
        "LOCATION": "example",
        "TIMEZONE": "America/New_York"
      }
    },
    "Error": null
  }
}
```

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

## Input reference

Validate a US or Canadian phone number for connection status, line type, carrier, portability, and DNC/TCPA signals.

| Name                        | Type      | Required | Default | Details                                                                                                                                                                                                                |
| --------------------------- | --------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.phone`             | `string`  | Yes      | —       | US or Canadian phone number to validate. Minimum length: 1.                                                                                                                                                            |
| `payload.ref`               | `string`  | No       | —       | Optional client reference for usage tracking. Minimum length: 1. Maximum length: 100.                                                                                                                                  |
| `payload.include_caller_id` | `boolean` | No       | `false` | Also return the Caller ID (CNAM) name on the line. Uses api\_lnc2 and costs 7x the Standard Phone ID baseline instead of 1.5x.                                                                                         |
| `payload.include_dnc`       | `boolean` | No       | `false` | Also return Do Not Call registry and TCPA litigator signals. Uses api\_lnd2 and costs 3x the Standard Phone ID baseline instead of 1.5x. Ignored when include\_caller\_id is set, since api\_lnc2 already carries DNC. |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Validate a US or Canadian phone number for connection status, line type, carrier, portability, and DNC/TCPA signals.",
    "properties": {
      "phone": {
        "type": "string",
        "description": "US or Canadian phone number to validate.",
        "minLength": 1
      },
      "ref": {
        "type": "string",
        "description": "Optional client reference for usage tracking.",
        "minLength": 1,
        "maxLength": 100
      },
      "include_caller_id": {
        "type": "boolean",
        "description": "Also return the Caller ID (CNAM) name on the line. Uses api_lnc2 and costs 7x the Standard Phone ID baseline instead of 1.5x.",
        "default": false
      },
      "include_dnc": {
        "type": "boolean",
        "description": "Also return Do Not Call registry and TCPA litigator signals. Uses api_lnd2 and costs 3x the Standard Phone ID baseline instead of 1.5x. Ignored when include_caller_id is set, since api_lnc2 already carries DNC.",
        "default": false
      }
    },
    "required": [
      "phone"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name                              | Type     | Required | Default | Details |
| --------------------------------- | -------- | -------- | ------- | ------- |
| `result.data`                     | `object` | Yes      | —       | —       |
| `result.data.Status`              | `string` | Yes      | —       | —       |
| `result.data.Data`                | `object` | Yes      | —       | —       |
| `result.data.Data.PHONE`          | `object` | Yes      | —       | —       |
| `result.data.Data.PHONE.NUMBER`   | `string` | Yes      | —       | —       |
| `result.data.Data.PHONE.NUMBER2`  | `string` | Yes      | —       | —       |
| `result.data.Data.PHONE.STATUS`   | `string` | Yes      | —       | —       |
| `result.data.Data.PHONE.DNC`      | `string` | Yes      | —       | —       |
| `result.data.Data.PHONE.TCPA`     | `string` | Yes      | —       | —       |
| `result.data.Data.PHONE.TYPE`     | `string` | Yes      | —       | —       |
| `result.data.Data.PHONE.VOIP`     | `string` | Yes      | —       | —       |
| `result.data.Data.PHONE.CARRIER`  | `string` | Yes      | —       | —       |
| `result.data.Data.PHONE.PORTED`   | `string` | Yes      | —       | —       |
| `result.data.Data.PHONE.STATE`    | `string` | Yes      | —       | —       |
| `result.data.Data.PHONE.LOCATION` | `string` | Yes      | —       | —       |
| `result.data.Data.PHONE.TIMEZONE` | `string` | Yes      | —       | —       |
| `result.data.Error`               | `null`   | Yes      | —       | —       |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "data": {
        "type": "object",
        "properties": {
          "Status": {
            "type": "string"
          },
          "Data": {
            "type": "object",
            "properties": {
              "PHONE": {
                "type": "object",
                "properties": {
                  "NUMBER": {
                    "type": "string"
                  },
                  "NUMBER2": {
                    "type": "string"
                  },
                  "STATUS": {
                    "type": "string"
                  },
                  "DNC": {
                    "type": "string"
                  },
                  "TCPA": {
                    "type": "string"
                  },
                  "TYPE": {
                    "type": "string"
                  },
                  "VOIP": {
                    "type": "string"
                  },
                  "CARRIER": {
                    "type": "string"
                  },
                  "PORTED": {
                    "type": "string"
                  },
                  "STATE": {
                    "type": "string"
                  },
                  "LOCATION": {
                    "type": "string"
                  },
                  "TIMEZONE": {
                    "type": "string"
                  }
                },
                "required": [
                  "NUMBER",
                  "NUMBER2",
                  "STATUS",
                  "DNC",
                  "TCPA",
                  "TYPE",
                  "VOIP",
                  "CARRIER",
                  "PORTED",
                  "STATE",
                  "LOCATION",
                  "TIMEZONE"
                ],
                "additionalProperties": true
              }
            },
            "required": [
              "PHONE"
            ],
            "additionalProperties": true
          },
          "Error": {
            "type": "null"
          }
        },
        "required": [
          "Status",
          "Data",
          "Error"
        ],
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": true
  }
  ```
</details>

## Deepline cost

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

## Related documentation

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