Text
Sort lines API
Sorts lines alphabetically or numerically, ascending or descending, with optional case-insensitivity and dedupe. Answers 'how do I sort these lines?', 'how do I sort numbers as numbers, not strings?'.
Price$0.01per request
MethodPOST
Route/v1/text/sort-lines
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
textsortlinesorderalphabeticalnumericlistcleanup
API URL
Integration docshttps://x402.hexl.dev/v1/text/sort-linesExample request
{
"text": "banana\napple\ncherry"
}Example response
{
"result": "apple\nbanana\ncherry",
"lineCount": 3
}Input schema
{
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"examples": [
"banana\napple\ncherry"
]
},
"order": {
"type": "string",
"enum": [
"asc",
"desc"
]
},
"numeric": {
"type": "boolean"
},
"caseInsensitive": {
"type": "boolean"
},
"unique": {
"type": "boolean"
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}