# Toolrail Phone Number Validator

> Toolrail Phone Number Validator is a paid API for AI agents from toolrail.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-16).

Validates and formats a phone number for ~240 regions using Google libphonenumber, returning validity, region, line type, and E.164/international/national formats

## Facts

- Endpoint: POST https://toolrail.dev/validate/phone?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/toolrail-phone-number-validator-8f645360
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Er9JJNYFZVNb4vQs2WTas

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability toolrail-phone-number-validator-8f645360 -d '<json body>'
```

Example prompt: 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?

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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').

## Request schema (JSON Schema)

```json
{
 "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"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/toolrail-phone-number-validator-8f645360/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from toolrail.dev](https://www.zero.xyz/host/toolrail.dev/llms.txt)
