{"uid":"cap_6LW_dpf7M-u3gz7sx0tme","slug":"locale-format-api-raw-formatting-rules-973e87b3","name":"Locale Format API – Raw Formatting Rules","description":"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.","url":"https://localeformat.com/v1/rules?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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"}}}}},"responseSchema":{"type":"json","example":{"dateOrder":"day-month-year","firstDayOfWeek":1,"groupSeparator":"’","resolvedLocale":"de-CH","currencyPosition":"prefix","decimalSeparator":"."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_BRUiJqzhMJb1FoDgIfEUq","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns CLDR-versioned locale formatting rules (date order, decimal/group separators, currency position, week start) for a given BCP 47 locale tag","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"Localize invoice numbers for Swiss market","prompt":"I'm building invoices for Swiss German customers — what decimal separator, grouping separator, and currency position should I use for de-CH?"},{"title":"Display dates correctly for Japanese users","prompt":"What date order and first day of week does CLDR specify for ja-JP so I can format dates correctly for my Japanese users?"},{"title":"Format currency amounts for Indian English","prompt":"Pull the CLDR formatting rules for en-IN, especially where the currency symbol goes and what grouping separator is used, so I can display INR amounts properly."}],"resultDescription":"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).","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T00:37:51.639Z","isFirstParty":false,"canonicalSlug":"locale-format-api-raw-formatting-rules-973e87b3"}