Skip to content

Validate a number with GET /phone/details

The standard lookup: the request, every field it answers with, and what it costs.

Last updated

GET /phone/details validates one number and returns its country, line type, carrier and network, place, time zones and disposable flag. It costs 1 credit.

Request#

bash
curl --get "https://api.phone-check.app/phone/details" \
  --data-urlencode "phone=+14155552671" \
  -H "x-api-key: $API_KEY"
ParameterInNotes
phonequery, requiredInternational format (+ and the country code) or a 10-digit NANP number; 6 to 20 characters
x-api-keyheader, requiredYour workspace API key

Response#

Only valid is always present; read every other field defensively (for example phone.carrier ?? ''). An answer looks like this (the reference's example values):

json
{
  "number": "+14155552671",
  "valid": true,
  "country": "US",
  "callingCode": "1",
  "nationalNumber": "4155552671",
  "type": "MOBILE",
  "isDisposable": false,
  "carrier": "T-Mobile",
  "geo": "San Francisco, CA",
  "timezones": ["America/Los_Angeles"]
}
FieldMeaning
numberThe number as looked up: digits and a leading +
validWhether the number is a valid, assignable number in its country
countryISO 3166-1 alpha-2 country, such as US
callingCodeCountry calling code, without +
nationalNumberThe number without its calling code
typeLine type: MOBILE, FIXED_LINE, FIXED_LINE_OR_MOBILE, VOIP, TOLL_FREE, PAGER and others
isDisposableThe number is a known disposable or temporary number
carrierOperator of the number range
matchedCarriersOperators sharing the range when it can't be narrowed to one carrier
networkThe carrier's mobile network identity, when it holds network codes: brand, operator, mcc, mnc and plmn
geoPlace of the number range
timezonesIANA time zones of the number range

Good to know#

  • An invalid number is still an answer: 200 with valid: false, and it spends its credit.
  • A phone shorter than 6 or longer than 20 characters is rejected with 400 before any lookup.
  • Need the operating carrier or exchange data for US numbers? See Carrier context with GET /phone/extra-details.

The full schema is in the API reference (opens another site).

Was this helpful?

Still need help?