{"openapi":"3.1.0","info":{"title":"Sort API","version":"1.0.0","description":"Sort a list — or an array of objects by one of its keys — the way you actually want. Natural (alphanumeric) ordering puts file2 before file10 and v1.9 before v1.10, the way humans expect; alphabetical, numeric and by-length orderings are also built in, each ascending or descending, with an optional case-insensitive mode. Items can be plain strings (comma- or newline-separated) or a JSON array; for objects, give the property to sort by and rows missing it go last. Perfect for file and version lists, leaderboards and tables, tidying user input and any UI that shows sorted data. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. Distinct from set operations and CSV tooling.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/sort-api","description":"oanor gateway"}],"tags":[{"name":"Sort"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/sort":{"get":{"operationId":"get_v1_sort","tags":["Sort"],"summary":"Sort a list","description":"","parameters":[{"name":"list","in":"query","required":true,"description":"JSON array or comma/newline list","schema":{"type":"string"},"example":"file10,file2,file1"},{"name":"mode","in":"query","required":false,"description":"natural|alphabetical|numeric|length (default natural)","schema":{"type":"string"},"example":"natural"},{"name":"order","in":"query","required":false,"description":"asc|desc (default asc)","schema":{"type":"string"},"example":"asc"},{"name":"case_insensitive","in":"query","required":false,"description":"true/false","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"mode":"natural","count":3,"order":"asc","result":["file1","file2","file10"],"case_insensitive":false},"meta":{"timestamp":"2026-06-03T01:09:39.445Z","request_id":"f696708f-ae43-4bee-8840-c3eb9d429055"},"status":"ok","message":"Sort a list","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/sort-objects":{"get":{"operationId":"get_v1_sort_objects","tags":["Sort"],"summary":"Sort objects by a key","description":"","parameters":[{"name":"json","in":"query","required":true,"description":"Array of objects","schema":{"type":"string"},"example":"[{\"name\":\"b\",\"age\":30},{\"name\":\"a\",\"age\":5}]"},{"name":"key","in":"query","required":true,"description":"Property to sort by","schema":{"type":"string"},"example":"age"},{"name":"mode","in":"query","required":false,"description":"natural|alphabetical|numeric|length (default natural)","schema":{"type":"string"},"example":"natural"},{"name":"order","in":"query","required":false,"description":"asc|desc (default asc)","schema":{"type":"string"},"example":"asc"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"key":"age","mode":"natural","count":2,"order":"asc","result":[{"age":5,"name":"a"},{"age":30,"name":"b"}]},"meta":{"timestamp":"2026-06-03T01:09:39.542Z","request_id":"c556ba07-8dee-4c3e-83ae-02cc925de772"},"status":"ok","message":"Sort objects by a key","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Sort API","notes":"Natural sort uses the platform's Unicode collator with numeric ordering. Items missing the sort key are placed last. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/sort","params":{"list":"JSON array or comma/newline list (required)","mode":"natural|alphabetical|numeric|length (default natural)","order":"asc|desc","case_insensitive":"true/false"},"returns":"the sorted list"},{"path":"/v1/sort-objects","params":{"key":"property to sort by (required)","json":"array of objects (required)","mode":"default natural","order":"asc|desc"},"returns":"the sorted array of objects"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Sort a list — or an array of objects by a key — using natural (alphanumeric, so file2 comes before file10), alphabetical, numeric or by-length ordering, ascending or descending, with an optional case-insensitive mode. Pure local, no key."},"meta":{"timestamp":"2026-06-03T01:09:39.639Z","request_id":"f6d3d2fc-8080-4040-8345-108239b2b882"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":1165,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":205,"monthly_call_quota":10050,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2195,"monthly_call_quota":151500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":5995,"monthly_call_quota":800000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/sort-api"}