Validation Utilities

Validate Phone

Validates phone numbers against international formatting standards and returns detailed results including country code, carrier type, and validity status. Access via MCP in Cursor or Windsurf for instant validation in your workflow, or call GET /v1/validate/phone with the number parameter. Returns structured data with is_valid boolean, formatted number, and metadata like region and line type.

API Endpoint

GET /v1/validate/phone

Code Examples

curl "https://tinyfn.io/v1/validate/phone" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/validate/phone', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/validate/phone',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's validation tools:

{
  "mcpServers": {
    "tinyfn-validation": {
      "url": "https://tinyfn.io/mcp/validation",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

What phone number formats does the validation API accept?

Accepts international (+1234567890), national (123-456-7890), and raw digit formats. The validator normalizes input and checks against E.164 standards for global compatibility.

How can I validate phone numbers in my MCP-enabled editor?

Use the validate_phone tool in Cursor, Windsurf, or other MCP clients. Pass the phone number as a parameter and get instant validation with country detection and formatting suggestions.

Does phone validation work for international numbers?

Yes, validates numbers from 200+ countries using libphonenumber standards. Returns country code, region, and whether the number format is valid for that specific country.

What information does phone validation return besides validity?

Returns is_valid status, formatted E.164 number, country code, region, carrier type (mobile/landline), and possible number type. Useful for SMS routing and contact verification.

Can I validate phone numbers without an internet connection?

No, requires API call to TinyFn's validation service. The tool uses up-to-date carrier databases and number allocation tables that change frequently, so offline validation isn't reliable.

Try Validate Phone Now

Get your free API key and start using Validate Phone in seconds.

Get Free API Key