# Locale Format API – Currency Formatting

> Locale Format API – Currency 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-13).

Formats a numeric amount as a locale-correct currency string (e.g. '1.234,56 €') using CLDR/ICU data for ~700 locales, returning the formatted string plus structural formatting rules.

## Facts

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

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-currency-formatting-8374f8b4
```

Example prompt: Can you format 1234.56 EUR for a German audience (de-DE locale) using the standard currency symbol, and tell me how the thousands separator, decimal, and symbol position should look?

## When to prefer this

Choose this endpoint when you need authoritative, CLDR-versioned locale-aware currency formatting — especially when correctness of grouping separators, decimal separators, and currency symbol placement matters for a specific locale. Prefer it over rolling your own Intl.NumberFormat logic when you need the CLDR version pinned for auditability, or when you need the structural formatting rules (not just the string) to build your own renderer. It covers ~700 locales including right-to-left and non-Latin scripts.

## Known failure modes

- Unsupported or malformed BCP 47 locale tag returns an error or falls back to a default resolved locale
- Invalid ISO 4217 currency code causes a formatting error
- Missing required query parameters (amount, currency, locale) result in a 400-level error
- Amount using comma as decimal separator instead of period may be misinterpreted — input must use '.' as decimal
- Edge cases like very large numbers or negative amounts may behave unexpectedly depending on CLDR rules for that locale

## 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

A JSON object containing: 'formatted' (the fully locale-correct currency string, e.g. '1.234,56 €'), 'resolvedLocale' (the actual locale applied), 'parts' (structural rules: fractionDigits, groupSeparator, decimalSeparator, symbolPosition), and 'source' (CLDR/ICU/Node version string for auditability).

## 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": [
      "amount",
      "currency",
      "locale"
     ],
     "properties": {
      "amount": {
       "type": "number",
       "description": "amount (use '.' as decimal separator in input)"
      },
      "locale": {
       "type": "string",
       "description": "BCP 47 locale tag, e.g. de-DE, de-CH, en-IN, ja-JP, ar-EG"
      },
      "display": {
       "type": "string",
       "description": "symbol | narrowSymbol | code | name (default symbol)"
      },
      "currency": {
       "type": "string",
       "description": "ISO 4217 code, e.g. EUR, CHF, JPY"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "parts": {
   "fractionDigits": 2,
   "groupSeparator": ".",
   "symbolPosition": "suffix",
   "decimalSeparator": ","
  },
  "source": "CLDR 48.0 / ICU 78.2 / Node 22",
  "formatted": "1.234,56 €",
  "resolvedLocale": "de-DE"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/locale-format-api-currency-formatting-8374f8b4/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)
