{"uid":"cap_zCu0tDT26SvBQuyu9i8is","slug":"x402-utils-phone-number-validation-formatting-56ad2801","name":"x402 Utils – Phone Number Validation & Formatting","description":"Check whether a phone number is valid and possible, find its country and type (mobile, fixed line, toll free and others), and format it as E.164, international and national (libphonenumber metadata).","url":"https://utils.kagurazaka.dev/v1/phone?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["number"],"properties":{"number":{"type":"string","description":"the phone number, international (+81 3-1234-5678) or national with country"},"country":{"type":"string","description":"ISO country code for national numbers, such as JP"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"e164":{},"type":{},"valid":{},"country":{},"national":{},"international":{}}}}}}},"responseSchema":{"type":"json","example":{"e164":"+16502530000","type":"FIXED_LINE_OR_MOBILE","valid":true,"country":"US","national":"(650) 253-0000","international":"+1 650 253 0000"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_fPvkdum_D6j3h_7pgtvwb","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates a phone number, identifies its country and line type, and returns E.164, international, and national formats using libphonenumber metadata.","exampleAgentPrompt":"Can you check if +1 650 253-0000 is a valid phone number, tell me what country and type it is (mobile, landline, etc.), and give me its E.164 and international formats?","exampleUseCases":[{"title":"Validate user-submitted phone number","prompt":"A user just signed up with the phone number '06-1234-5678' and said they're from Japan — can you validate it, tell me if it's actually possible, and give me the E.164 version to store in our database?"},{"title":"Identify phone number type and country","prompt":"I have this number +447911123456 — is it a mobile or landline, and which country does it belong to?"},{"title":"Format number for international dialing","prompt":"I need to call someone at '(212) 555-0182' in the US — can you format that as a proper international number and E.164 so I can pass it to our dialer?"}],"resultDescription":"A JSON object containing: whether the number is valid (boolean), the E.164 formatted string (e.g. '+16502530000'), the international format (e.g. '+1 650 253 0000'), the national format (e.g. '(650) 253-0000'), the ISO country code (e.g. 'US'), and the line type (e.g. 'FIXED_LINE_OR_MOBILE', 'MOBILE', 'TOLL_FREE').","failureModes":["Invalid or unparseable phone number — returns valid: false with no formatted outputs","Missing required 'number' query parameter — likely 4xx error","National number provided without ISO country code — may fail or return incorrect results","Number that is syntactically valid but not assigned — may return valid: false"],"whenToPreferThis":"Choose this endpoint when you need authoritative phone number validation and formatting using libphonenumber — the industry-standard library used by Google — especially when you need E.164 normalization for storage, need to determine line type (mobile vs. landline vs. toll-free), or need to identify the country of a number. Prefer over regex-based validation when correctness and type classification matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T12:32:52.473Z","isFirstParty":false,"canonicalSlug":"x402-utils-phone-number-validation-formatting-56ad2801"}