Classifies a phone number as mobile, landline, VoIP, toll-free, premium-rate and so on from numbering-plan data, with a validity check.
curl -X POST "https://api.primaryapi.com/v1/run/phone.number_type" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone_number":"+14155552671"}'{
"output": {
"found": true,
"data": {
"valid": "<boolean>",
"live": "<boolean>",
"phoneNumber": "<string>",
"numberType": "<string>", …
}
},
"credits": 1
}Input and output
2 fields
country. For example +14155552671.6 fields
Good to know
An invalid number is still a result.
Unparseable input is rejected with HTTP 400 and no charge.
More from Phone. Same key, same credits.
The same key and credits work for every API.