# 2s.io Phone Number Normalize

> 2s.io Phone Number Normalize is a paid API for AI agents from 2s.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Parse, validate, and canonicalize a phone number using Google's libphonenumber metadata, returning E.164, national, and international formats along with type and validity.

## Facts

- Endpoint: GET https://2s.io/api/phone/normalize
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-fe91faca
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TDZt944R83z-nIBKEQOvA

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 2s-io-fe91faca
```

Example prompt: Can you validate and normalize the phone number '(415) 555-2671' for the US — is it a real number, what's its E.164 format, and is it a mobile or landline?

## When to prefer this

Use this endpoint when you need authoritative phone number validation backed by Google's libphonenumber metadata — the gold standard for phone parsing. Prefer it over regex-based validation when you need to distinguish valid (real number range) from merely possible (right length/shape), determine the phone type (mobile vs. landline vs. VoIP), or obtain clean E.164/international/national/RFC3966 formatted output from messy user input.

## Known failure modes

- Unparseable number: returns valid:false and possible:false rather than an HTTP error
- Missing country code when number is national format: may return invalid result or fail to parse correctly
- Invalid country code provided: parsing may fail or return unexpected results
- Number outside any known range: valid:false, possible:false with empty possibleCountries
- Network/payment failure: HTTP 402 if payment not provided, HTTP 4xx/5xx on infrastructure errors

## How this service works

Parse, validate and canonicalize a phone number using Google's libphonenumber metadata. Query: number (required; E.164 like "+14155552671" or national like "(415) 555-2671"), country (optional ISO 3166-1 alpha-2 like US/GB/JP — required when number is not E.164). Returns {input, valid (matches a real number range), possible (right shape/length), e164, national, international, rfc3966, country, countryCallingCode, type (mobile|fixed_line|fixed_line_or_mobile|toll_free|premium_rate|shared_cost|voip|personal_number|pager|uan|voicemail|unknown), possibleCountries[]}. Returns valid:false (not an error) for unparseable input.

## Output

Returns a JSON object with: input (original), valid (boolean — matches a real number range), possible (boolean — right shape/length), e164 (e.g. +14155552671), national, international, rfc3966, country (ISO code), countryCallingCode, type (mobile|fixed_line|fixed_line_or_mobile|toll_free|premium_rate|shared_cost|voip|personal_number|pager|uan|voicemail|unknown), and possibleCountries[]. Returns valid:false (not an HTTP error) for unparseable input.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "number": "(415) 555-2671",
   "country": "US"
  }
 }
}
```

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "required": [
      "number"
     ],
     "properties": {
      "number": {
       "type": "string",
       "description": "Phone number, E.164 or national if country is provided."
      },
      "country": {
       "type": "string",
       "description": "ISO 3166-1 alpha-2 country code (required if number is not E.164)."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-fe91faca/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
