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

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

## 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(
  'searchbug_phone_validation',
  {
    "phone": "+14155550123"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute searchbug_phone_validation --input '{
  "phone": "+14155550123"
}' --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": {
    "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 describe 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. api\_lnc2 does not return DNC or TCPA. set include\_dnc too to get both. |
| `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. DNC is "NO" or the registries the number is on, such as "FED,OH". With include\_caller\_id, Deepline also runs the Caller ID lookup (api\_cnam, 6x) and merges CNAM into the api\_lnd2 result, 9x in total. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "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. api_lnc2 does not return DNC or TCPA; set include_dnc too to get both.",
        "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. DNC is \"NO\" or the registries the number is on, such as \"FED,OH\". With include_caller_id, Deepline also runs the Caller ID lookup (api_cnam, 6x) and merges CNAM into the api_lnd2 result, 9x in total.",
        "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={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "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](https://deepline.com/docs/providers/searchbug/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.