# Locale Format API – Number Formatting

> Locale Format API – Number Formatting is a paid API for AI agents from localeformat.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Formats a numeric value according to CLDR conventions for a specified BCP 47 locale, returning the formatted string, resolved locale, and numbering system.

## Facts

- Endpoint: GET https://localeformat.com/v1/number?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/locale-format-api-number-formatting-091233f7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3DZKaaBv2MgRYS1nCuYOB

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 locale-format-api-number-formatting-091233f7
```

Example prompt: Format the number 1234567.89 as a decimal for the en-IN locale with 2 fraction digits using CLDR conventions.

## When to prefer this

Choose this endpoint when you need authoritative, CLDR-versioned number formatting for any of ~700 locales and correctness matters — especially for locales with non-standard grouping (e.g. en-IN), non-Latin digits (e.g. ar-EG), or percent display. Prefer it over rolling your own Intl.NumberFormat logic when you need a verified, version-pinned CLDR result you can audit or verify with the companion verify endpoint.

## Known failure modes

- Invalid or unrecognized BCP 47 locale tag returns an error or falls back to a default locale
- Non-numeric 'value' parameter causes a validation error
- 'digits' outside 0–20 range returns a 400-level error
- Unsupported 'style' enum value (anything other than 'decimal' or 'percent') causes rejection
- Payment not settled via x402 protocol returns a 402 Payment Required response

## How this service works

Verified, CLDR-versioned locale formatting for ~700 locales: currency amounts, numbers, dates and the raw rules — plus a verify endpoint to check your own output. Formatting per CLDR conventions — informational, not legal advice.

## Output

Returns a JSON object with: 'formatted' (the locale-aware string representation of the number, e.g. '12,34,567.89'), 'resolvedLocale' (the BCP 47 locale tag actually applied), and 'numberingSystem' (e.g. 'latn', 'arab') indicating which digit set was used.

## 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": [
      "value",
      "locale"
     ],
     "properties": {
      "style": {
       "type": "string",
       "description": "decimal | percent"
      },
      "value": {
       "type": "number"
      },
      "digits": {
       "type": "integer",
       "description": "fixed fraction digits 0-20"
      },
      "locale": {
       "type": "string",
       "description": "BCP 47 locale tag, e.g. de-DE, de-CH, en-IN, ja-JP, ar-EG"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "formatted": "12,34,567.89",
  "resolvedLocale": "en-IN",
  "numberingSystem": "latn"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/locale-format-api-number-formatting-091233f7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from localeformat.com](https://www.zero.xyz/host/localeformat.com/llms.txt)
