# Phone Number Validation & Normalization (libphonenumber)

> Phone Number Validation & Normalization (libphonenumber) is a paid API for AI agents from api.aventtech.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-10).

Validates and normalizes international phone numbers using libphonenumber, returning validity, country, E.164 format, national/international formats, and line type.

## Facts

- Endpoint: GET https://api.aventtech.com/validate/phone?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/phone-number-validation-normalization-libphonenumber-21389954
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_u_RViSb0ch40EM_N-PSG9

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 phone-number-validation-normalization-libphonenumber-21389954
```

Example prompt: Can you check whether +1 (415) 555-0198 is a valid phone number, tell me its E.164 format, what country it's from, and whether it's a mobile or landline?

## When to prefer this

Use this endpoint when you need authoritative, library-grade phone number validation backed by Google's libphonenumber — the industry-standard parser trusted by major platforms. Prefer it over regex-only validators when you need line type detection, E.164 normalization, or reliable country identification across international formats.

## Known failure modes

- Missing 'number' query parameter returns a 400 error
- Unparseable or gibberish input returns invalid=true with no country or format data
- Ambiguous national-format number without a 'country' hint may fail to resolve correctly
- Very new or unusual number ranges may not be recognized by the underlying libphonenumber library
- Payment not included or rejected returns a 402 Payment Required response

## How this service works

International phone number validation and normalization (libphonenumber): validity, country, E.164, national/international formats and line type.

## Output

Returns a structured object including: whether the phone number is valid, the parsed country (ISO code and name), the E.164 canonical form (e.g. +14155550198), the national format, the international format, and the line type (mobile, landline, VoIP, toll-free, etc.).

## 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": "Phone number, any common format"
      },
      "country": {
       "type": "string",
       "description": "Optional ISO 3166-1 alpha-2 default country for national-format input"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "e164": "+302101234567",
  "type": "fixed_line",
  "valid": true,
  "country": "GR"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/phone-number-validation-normalization-libphonenumber-21389954/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.aventtech.com](https://www.zero.xyz/host/api.aventtech.com/llms.txt)
