# Locale-Aware String Sorter

> Locale-Aware String Sorter is a paid API for AI agents from locale-tools.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-02).

Sorts up to 200 strings using locale-specific collation rules (German umlauts, Swedish rings, Spanish tildes) with optional numeric sorting.

## Facts

- Endpoint: GET https://locale-tools.x402tookit.com/sort-text?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/locale-aware-string-sorter-53e35b5b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YOJK-9EWU_pqtsOKGDlYK

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-aware-string-sorter-53e35b5b
```

Example prompt: Sort these 15 product names alphabetically using German locale rules so that umlauts like ä, ö, and ü are placed correctly: Äpfel, Banane, Zebra, Österreich, Ufer — return them in ascending order.

## When to prefer this

Choose this endpoint when you need linguistically correct sorting that respects locale-specific collation rules (umlauts, rings, tildes, accented characters) rather than plain Unicode codepoint ordering. It is especially valuable for multilingual applications, displaying sorted lists to end users in their native language, or when natural numeric sorting of filenames or version strings is required. Prefer this over JavaScript's default sort or simple ASCII ordering whenever the strings contain non-ASCII characters or locale-sensitive ordering matters.

## Known failure modes

- More than 200 items submitted — request rejected
- Individual string exceeds 100 characters — may be truncated or rejected
- Invalid or unrecognized BCP47 locale tag — falls back to en-US or returns error
- Malformed items parameter (not pipe-separated, newline-separated, or valid JSON array)
- Invalid enum value for order, caseFirst, or sensitivity parameters

## How this service works

Sort up to 200 strings by locale rules (German a-umlaut, Swedish a-ring, Spanish n-tilde) with numeric option.

## Output

Returns a JSON object containing the sorted array of strings, the resolved locale used, collation settings, original indexes (for mapping back to source positions), item count, ICU/CLDR/Unicode version metadata, and a degraded flag indicating whether full locale support was available.

## 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": [
      "items"
     ],
     "properties": {
      "items": {
       "type": "string",
       "description": "Strings separated by | or newline, or a JSON array; at most 200 items of 100 characters"
      },
      "order": {
       "type": "string",
       "description": "asc (default) or desc"
      },
      "locale": {
       "type": "string",
       "description": "BCP47 tag such as sv, de, es (default en-US, up to 60 characters)"
      },
      "numeric": {
       "type": "boolean",
       "description": "true to sort digit runs by value (file2 before file10); default false"
      },
      "caseFirst": {
       "type": "string",
       "description": "upper, lower or false (locale default)"
      },
      "sensitivity": {
       "type": "string",
       "description": "base, accent, case or variant (default variant)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "locale": {
       "type": [
        "null",
        "string"
       ]
      },
      "sorted": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "numeric": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ]
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "collation": {
       "type": [
        "null",
        "string"
       ]
      },
      "itemCount": {
       "type": [
        "null",
  
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/locale-aware-string-sorter-53e35b5b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from locale-tools.x402tookit.com](https://www.zero.xyz/host/locale-tools.x402tookit.com/llms.txt)
