Phone Number Validator & Formatter (libphonenumber) avatar

Phone Number Validator & Formatter (libphonenumber)

Pricing

from $0.50 / 1,000 phone number checkeds

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

Phone Number Validator & Formatter (libphonenumber)

Bulk phone number validation and formatting with libphonenumber, fully offline: valid/possible, E.164, international, national, RFC 3966, country, calling code and line type (mobile, fixed line, toll free, VoIP).

Pricing

from $0.50 / 1,000 phone number checkeds

Rating

0.0

(0)

Developer

Ailu Studio

Ailu Studio

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

15 hours ago

Last modified

Security

Limited permissions

Share

Phone Number Validator & Formatter (libphonenumber): Bulk E.164, Country and Line Type Check

Validate and format phone numbers in bulk with the same numbering-plan metadata that Google's libphonenumber uses (via libphonenumber-js with full metadata for 245 countries and territories). For every number you get: possible and valid flags, E.164, international, national and RFC 3966 (tel:) formats, ISO country, calling code, national number, extension and the line type (mobile, fixed line, toll free, premium rate, VoIP ...). Everything runs offline inside the Actor: no number is sent to any API, results are instant and the price is low. Messy input is accepted: spaces, brackets, dashes, 00 prefixes, tel: links, extensions and vanity numbers like 1-800-FLOWERS.

Use cases

  • Normalise CRM, lead and sign-up lists to E.164 before importing them into a dialer, SMS tool or WhatsApp integration.
  • Separate mobile numbers from landlines and toll-free or premium-rate numbers before an SMS campaign.
  • Detect the country of international numbers and reject impossible ones in forms and data pipelines.
  • De-duplicate contact databases where the same number is written in many formats.
  • Give AI agents a reliable, deterministic phone parser.

Input

FieldDefaultMeaning
phoneNumbers8 sample numbers (US, UK, DE, KR, toll free, invalid)Numbers to check, one per line, in any common format. Exact duplicates are checked once.
defaultCountry"US"ISO-2 country used for numbers without +/00. Leave empty to accept only international numbers.
maxItems1000Maximum numbers checked in this run.

Example: { "phoneNumbers": ["030 901820", "+33 6 12 34 56 78", "0151 23456789"], "defaultCountry": "DE" }

Output

FieldMeaning
idFirst 16 hex characters of SHA-1 of the trimmed input
inputNumber as given
isPossible, isValidLength plausible / matches an assigned number range
e164, international, national, rfc3966Formats (null when the number is not possible)
countryCode, countryCallingCode, nationalNumberISO-2 country, calling code without +, significant digits
extensionExtension when present
typeMOBILE, FIXED_LINE, FIXED_LINE_OR_MOBILE, TOLL_FREE, PREMIUM_RATE, SHARED_COST, VOIP, PERSONAL_NUMBER, PAGER, UAN, VOICEMAIL or null
carrierAlways null (see below)
errorNull for valid numbers, otherwise the reason
fetchedAtTime of the check

Sample row:

{
"id": "9ca97103e6592409", "input": "+44 7400 123456", "isPossible": true, "isValid": true,
"e164": "+447400123456", "international": "+44 7400 123456", "national": "07400 123456", "rfc3966": "tel:+447400123456",
"countryCode": "GB", "countryCallingCode": "44", "nationalNumber": "7400123456", "extension": null,
"type": "MOBILE", "carrier": null, "error": null, "fetchedAt": "2026-11-04T11:45:00.000Z"
}

How it works and limits

  • Parsing, validation and formatting use libphonenumber-js (MIT) with its max metadata, which includes the per-type number patterns needed for line-type detection. The metadata ships with the Actor build; numbering-plan changes appear when the Actor is rebuilt with a newer library version.
  • No network requests at all: privacy-friendly (numbers never leave the run) and instant (thousands of numbers per second).
  • isValid means the number belongs to an assigned range, not that it is in service or reachable. There is no HLR/live lookup.
  • carrier is always null: carrier names are not available offline and numbers can be ported between carriers.
  • In countries where mobile and fixed numbers share ranges (US, Canada) the type is FIXED_LINE_OR_MOBILE.
  • Text with several numbers in one line is not split; pass one number per line.

Pricing

Pay per result: $0.50 per 1,000 rows (result event). Platform usage is billed separately by Apify. Removed/free rows are not charged.

Not affiliated with Google or the libphonenumber project. Uses the open-source libphonenumber-js library (MIT licence) and its bundled metadata, which is derived from Google's libphonenumber (Apache License 2.0); no external API is called. Data licence/terms: https://gitlab.com/catamphetamine/libphonenumber-js. You are responsible for having a lawful basis to process the numbers you check (GDPR, TCPA and similar rules).

FAQ

Why is (415) 555-2671 valid? It is in an assigned US area code and has the right length. Validation is based on numbering plans; it does not call the number.

My number without + is invalid. Why? It is read as a number of defaultCountry. Set the right country or write it in international format.

Can it tell me the carrier or whether the line is active? No, that needs a paid live lookup (HLR/LNP). This Actor is the cheap first step that cleans and classifies numbers.

Does it support extensions and vanity numbers? Yes: ext. 123, x55, ;ext=12 in tel: URIs and letters such as 1-800-FLOWERS are handled.