# Locale Format API – Datetime Formatter

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

Formats an ISO 8601 date or datetime string into a locale-aware display string for ~700 CLDR locales, with optional timezone, date style, and time style controls.

## Facts

- Endpoint: GET https://localeformat.com/v1/datetime?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/locale-format-api-datetime-formatter-fb25504c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_W2xX9qWy-7tTi2LKqogwD

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-datetime-formatter-fb25504c
```

Example prompt: Format the date 2026-12-31 for German (de-DE) users in the Europe/Berlin timezone using a short date style.

## When to prefer this

Choose this endpoint when you need authoritative, CLDR-versioned locale formatting for dates and datetimes across a wide range of locales (~700) with support for timezone resolution, date style, and time style — especially when accuracy against the CLDR standard matters for internationalized user interfaces, documents, or data pipelines. Prefer it over rolling your own Intl.DateTimeFormat logic when you need a verified, versioned, and consistent server-side result.

## Known failure modes

- Missing required 'iso' or 'locale' query parameter returns a 400 error
- Unrecognized or malformed BCP 47 locale tag may cause locale fallback or error
- Invalid ISO 8601 date string format returns a parsing error
- Unknown IANA timezone string may cause a formatting error or fallback
- Payment not completed (x402) returns 402 Payment Required before formatting occurs

## 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 containing the locale-formatted date/datetime string (e.g. '31.12.26'), the resolved locale tag that was actually applied, and the hour cycle used (e.g. 'h23').

## 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": [
      "iso",
      "locale"
     ],
     "properties": {
      "iso": {
       "type": "string",
       "description": "ISO 8601 date or datetime"
      },
      "locale": {
       "type": "string",
       "description": "BCP 47 locale tag, e.g. de-DE, de-CH, en-IN, ja-JP, ar-EG"
      },
      "timeZone": {
       "type": "string",
       "description": "IANA zone, e.g. Europe/Berlin"
      },
      "dateStyle": {
       "type": "string",
       "description": "full | long | medium | short"
      },
      "timeStyle": {
       "type": "string",
       "description": "full | long | medium | short"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "formatted": "31.12.26",
  "hourCycle": "h23",
  "resolvedLocale": "de-DE"
 }
}
```

## More

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