phone

Parse, validate and canonicalize a phone number using...

Parse, validate and canonicalize a phone number using Google's libphonenumber metadata. Query: number (required; E.164 like "+14155552671" or national like "(415) 555-2671"), country (optional ISO 3166-1 alpha-2 like US/GB/JP — required when number is not E.164). Returns {input, valid (matches a real number range), possible (right shape/length), e164, national, international, rfc3966, country, countryCallingCode, type (mobile|fixed_line|fixed_line_or_mobile|toll_free|premium_rate|shared_cost|voip|personal_number|pager|uan|voicemail|unknown), possibleCountries[]}. Returns valid:false (not an error) for unparseable input.

get/api/phone/normalize

Request

  • Base URL: https://2s.io
  • URL: https://2s.io/api/phone/normalize
  • Auth: API key in header PAYMENT-SIGNATURE

Query parameters

numberstring required

Phone number to normalize. E.164 (+15555551234) or a national format if country is provided.

countrystring

ISO 3166-1 alpha-2 country code (e.g. US, GB, JP). Required when number is not in E.164 form.

trial1

Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.

Response

(unresolved $ref)

Changes

No recorded changes to this operation across all 1 revision of this API.