Text real mobiles. Skip the landlines.
Run each number through validate_phone to get E.164 format and its number-plan line type, then run phone_to_carrier on the ones you plan to text to confirm the live carrier and real line type. Only text numbers that come back as mobile and that have opted in.
Two checks, cheap one first
- / 01
Collect consent first
Texting needs the person's permission in most places. Only check numbers you have a right to message. Ravn checks the number; it does not grant consent.
- / 02
Validate and format
Run validate_phone with the number and, if it has no country code, the
country. You get the E.164 form, the national form, whether it is valid and the number-plan line type. - / 03
Drop the obvious
Remove invalid numbers. Remove numbers the plan marks as landline or toll_free if you only send SMS.
- / 04
Confirm the real line type
The number-plan type tells you what range a number was issued in, not where it lives today; ported numbers can differ. validate_phone says
carrier_checked: falsefor this reason. Run phone_to_carrier on what is left to get the live carrier and the real line type. It runs on your own Twilio key (connect it withravn keys add twilio; no key returns 403provider_key_required). - / 05
Store the result
Save the E.164 number, line type and the date you checked. Re-check before a big campaign, since numbers get ported and reassigned.
Commands
# Step 1: number-plan check for a whole file (lookups)
npx ravn enrich phones.csv --tool validate_phone --column Phone --out phones-valid.csv
# Step 2: live carrier check, only on rows you kept (one lookup each, on your own Twilio key)
npx ravn enrich phones-keep.csv --tool phone_to_carrier --column Phone --out phones-carrier.csv
# Single number over REST
curl https://api.askravn.com/v1/tools/validate_phone \
-H "Authorization: Bearer $RAVN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone": "(415) 555-0132", "country": "US"}'
curl https://api.askravn.com/v1/tools/phone_to_carrier \
-H "Authorization: Bearer $RAVN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone": "+14155550132"}'
# In Claude
Check these numbers with Ravn validate_phone. Drop invalid ones and anything
the number plan says is landline or toll-free. Then tell me how many lookups
phone_to_carrier would use on the rest, and wait for my go-ahead.One lookup per check; carrier on your own Twilio key
validate_phone is one of our own checks: one lookup per number, no provider key needed. phone_to_carrier also uses one lookup per number, and runs on your own Twilio key, which bills you for the live carrier check.
Worked example: you have 1,500 opted-in numbers. validate_phone on all of them takes 1,500 lookups, well inside the 10,000 lookups a month the plan includes. Say 700 are invalid, landline or toll-free and you drop them. Running phone_to_carrier on the remaining 800 takes another 800 lookups, against your Twilio key; running it on all 1,500 would have cost 1,500, which is why the number-plan check goes first.
See the phone validation API for every field and pricing for plans.
Before you reach out. Contact people only where you have a lawful basis, honour every opt-out, and never use this data for credit, employment, insurance or housing decisions (FCRA uses are forbidden by our terms). People who opt out at our opt-out page are never returned again. The full rules are on the compliance page.
Why is the line type from validate_phone not enough?
It comes from the number plan, which tells you the range a number was first issued in. Numbers get ported between carriers and line types, so a number in a mobile range may now be VoIP or a landline. phone_to_carrier checks the live carrier.
Does validate_phone need a country?
Only when the number has no country code. Pass a country so a national number like (415) 555-0132 can be parsed and returned in E.164 form.
Can I find a mobile number for a person?
linkedin_to_mobile_phone returns a mobile on your own People Data Labs key, at one lookup per person, and only returns confirmed mobiles when carrier checks are on. You still need consent before you text.
More in use cases
Every page uses the same account, plan and tools. See pricing →