{"uid":"cap_Er9JJNYFZVNb4vQs2WTas","slug":"toolrail-phone-number-validator-8f645360","name":"Toolrail Phone Number Validator","description":"Validate and format phone numbers for ~240 regions (Google libphonenumber): validity, region, line type, E.164 / international / national formats. Use when normalizing or checking phone numbers before saving a contact or sending SMS or WhatsApp.","url":"https://toolrail.dev/validate/phone?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","properties":{"phone":{"type":"string"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"e164":{"type":"string"},"type":{"type":"string"},"phone":{"type":"string"},"valid":{"type":"boolean"},"region":{"type":"string"},"international":{"type":"string"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ceuwvVg9LvzbNWm-mtidh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates and formats a phone number for ~240 regions using Google libphonenumber, returning validity, region, line type, and E.164/international/national formats","exampleAgentPrompt":"Before I save this contact, can you check if +1 (415) 555-0132 is a valid phone number, tell me whether it's a mobile or landline, and give me the E.164 and international formats?","exampleUseCases":[{"title":"Pre-send SMS validation","prompt":"I'm about to blast an SMS campaign — can you validate the number +44 7911 123456 for me, confirm it's a mobile line, and give me the properly formatted E.164 version so I don't waste credits on bad numbers?"},{"title":"CRM contact normalization","prompt":"A new lead just signed up with the phone number '0033 6 12 34 56 78' — can you validate it, figure out what country it's from, and normalize it to international format before I save it to the CRM?"},{"title":"WhatsApp reachability check","prompt":"Before I send a WhatsApp message, can you check if +55 11 91234-5678 is a valid number, what region it's in, and whether it looks like a mobile line that WhatsApp would support?"}],"resultDescription":"Returns a JSON object with: a boolean validity flag, the parsed phone number string, the region/country code (e.g. 'US', 'BR'), the line type (e.g. 'mobile', 'fixed_line'), the E.164 format (e.g. '+14155550132'), the international format (e.g. '+1 415-555-0132'), and the national format (e.g. '(415) 555-0132').","failureModes":["Invalid or unparseable phone number returns valid=false with no formatted outputs","Missing 'phone' field in request body causes validation error","Ambiguous number without country code hint may parse to wrong region","Extremely malformed strings may return an error response rather than valid=false"],"whenToPreferThis":"Choose this endpoint when you need authoritative phone number validation powered by Google libphonenumber across ~240 regions, especially when you need multiple output formats (E.164, international, national) and line-type classification in a single call. Prefer it over regex-based validation for production contact pipelines, SMS pre-send checks, or WhatsApp eligibility screening where accuracy matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T06:50:11.357Z","isFirstParty":false,"canonicalSlug":"toolrail-phone-number-validator-8f645360"}