{"uid":"cap_-ZU1i0S1Os2h902obLHp6","slug":"locale-format-api-currency-formatting-8374f8b4","name":"Locale Format API – Currency Formatting","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/currency?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":["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"}}}}},"responseSchema":{"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"}},"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_7KUUwA9A3nLmMmcBnuNbL","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":"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.","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"E-commerce product price localization","prompt":"I'm building a checkout page for Germany — can you format 49.99 EUR for the de-DE locale using the default currency symbol so I know exactly how it should look, including whether the euro sign goes before or after the number?"},{"title":"Fintech dashboard for Swiss users","prompt":"Format 12500.00 CHF for Swiss German users (de-CH locale) — I need the correctly formatted string and the separator rules so I can render it on our bank account dashboard."},{"title":"Invoice generation for Japanese yen","prompt":"What does 85000 JPY look like when formatted for Japanese users in ja-JP? Give me the formatted amount and tell me the fraction digits and symbol position so I can generate the invoice correctly."}],"resultDescription":"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).","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T06:42:17.730Z","isFirstParty":false,"canonicalSlug":"locale-format-api-currency-formatting-8374f8b4"}