# Locale Format API – Raw Formatting Rules

> Locale Format API – Raw Formatting Rules 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).

Returns CLDR-versioned locale formatting rules (date order, decimal/group separators, currency position, week start) for a given BCP 47 locale tag

## Facts

- Endpoint: GET https://localeformat.com/v1/rules?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-raw-formatting-rules-973e87b3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6LW_dpf7M-u3gz7sx0tme

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-raw-formatting-rules-973e87b3
```

Example prompt: What are the raw CLDR formatting rules for de-CH — things like decimal separator, grouping separator, date order, first day of week, and where the currency symbol goes?

## When to prefer this

Choose this endpoint when you need authoritative, CLDR-versioned raw formatting rules for a specific locale — especially separator characters, date order, week start day, and currency positioning — rather than pre-formatted output strings. It covers ~700 locales and is ideal for building localization logic, validating your own formatting, or bootstrapping i18n configuration for a new market.

## Known failure modes

- Invalid or unrecognized BCP 47 locale tag returns an error or falls back to a parent locale
- Missing required 'locale' query parameter returns a 400 Bad Request
- Unsupported ISO 4217 currency code may return default USD rules
- Payment not completed (402) blocks the response
- Network timeout or service unavailability returns 5xx

## 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 the resolved locale tag and raw CLDR formatting rules: date order (e.g. day-month-year), first day of week (integer, 0=Sunday), decimal separator character, group separator character, and currency position (prefix or suffix).

## 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": [
      "locale"
     ],
     "properties": {
      "locale": {
       "type": "string",
       "description": "BCP 47 locale tag, e.g. de-DE, de-CH, en-IN, ja-JP, ar-EG"
      },
      "currency": {
       "type": "string",
       "description": "optional ISO 4217 code for currency rules (default USD)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "dateOrder": "day-month-year",
  "firstDayOfWeek": 1,
  "groupSeparator": "’",
  "resolvedLocale": "de-CH",
  "currencyPosition": "prefix",
  "decimalSeparator": "."
 }
}
```

## More

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