# x402 Utils – Phone Number Validation & Formatting

> x402 Utils – Phone Number Validation & Formatting is a paid API for AI agents from utils.kagurazaka.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-29).

Validates a phone number, identifies its country and line type, and returns E.164, international, and national formats using libphonenumber metadata.

## Facts

- Endpoint: GET https://utils.kagurazaka.dev/v1/phone?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-utils-phone-number-validation-formatting-56ad2801
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zCu0tDT26SvBQuyu9i8is

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 x402-utils-phone-number-validation-formatting-56ad2801
```

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

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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

## Output

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

## 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"
   ],
   "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": {}
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "e164": "+16502530000",
  "type": "FIXED_LINE_OR_MOBILE",
  "valid": true,
  "country": "US",
  "national": "(650) 253-0000",
  "international": "+1 650 253 0000"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-utils-phone-number-validation-formatting-56ad2801/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from utils.kagurazaka.dev](https://www.zero.xyz/host/utils.kagurazaka.dev/llms.txt)
