phone_validate
Validate and parse phone numbers worldwide, returning validity, E.164, national format, country code, and line type. Add a country hint for local numbers without a country prefix.
Instructions
Phone Number Validation — Parse and validate any phone number worldwide using libphonenumber. Returns is_valid, e164 (canonical international format e.g. '+4917612345678'), national_format, country_code (ISO alpha-2), and line_type (MOBILE/FIXED_LINE/VOIP/TOLL_FREE). Provide country_code hint (e.g. 'DE') for local numbers without country prefix. Cost: $0.0045 USDC per call. Latency p99: 50ms.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phone | Yes | Phone number to validate. Can be in any format: E.164 ('+4915123456789'), national ('015123456789'), or international ('0049 151 23456789'). Include country code (+ prefix) for best results. | |
| country_code | No | ISO 3166-1 alpha-2 country code hint for parsing national numbers without country prefix (e.g. 'DE' for Germany, 'US' for United States). Optional if number includes country code (+...). |