# Extract and validate phone numbers from text

**Use case:** 

Finds every phone number inside free text (several per line), validates them and returns clean E.164 numbers. Great for scraped contact pages and notes.

## Input

```json
{
  "phones": [
    "Call us at +33 1 40 20 50 50 or our mobile +33 6 12 34 56 78",
    "Office: +1 (202) 456-1111 / Fax: +1 202 456 2461"
  ],
  "defaultCountry": "",
  "useRowCountry": true,
  "extractFromText": true,
  "removeDuplicates": true,
  "onlyValid": false,
  "language": "en",
  "maxRows": 1000000
}
```

## Output

```json
{
  "input": {
    "label": "Input"
  },
  "valid": {
    "label": "Valid",
    "format": "boolean"
  },
  "reason": {
    "label": "Reason"
  },
  "e164": {
    "label": "E164"
  },
  "international": {
    "label": "International"
  },
  "countryName": {
    "label": "Country name"
  },
  "type": {
    "label": "Type"
  },
  "carrier": {
    "label": "Carrier"
  },
  "location": {
    "label": "Location"
  },
  "whatsappUrl": {
    "label": "Whatsapp url",
    "format": "link"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Phone Number Validator & Formatter — E.164, Type, Carrier Actor is ready to run with the inputs already set for "Extract and validate phone numbers from text". [Sign up or log in](https://console.apify.com/create-task-from-example/SVic3lC9H80g6dukn) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Extract and validate phone numbers from text" task

The Phone Number Validator & Formatter — E.164, Type, Carrier Actor will start running based on the input automatically. You can also change all the input fields, like phone numbers, use each row's country, and more, to match your specific use case.

### 3. Receive the "Extract and validate phone numbers from text" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as input, valid, reason, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Extract and validate phone numbers from text" task via API](https://apify.com/tidydata/phone-number-validator.md).

## About this Actor

This example demonstrates how to use [Phone Number Validator & Formatter — E.164, Type, Carrier](https://apify.com/tidydata/phone-number-validator.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/tidydata/phone-number-validator.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/tidydata/phone-number-validator.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
