{"openapi":"3.1.0","info":{"title":"Locale and Formatting Tools","version":"1.0.0","description":"Locale-aware number, currency, date, plural, relative-time, list and sort formatting from the ICU/CLDR data built into the server. One call, one computed answer, no accounts or API keys. Machine-payable over x402.","x-guidance":"Locale and Formatting Tools: Locale-aware number, currency, date, plural, relative-time, list and sort formatting from the ICU/CLDR data built into the server. Use /format-number for decimal, percent, compact and unit text, /format-currency for money text with ISO 4217 minor units, /format-date for date text in a timezone, /plural-category for CLDR plural categories, /relative-time for '3 days ago' text, /list-format for and/or lists, /locale-parse for BCP47 tags, and /sort-text for locale-aware collation. Each paid GET returns a computed verdict with the reasons, the source and what was NOT checked. A verdict of UNVERIFIED means a lookup failed: treat it as unknown. No account or key: pay per call in USDC over x402."},"servers":[{"url":"https://locale-tools.x402tookit.com"}],"paths":{"/format-currency":{"get":{"operationId":"format_currency","summary":"Format an amount as money for an ISO 4217 currency code in a locale; reports minor-unit digits; unknown codes rejected.","description":"Format an amount as money for an ISO 4217 currency code in a locale; reports minor-unit digits; unknown codes rejected.","tags":["currency","locale","iso4217","format"],"parameters":[{"name":"amount","in":"query","required":true,"description":"Amount in major units, absolute value up to 1e15","schema":{"type":"number"}},{"name":"currency","in":"query","required":true,"description":"Three-letter ISO 4217 code such as USD, JPY or KWD; must be known to ICU","schema":{"type":"string"}},{"name":"locale","in":"query","required":false,"description":"BCP47 tag such as en-US, de-DE, ja-JP (default en-US, up to 60 characters)","schema":{"type":"string"}},{"name":"display","in":"query","required":false,"description":"symbol (default), narrowSymbol, code or name","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":["null","string"]},"summary":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"formatted":{"type":["null","string"]},"currency":{"type":["null","string"]},"currencyName":{"type":["null","string"]},"minorUnitDigits":{"type":["null","number"]},"minorUnitsAmount":{"type":["null","number"]},"locale":{"type":["null","string"]},"resolvedLocale":{"type":["null","string"]},"parts":{"type":["array","null"],"items":{"type":"object","properties":{"type":{"type":["null","string"]},"value":{"type":["null","string"]}}}},"icuVersion":{"type":["null","string"]},"cldrVersion":{"type":["null","string"]},"unicodeVersion":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"asOf":{"type":["null","string"]},"disclaimer":{"type":["null","string"]}}},"example":{"verdict":"FORMATTED","summary":"1234.5 EUR in de-DE: 1.234,50 € (2 minor-unit digits)","reasons":["EUR (Euro) uses 2 decimal places; the amount is rounded to that."],"formatted":"1.234,50 €","currency":"EUR","currencyName":"Euro","minorUnitDigits":2,"minorUnitsAmount":123450,"locale":"de-DE","resolvedLocale":"de-DE","parts":[{"type":"integer","value":"1"},{"type":"group","value":"."}],"icuVersion":"78.3","cldrVersion":"48.0","unicodeVersion":"17.0","degraded":false,"notChecked":["Output depends on the ICU/CLDR version of the serving machine (reported in icuVersion); other platforms and versions can format differently.","current exchange rates (this converts nothing), whether the currency is still in circulation, or rounding rules for cash vs. accounting"],"source":"Node.js Intl.NumberFormat (ICU/CLDR); minor units per ISO 4217 as shipped in ICU","asOf":"2026-10-21T01:26:08.978Z","disclaimer":"Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting."}}}},"400":{"description":"A parameter was missing or out of range."},"402":{"description":"Payment Required"},"502":{"description":"The upstream source failed or timed out."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0200"},"protocols":[{"x402":{"network":"eip155:8453","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/format-currency"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/format-currency"}},{"x402":{"network":"eip155:137","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/format-currency"}},{"x402":{"network":"eip155:42161","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/format-currency"}}]}}},"/format-date":{"get":{"operationId":"format_date","summary":"Show an instant in an IANA timezone and locale with full/long/medium/short styles; DST-aware, with UTC offset.","description":"Show an instant in an IANA timezone and locale with full/long/medium/short styles; DST-aware, with UTC offset.","tags":["date","timezone","locale","format"],"parameters":[{"name":"date","in":"query","required":true,"description":"ISO 8601 (2024-01-15T12:00:00Z; no zone means UTC) or epoch milliseconds, up to 40 characters","schema":{"type":"string"}},{"name":"timeZone","in":"query","required":false,"description":"IANA zone such as America/New_York or Asia/Kolkata (default UTC, up to 60 characters)","schema":{"type":"string"}},{"name":"locale","in":"query","required":false,"description":"BCP47 tag such as en-US, de-DE, ja-JP (default en-US)","schema":{"type":"string"}},{"name":"dateStyle","in":"query","required":false,"description":"full, long, medium (default) or short","schema":{"type":"string"}},{"name":"timeStyle","in":"query","required":false,"description":"Optional full, long, medium or short to include the time","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":["null","string"]},"summary":{"type":["null","string"]},"reasons":{"type":["array","null"]},"formatted":{"type":["null","string"]},"instantUtc":{"type":["null","string"]},"epochMs":{"type":["null","number"]},"timeZone":{"type":["null","string"]},"utcOffset":{"type":["null","string"]},"calendar":{"type":["null","string"]},"numberingSystem":{"type":["null","string"]},"locale":{"type":["null","string"]},"resolvedLocale":{"type":["null","string"]},"parts":{"type":["array","null"],"items":{"type":"object","properties":{"type":{"type":["null","string"]},"value":{"type":["null","string"]}}}},"icuVersion":{"type":["null","string"]},"cldrVersion":{"type":["null","string"]},"unicodeVersion":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"asOf":{"type":["null","string"]},"disclaimer":{"type":["null","string"]}}},"example":{"verdict":"FORMATTED","summary":"2024-01-15T12:00:00.000Z in America/New_York (en-US): Monday, January 15, 2024 at 7:00 AM","reasons":[],"formatted":"Monday, January 15, 2024 at 7:00 AM","instantUtc":"2024-01-15T12:00:00.000Z","epochMs":1705320000000,"timeZone":"America/New_York","utcOffset":"-05:00","calendar":"gregory","numberingSystem":"latn","locale":"en-US","resolvedLocale":"en-US","parts":[{"type":"weekday","value":"Monday"},{"type":"literal","value":", "}],"icuVersion":"78.3","cldrVersion":"48.0","unicodeVersion":"17.0","degraded":false,"notChecked":["Output depends on the ICU/CLDR version of the serving machine (reported in icuVersion); other platforms and versions can format differently.","which calendar the reader expects (locales such as th or ar may use a non-Gregorian calendar by default; see calendar)","…1 more"],"source":"Node.js Intl.DateTimeFormat (ICU/CLDR, IANA tz database)","asOf":"2026-10-21T01:26:09.261Z","disclaimer":"Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting."}}}},"400":{"description":"A parameter was missing or out of range."},"402":{"description":"Payment Required"},"502":{"description":"The upstream source failed or timed out."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0200"},"protocols":[{"x402":{"network":"eip155:8453","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/format-date"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/format-date"}},{"x402":{"network":"eip155:137","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/format-date"}},{"x402":{"network":"eip155:42161","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/format-date"}}]}}},"/format-number":{"get":{"operationId":"format_number","summary":"Format a number as decimal, percent, compact (1.2K) or unit text in any BCP47 locale, with digit control.","description":"Format a number as decimal, percent, compact (1.2K) or unit text in any BCP47 locale, with digit control.","tags":["locale","number","format","intl"],"parameters":[{"name":"value","in":"query","required":true,"description":"Number to format, absolute value up to 1e18","schema":{"type":"number"}},{"name":"locale","in":"query","required":false,"description":"BCP47 tag such as de-DE, ar-EG or en-IN (default en-US, up to 60 characters)","schema":{"type":"string"}},{"name":"style","in":"query","required":false,"description":"decimal (default), percent (value 0.25 gives 25%), compact, or unit","schema":{"type":"string"}},{"name":"unit","in":"query","required":false,"description":"For style=unit: an ECMA-402 sanctioned unit such as kilometer, celsius, kilometer-per-hour (up to 40 characters)","schema":{"type":"string"}},{"name":"unitDisplay","in":"query","required":false,"description":"short (default), long or narrow","schema":{"type":"string"}},{"name":"compactDisplay","in":"query","required":false,"description":"For style=compact: short (1.2K, default) or long (1.2 thousand)","schema":{"type":"string"}},{"name":"maxFractionDigits","in":"query","required":false,"description":"Maximum fraction digits, 0 to 20","schema":{"type":"integer"}},{"name":"minFractionDigits","in":"query","required":false,"description":"Minimum fraction digits, 0 to 20","schema":{"type":"integer"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":["null","string"]},"summary":{"type":["null","string"]},"reasons":{"type":["array","null"]},"formatted":{"type":["null","string"]},"locale":{"type":["null","string"]},"resolvedLocale":{"type":["null","string"]},"style":{"type":["null","string"]},"numberingSystem":{"type":["null","string"]},"parts":{"type":["array","null"],"items":{"type":"object","properties":{"type":{"type":["null","string"]},"value":{"type":["null","string"]}}}},"icuVersion":{"type":["null","string"]},"cldrVersion":{"type":["null","string"]},"unicodeVersion":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"asOf":{"type":["null","string"]},"disclaimer":{"type":["null","string"]}}},"example":{"verdict":"FORMATTED","summary":"1234567.891 as decimal in de-DE: 1.234.567,891","reasons":[],"formatted":"1.234.567,891","locale":"de-DE","resolvedLocale":"de-DE","style":"decimal","numberingSystem":"latn","parts":[{"type":"integer","value":"1"},{"type":"group","value":"."}],"icuVersion":"78.3","cldrVersion":"48.0","unicodeVersion":"17.0","degraded":false,"notChecked":["Output depends on the ICU/CLDR version of the serving machine (reported in icuVersion); other platforms and versions can format differently.","whether the unit or locale is the one the reader expects: unknown locales fall back silently (see reasons)"],"source":"Node.js Intl.NumberFormat (ICU/CLDR)","asOf":"2026-10-21T01:26:09.520Z","disclaimer":"Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting."}}}},"400":{"description":"A parameter was missing or out of range."},"402":{"description":"Payment Required"},"502":{"description":"The upstream source failed or timed out."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0200"},"protocols":[{"x402":{"network":"eip155:8453","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/format-number"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/format-number"}},{"x402":{"network":"eip155:137","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/format-number"}},{"x402":{"network":"eip155:42161","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/format-number"}}]}}},"/list-format":{"get":{"operationId":"list_format","summary":"Join items into a natural-language and/or list for a locale ('a, b, and c' in en, 'a, b y c' in es).","description":"Join items into a natural-language and/or list for a locale ('a, b, and c' in en, 'a, b y c' in es).","tags":["list","locale","i18n","format"],"parameters":[{"name":"items","in":"query","required":true,"description":"Items separated by | or newline, or a JSON array of strings; at most 100 items of 100 characters","schema":{"type":"string"}},{"name":"locale","in":"query","required":false,"description":"BCP47 tag such as en-US, en-GB, es, de (default en-US)","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"conjunction (and, default), disjunction (or) or unit (no word)","schema":{"type":"string"}},{"name":"style","in":"query","required":false,"description":"long (default), short or narrow","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":["null","string"]},"summary":{"type":["null","string"]},"reasons":{"type":["array","null"]},"formatted":{"type":["null","string"]},"itemCount":{"type":["null","number"]},"locale":{"type":["null","string"]},"resolvedLocale":{"type":["null","string"]},"icuVersion":{"type":["null","string"]},"cldrVersion":{"type":["null","string"]},"unicodeVersion":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"asOf":{"type":["null","string"]},"disclaimer":{"type":["null","string"]}}},"example":{"verdict":"FORMATTED","summary":"3 items as conjunction list in en-GB: apples, pears and plums","reasons":[],"formatted":"apples, pears and plums","itemCount":3,"locale":"en-GB","resolvedLocale":"en-GB","icuVersion":"78.3","cldrVersion":"48.0","unicodeVersion":"17.0","degraded":false,"notChecked":["Output depends on the ICU/CLDR version of the serving machine (reported in icuVersion); other platforms and versions can format differently.","grammatical agreement of the items themselves (gender, case) and Spanish/Hebrew conjunction changes that depend on the next word's sound in older ICU versions"],"source":"Node.js Intl.ListFormat (ICU/CLDR)","asOf":"2026-10-21T01:26:09.792Z","disclaimer":"Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting."}}}},"400":{"description":"A parameter was missing or out of range."},"402":{"description":"Payment Required"},"502":{"description":"The upstream source failed or timed out."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0200"},"protocols":[{"x402":{"network":"eip155:8453","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/list-format"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/list-format"}},{"x402":{"network":"eip155:137","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/list-format"}},{"x402":{"network":"eip155:42161","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/list-format"}}]}}},"/locale-parse":{"get":{"operationId":"locale_parse","summary":"Parse and canonicalize a BCP47 language tag: language, script, region, extensions, likely subtags, direction.","description":"Parse and canonicalize a BCP47 language tag: language, script, region, extensions, likely subtags, direction.","tags":["bcp47","locale","language-tag","cldr"],"parameters":[{"name":"tag","in":"query","required":true,"description":"BCP47 tag such as zh-TW, en-u-ca-gregory or sr-Latn (up to 60 characters)","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":["null","string"]},"summary":{"type":["null","string"]},"reasons":{"type":["array","null"]},"input":{"type":["null","string"]},"valid":{"type":["boolean","null"]},"canonical":{"type":["null","string"]},"baseName":{"type":["null","string"]},"language":{"type":["null","string"]},"script":{},"region":{"type":["null","string"]},"variants":{"type":["array","null"]},"unicodeExtensions":{"type":["null","object"],"properties":{"numeric":{"type":["boolean","null"]}}},"maximized":{"type":["null","string"]},"maximizedBaseName":{"type":["null","string"]},"minimized":{"type":["null","string"]},"minimizedBaseName":{"type":["null","string"]},"direction":{"type":["null","string"]},"firstDayOfWeek":{"type":["null","number"]},"hasLocaleData":{"type":["boolean","null"]},"icuVersion":{"type":["null","string"]},"cldrVersion":{"type":["null","string"]},"unicodeVersion":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"asOf":{"type":["null","string"]},"disclaimer":{"type":["null","string"]}}},"example":{"verdict":"VALID_CANONICAL","summary":"\"zh-TW\" is well-formed; language zh, region TW; likely zh-Hant-TW, shortest zh-TW.","reasons":[],"input":"zh-TW","valid":true,"canonical":"zh-TW","baseName":"zh-TW","language":"zh","script":null,"region":"TW","variants":[],"unicodeExtensions":{"numeric":false},"maximized":"zh-Hant-TW","maximizedBaseName":"zh-Hant-TW","minimized":"zh-TW","minimizedBaseName":"zh-TW","direction":"ltr","firstDayOfWeek":7,"hasLocaleData":true,"icuVersion":"78.3","cldrVersion":"48.0","unicodeVersion":"17.0","degraded":false,"notChecked":["Output depends on the ICU/CLDR version of the serving machine (reported in icuVersion); other platforms and versions can format differently.","whether the language subtag is registered in the IANA Language Subtag Registry (only structure is validated, so 'xx' is well-formed)","…1 more"],"source":"Node.js Intl.Locale and Intl.getCanonicalLocales (ICU/CLDR likely-subtags data)","asOf":"2026-10-21T01:26:10.043Z","disclaimer":"Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting."}}}},"400":{"description":"A parameter was missing or out of range."},"402":{"description":"Payment Required"},"502":{"description":"The upstream source failed or timed out."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0200"},"protocols":[{"x402":{"network":"eip155:8453","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/locale-parse"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/locale-parse"}},{"x402":{"network":"eip155:137","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/locale-parse"}},{"x402":{"network":"eip155:42161","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/locale-parse"}}]}}},"/plural-category":{"get":{"operationId":"plural_category","summary":"CLDR plural category (zero/one/two/few/many/other) of a number in a locale, cardinal and ordinal, with all categories.","description":"CLDR plural category (zero/one/two/few/many/other) of a number in a locale, cardinal and ordinal, with all categories.","tags":["plural","cldr","locale","i18n"],"parameters":[{"name":"n","in":"query","required":true,"description":"The number, absolute value up to 1e15; fractions allowed (1.5 is 'other' in English)","schema":{"type":"number"}},{"name":"locale","in":"query","required":true,"description":"BCP47 tag such as en, ru, ar, pl or cy (up to 60 characters)","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":["null","string"]},"summary":{"type":["null","string"]},"reasons":{"type":["array","null"]},"n":{"type":["null","number"]},"locale":{"type":["null","string"]},"resolvedLocale":{"type":["null","string"]},"cardinal":{"type":["null","string"]},"ordinal":{"type":["null","string"]},"cardinalCategories":{"type":["array","null"],"items":{"type":"string"}},"ordinalCategories":{"type":["array","null"],"items":{"type":"string"}},"icuVersion":{"type":["null","string"]},"cldrVersion":{"type":["null","string"]},"unicodeVersion":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"asOf":{"type":["null","string"]},"disclaimer":{"type":["null","string"]}}},"example":{"verdict":"CLASSIFIED","summary":"2 in cy: cardinal \"two\", ordinal \"two\"","reasons":[],"n":2,"locale":"cy","resolvedLocale":"cy","cardinal":"two","ordinal":"two","cardinalCategories":["zero","one","…4 more"],"ordinalCategories":["zero","one","…4 more"],"icuVersion":"78.3","cldrVersion":"48.0","unicodeVersion":"17.0","degraded":false,"notChecked":["Output depends on the ICU/CLDR version of the serving machine (reported in icuVersion); other platforms and versions can format differently.","visible fraction digits: 1 and 1.0 are the same number here, but CLDR treats '1.0' as 'other' in English; send the fraction value you mean","…1 more"],"source":"Node.js Intl.PluralRules (ICU/CLDR plural rules)","asOf":"2026-10-21T01:26:10.311Z","disclaimer":"Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting."}}}},"400":{"description":"A parameter was missing or out of range."},"402":{"description":"Payment Required"},"502":{"description":"The upstream source failed or timed out."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0200"},"protocols":[{"x402":{"network":"eip155:8453","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/plural-category"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/plural-category"}},{"x402":{"network":"eip155:137","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/plural-category"}},{"x402":{"network":"eip155:42161","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/plural-category"}}]}}},"/relative-time":{"get":{"operationId":"relative_time","summary":"Relative time text such as '3 days ago' or 'tomorrow' for a signed value and unit in any locale.","description":"Relative time text such as '3 days ago' or 'tomorrow' for a signed value and unit in any locale.","tags":["relative-time","locale","i18n","format"],"parameters":[{"name":"value","in":"query","required":true,"description":"Signed amount: negative is the past, positive the future; absolute value up to 1e9","schema":{"type":"number"}},{"name":"unit","in":"query","required":true,"description":"second, minute, hour, day, week, month, quarter or year","schema":{"type":"string"}},{"name":"locale","in":"query","required":false,"description":"BCP47 tag such as en, es, de, ja (default en-US, up to 60 characters)","schema":{"type":"string"}},{"name":"numeric","in":"query","required":false,"description":"always (default: '1 day ago') or auto ('yesterday')","schema":{"type":"string"}},{"name":"style","in":"query","required":false,"description":"long (default), short or narrow","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":["null","string"]},"summary":{"type":["null","string"]},"reasons":{"type":["array","null"]},"formatted":{"type":["null","string"]},"direction":{"type":["null","string"]},"locale":{"type":["null","string"]},"resolvedLocale":{"type":["null","string"]},"parts":{"type":["array","null"],"items":{"type":"object","properties":{"type":{"type":["null","string"]},"value":{"type":["null","string"]},"unit":{"type":["null","string"]}}}},"icuVersion":{"type":["null","string"]},"cldrVersion":{"type":["null","string"]},"unicodeVersion":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"asOf":{"type":["null","string"]},"disclaimer":{"type":["null","string"]}}},"example":{"verdict":"FORMATTED","summary":"-3 day in es: hace 3 días","reasons":[],"formatted":"hace 3 días","direction":"past","locale":"es","resolvedLocale":"es","parts":[{"type":"literal","value":"hace "},{"type":"integer","value":"3","unit":"day"}],"icuVersion":"78.3","cldrVersion":"48.0","unicodeVersion":"17.0","degraded":false,"notChecked":["Output depends on the ICU/CLDR version of the serving machine (reported in icuVersion); other platforms and versions can format differently.","calendar arithmetic: this words a value you supply; it does not compute the difference between two dates"],"source":"Node.js Intl.RelativeTimeFormat (ICU/CLDR)","asOf":"2026-10-21T01:26:10.572Z","disclaimer":"Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting."}}}},"400":{"description":"A parameter was missing or out of range."},"402":{"description":"Payment Required"},"502":{"description":"The upstream source failed or timed out."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0200"},"protocols":[{"x402":{"network":"eip155:8453","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/relative-time"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/relative-time"}},{"x402":{"network":"eip155:137","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/relative-time"}},{"x402":{"network":"eip155:42161","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/relative-time"}}]}}},"/sort-text":{"get":{"operationId":"sort_text","summary":"Sort up to 200 strings by locale rules (German a-umlaut, Swedish a-ring, Spanish n-tilde) with numeric option.","description":"Sort up to 200 strings by locale rules (German a-umlaut, Swedish a-ring, Spanish n-tilde) with numeric option.","tags":["collation","sort","locale","unicode"],"parameters":[{"name":"items","in":"query","required":true,"description":"Strings separated by | or newline, or a JSON array; at most 200 items of 100 characters","schema":{"type":"string"}},{"name":"locale","in":"query","required":false,"description":"BCP47 tag such as sv, de, es (default en-US, up to 60 characters)","schema":{"type":"string"}},{"name":"numeric","in":"query","required":false,"description":"true to sort digit runs by value (file2 before file10); default false","schema":{"type":"boolean"}},{"name":"sensitivity","in":"query","required":false,"description":"base, accent, case or variant (default variant)","schema":{"type":"string"}},{"name":"caseFirst","in":"query","required":false,"description":"upper, lower or false (locale default)","schema":{"type":"string"}},{"name":"order","in":"query","required":false,"description":"asc (default) or desc","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":["null","string"]},"summary":{"type":["null","string"]},"reasons":{"type":["array","null"]},"sorted":{"type":["array","null"],"items":{"type":"string"}},"originalIndexes":{"type":["array","null"],"items":{"type":"number"}},"itemCount":{"type":["null","number"]},"locale":{"type":["null","string"]},"resolvedLocale":{"type":["null","string"]},"collation":{"type":["null","string"]},"numeric":{"type":["boolean","null"]},"icuVersion":{"type":["null","string"]},"cldrVersion":{"type":["null","string"]},"unicodeVersion":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"asOf":{"type":["null","string"]},"disclaimer":{"type":["null","string"]}}},"example":{"verdict":"SORTED","summary":"4 items sorted asc for sv: Anna, Zebra, Åsa, Örjan","reasons":[],"sorted":["Anna","Zebra","…2 more"],"originalIndexes":[2,0],"itemCount":4,"locale":"sv","resolvedLocale":"sv","collation":"default","numeric":false,"icuVersion":"78.3","cldrVersion":"48.0","unicodeVersion":"17.0","degraded":false,"notChecked":["Output depends on the ICU/CLDR version of the serving machine (reported in icuVersion); other platforms and versions can format differently.","alternative tailorings such as phonebook or pinyin (add -u-co-phonebk to the locale to request one)","…1 more"],"source":"Node.js Intl.Collator (ICU/CLDR collation, UCA)","asOf":"2026-10-21T01:26:10.837Z","disclaimer":"Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting."}}}},"400":{"description":"A parameter was missing or out of range."},"402":{"description":"Payment Required"},"502":{"description":"The upstream source failed or timed out."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0200"},"protocols":[{"x402":{"network":"eip155:8453","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/sort-text"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/sort-text"}},{"x402":{"network":"eip155:137","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/sort-text"}},{"x402":{"network":"eip155:42161","scheme":"exact","currency":"USDC","endpoint":"https://locale-tools.x402tookit.com/sort-text"}}]}}}}}