Phone Number Validator & Formatter: Bulk E.164, Line Type
Pricing
from $0.28 / 1,000 phone number validateds
Phone Number Validator & Formatter: Bulk E.164, Line Type
Phone number validator in bulk, offline: format, country and line type (mobile, landline, VoIP, toll-free) to E.164, with duplicate detection. No WhatsApp lookups, no external services.
Pricing
from $0.28 / 1,000 phone number validateds
Rating
0.0
(0)
Developer
LYFE Offshore
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
2 months ago
Last modified
Features
Share
Bulk phone number validator and formatter: converts each number to E.164, finds its country and line type (mobile, landline, VoIP, toll-free), flags duplicates, and gives a reason for every number that fails. It decides from numbering plans, offline, not from calling anyone or looking anything up.
One list, before and after
Real output of a local run, default country NL, one row given its country (DE) explicitly:
| Input | E.164 | Country | Type / reason | |
|---|---|---|---|---|
+31 6 12345678 | +31612345678 | NL | MOBILE | |
06-12345678 | +31612345678 | NL | MOBILE | duplicate of row 0 |
(0)20 794 0800 | +31207940800 | NL | FIXED_LINE | |
+297 565 1234 | +2975651234 | AW | MOBILE | |
+599 9 518 1234 | +59995181234 | CW | MOBILE | |
+599 717 8123 | +5997178123 | BQ | FIXED_LINE | |
+1 (415) 555-2671 | +14155552671 | US | FIXED_LINE_OR_MOBILE | |
+44 20 7946 0958 | +442079460958 | GB | FIXED_LINE | |
030 123456789 (row country DE) | +4930123456789 | DE | FIXED_LINE | |
+55 11 91234-5678 | +5511912345678 | BR | MOBILE | |
+1 800 555 0199 | +18005550199 | US | TOLL_FREE | |
call me maybe | — | — | NOT_A_NUMBER | |
12345 | — | NL | NOT_IN_PLAN |
14 numbers: 12 valid, 2 invalid, 2 duplicates. The run also writes a SUMMARY record with
counts by line type, country and failure reason.
What it does
- Parses any common way of writing a number: spaces, dashes, brackets,
(0)trunk digits,00prefixes, extensions (ext. 22). - Returns
valid,possible,e164,international,national,country,countryCallingCode,type,extension. - Line types:
MOBILE,FIXED_LINE,FIXED_LINE_OR_MOBILE,VOIP,TOLL_FREE,PREMIUM_RATE,SHARED_COST,PERSONAL_NUMBER,PAGER,UAN,VOICEMAIL,UNKNOWN. - For numbers that fail:
reasonCode(NOT_A_NUMBER,TOO_SHORT,TOO_LONG,INVALID_LENGTH,INVALID_COUNTRY,NOT_IN_PLAN,EMPTY) and a plain-languagereason. - Flags repeats: a second row with the same E.164 gets
duplicateOf: <row of the first>. - Per-row country: give objects a
countryfield and national-format numbers are read in that country;defaultCountrycovers the rest. - Input as a list, as objects (
phoneField,countryField), or as a dataset ID from another Actor. Objects keep their original fields underinput.
Runs entirely offline from the numbering-plan data bundled with the Actor (libphonenumber-js, MIT). No external service, no proxy, nothing that can break because a website changed.
What it does not do
It does not tell you whether a number is in use, reachable, or on WhatsApp. "Valid" means
the number fits the country's numbering plan: right length, a prefix the plan allocates. A
valid number can still be unassigned, disconnected or a fictional range
(+1 800 555 0199 above passes; it is a film-style number).
- No carrier or city. The bundled data does not include carrier or geographic names, so those fields are not returned rather than guessed.
- North America cannot split mobile from landline. Those numbers come back as
FIXED_LINE_OR_MOBILE, because the plan itself does not distinguish them. - Caribbean. Aruba (+297), Curaçao and Bonaire (+599) are known and validated, and the
country split works (
CWvsBQ; Sint Maarten resolves toSXunder +1 721). The line-type labels follow the published plans, which lag reality there. TreatFIXED_LINEvsMOBILEon +599 as a hint, not a fact. An old-style+599 3 123 4567is reported asTOO_LONG. - Type is the plan's view. Number portability and prefix re-use mean the real line type can differ.
- Numbers without a
+countrycode and with no country given fail withINVALID_COUNTRYinstead of being guessed.
Input example
{"phoneNumbers": ["+31 6 12345678","06-12345678","+1 (415) 555-2671",{ "phone": "030 123456789", "country": "DE" },"call me maybe"],"defaultCountry": "NL","outputMode": "all"}
Plain strings, or objects with the number in phoneField (default phone) and an optional two-letter country
in countryField (default country). inputDatasetId reads the rows from another Actor's dataset.
Output example
One row per number. A real row from a local run of the input above:
{"original": "030 123456789","valid": true,"possible": true,"e164": "+4930123456789","international": "+49 30 123456789","national": "030 123456789","country": "DE","countryCallingCode": 49,"type": "FIXED_LINE","extension": null,"reason": null,"duplicateOf": null,"row": 3,"input": { "phone": "030 123456789", "country": "DE" }}
| Field | Meaning |
|---|---|
original | The number as submitted |
valid | Fits the country's numbering plan (length and allocated prefix) |
possible | Has a possible length for the country, a weaker test than valid |
e164 | Normalised +<country code><number>, or null when it cannot be parsed |
international / national | Formatted for display |
country / countryCallingCode | ISO country code and calling code |
type | Line type from the plan (MOBILE, FIXED_LINE, FIXED_LINE_OR_MOBILE, VOIP, TOLL_FREE, ...) |
extension | Extension, if the input had one |
reason / reasonCode | Why the number failed (reasonCode only on invalid rows) |
duplicateOf | Row index of the first row with the same E.164, or null |
row | Position in the input |
input | The original object, for object rows |
The SUMMARY record in the key-value store counts valid, invalid and duplicate numbers, by line type, country and
failure reason.
Price
Price per 1,000 by your Apify plan (Apify applies the right column automatically):
| Free | Starter | Scale | Business and up | |
|---|---|---|---|---|
| Phone number validated, per 1,000 | $0.40 | $0.40 | $0.34 | $0.28 |
No start fee. The figures below use the Free-plan price; on a paid plan the same run costs less.
Pay per event, platform usage included: $0.0004 per number (number-validated), no start fee.
| Numbers in one run | Cost |
|---|---|
| 1,000 | $0.40 |
| 10,000 | $4.00 |
| 100,000 | $40.00 |
Every non-empty row is billed, including invalid numbers and duplicates, and in both output modes
(outputMode: "valid-only" only hides rows). Empty values are skipped and free. A run capped with a maximum charge
processes only as many numbers as the cap affords, and says so in the log.
Use it from code or an AI agent
curl -X POST "https://api.apify.com/v2/acts/lyfe_tools~phone-number-validator-offline/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"phoneNumbers": ["+31 6 12345678", "06-12345678"], "defaultCountry": "NL"}'
The response is the dataset rows as a JSON array. The Actor also works through the Apify MCP server
(https://mcp.apify.com), so AI agents such as Claude or Cursor can call it as a tool: an agent sends
phoneNumbers and defaultCountry and reads valid, e164, type and reason.
FAQ
How do I convert phone numbers to E.164 in bulk?
Paste them in phoneNumbers and set defaultCountry for numbers written without +country. Each row comes back
with e164, international and national.
Can it tell mobile from landline?
Yes, from the numbering plan (type), except in North America, where the plan does not separate them and the
answer is FIXED_LINE_OR_MOBILE. Ported numbers can differ from the plan.
Does it check whether a number is active or on WhatsApp? No. "Valid" means the number fits the plan, not that it is in use.
Does it return the carrier or city? No; the bundled data has neither, so those fields are left out rather than guessed.
Does it remove duplicate phone numbers?
It flags them: a repeat of the same E.164 gets duplicateOf pointing at the first row. Filter on
duplicateOf: null to keep one of each.
Cleaning an email list as well? See the sibling Email List Cleaner.
Questions or a number that looks wrong: tools@lyfeoffshore.com.