Phone Number Validator & Formatter (offline, libphonenumber) avatar

Phone Number Validator & Formatter (offline, libphonenumber)

Pricing

$0.40 / 1,000 number validated

Go to Apify Store
Phone Number Validator & Formatter (offline, libphonenumber)

Phone Number Validator & Formatter (offline, libphonenumber)

Phone validation and formatting: validates and normalizes phone numbers to E.164 using libphonenumber's numbering-plan data: possible/valid, region, number type, time zones and standard formats. Fully offline: no carrier, messaging-app or owner lookups, and no number leaves the run.

Pricing

$0.40 / 1,000 number validated

Rating

0.0

(0)

Developer

WrenTools

WrenTools

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

18 days ago

Last modified

Features

Limited permissions

Share

Phone Number Validator & Formatter (offline, private)

Validate and normalize phone numbers in bulk without sending them anywhere. The Actor uses the numbering-plan data of Google's libphonenumber to tell you whether each number is possible and valid, which country it belongs to, what kind of number it is, and how to write it in E.164, international and national format.

No carrier lookup, no messaging-app probe, no owner lookup: the numbers you submit never leave the run.

See it run: our video Clean Up and Validate Phone Numbers in a Spreadsheet: E.164, Possible vs Valid runs this Actor on a made-up sign-up sheet where everyone typed their number their own way, and shows what the default country, possible vs valid and E.164 mean for each number. The written version shows five traps a regex and a CSV hide in phone validation, with the code, and Why Python phonenumbers can't tell a US mobile from a landline explains why US numbers come back FIXED_LINE_OR_MOBILE. We made the video; its narration is a synthetic voice. The same clean-up from a script, on a sample sign-up sheet: a Python example.

What you get

  • E.164 normalization (+442079460958) from any common input (020 7946 0958, (415) 555-0132, 1-800-FLOWERS)
  • Possible vs valid: a number can have the right length but sit outside any assigned range; both are reported
  • Region and country code (GB, 44), number type by plan range (MOBILE, FIXED_LINE, TOLL_FREE, VOIP, PREMIUM_RATE ...), and the time zones the range is used in
  • A named reason for every failure: empty, too-short, too-short-after-idd, too-long, invalid-length, invalid-country-code, not-a-number, not-in-numbering-plan

When to use it

  • Cleaning CRM, sign-up or order data before import, deduplication or SMS sending
  • Normalizing numbers collected in many countries and formats into one column
  • Removing duplicate contacts whose numbers were typed in different ways: run them through this Actor, then remove the duplicates on its e164 field with our Merge & Dedup Datasets
  • Any workflow where sending customer numbers to a third-party lookup service is not acceptable

What it cannot tell you: whether a number is currently in service, who owns it, or which carrier it was ported to. Those need live network lookups, which this Actor deliberately does not do.

Mobile or landline, in the US and Canada: numberType is FIXED_LINE_OR_MOBILE for every valid number in the US, Canada, Puerto Rico, Guam, the US Virgin Islands and the Northern Mariana Islands. Their numbering plan uses the same ranges for both, so nothing in the number itself separates them, and no offline check can. Mexico, Chile, the Dominican Republic and Denmark return it for most numbers too. If you need mobiles only in those countries, this Actor cannot filter them for you.

Input

FieldTypeDefaultNotes
phoneNumbersarray of strings(required)Up to 200,000 per run.
defaultRegionstringUSISO 3166 code for numbers written without +country.

Output

{"input": "020 7946 0958", "isPossible": true, "isValid": true, "e164": "+442079460958",
"international": "+44 20 7946 0958", "national": "020 7946 0958", "regionCode": "GB", "countryCode": 44,
"numberType": "FIXED_LINE", "timeZones": ["Europe/London"], "error": null}

Pricing

Pay per event, no start fee:

EventPricePer 1,000
number-validated$0.0004$0.40

Support

Report problems in the Issues tab. We aim to respond within a few days.