{"uid":"cap_3DZKaaBv2MgRYS1nCuYOB","slug":"locale-format-api-number-formatting-091233f7","name":"Locale Format API – Number 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/number?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":["value","locale"],"properties":{"style":{"type":"string","description":"decimal | percent"},"value":{"type":"number"},"digits":{"type":"integer","description":"fixed fraction digits 0-20"},"locale":{"type":"string","description":"BCP 47 locale tag, e.g. de-DE, de-CH, en-IN, ja-JP, ar-EG"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"formatted":"12,34,567.89","resolvedLocale":"en-IN","numberingSystem":"latn"}},"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_K8wkE3ObNV7qPWQVxtOAw","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 value according to CLDR conventions for a specified BCP 47 locale, returning the formatted string, resolved locale, and numbering system.","exampleAgentPrompt":"Format the number 1234567.89 as a decimal for the en-IN locale with 2 fraction digits using CLDR conventions.","exampleUseCases":[{"title":"Localized invoice line items","prompt":"I need to display the amount 9850.5 as a formatted decimal number for our German users in de-DE locale with exactly 2 decimal places — can you format that for me?"},{"title":"Percentage display for analytics dashboard","prompt":"Format 0.4732 as a percentage for a Japanese audience using the ja-JP locale with no extra decimal digits."},{"title":"South Asian number grouping for reports","prompt":"Can you format the number 1234567 using Indian grouping conventions — locale en-IN, decimal style, 0 fraction digits — so it shows up correctly in our report?"}],"resultDescription":"Returns a JSON object with: 'formatted' (the locale-aware string representation of the number, e.g. '12,34,567.89'), 'resolvedLocale' (the BCP 47 locale tag actually applied), and 'numberingSystem' (e.g. 'latn', 'arab') indicating which digit set was used.","failureModes":["Invalid or unrecognized BCP 47 locale tag returns an error or falls back to a default locale","Non-numeric 'value' parameter causes a validation error","'digits' outside 0–20 range returns a 400-level error","Unsupported 'style' enum value (anything other than 'decimal' or 'percent') causes rejection","Payment not settled via x402 protocol returns a 402 Payment Required response"],"whenToPreferThis":"Choose this endpoint when you need authoritative, CLDR-versioned number formatting for any of ~700 locales and correctness matters — especially for locales with non-standard grouping (e.g. en-IN), non-Latin digits (e.g. ar-EG), or percent display. Prefer it over rolling your own Intl.NumberFormat logic when you need a verified, version-pinned CLDR result you can audit or verify with the companion verify endpoint.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T12:34:50.663Z","isFirstParty":false,"canonicalSlug":"locale-format-api-number-formatting-091233f7"}