{"openapi":"3.1.0","info":{"title":"Lines API","version":"1.0.0","description":"Operate on text line by line. The transform endpoint sorts lines (natural / numeric-aware, ascending or descending, case-insensitive), removes duplicate lines, reverses their order, numbers them, trims whitespace and drops blank lines — and the operations chain in the order you list them, so trim → remove blanks → dedupe → sort happens in a single call. The count endpoint reports line statistics: total, blank, non-blank, unique and duplicate counts plus the longest, shortest and average line length. Perfect for cleaning up lists and logs, deduplicating, preparing data and tidying pasted text. Pure local computation — no key, no third-party service, instant; up to 500,000 characters via POST. Live, nothing stored. 3 endpoints. Distinct from word wrapping, sorting of JSON lists and CSV tooling.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/lines-api","description":"oanor gateway"}],"tags":[{"name":"Lines"},{"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/count":{"get":{"operationId":"get_v1_count","tags":["Lines"],"summary":"Line statistics","description":"","parameters":[{"name":"text","in":"query","required":true,"description":"The text","schema":{"type":"string"},"example":"banana\napple\n\nbanana\ncherry"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"lines":5,"blank_lines":1,"unique_lines":4,"duplicate_lines":1,"non_blank_lines":4,"average_line_length":4.6,"longest_line_length":6,"shortest_line_length":0},"meta":{"timestamp":"2026-06-03T09:25:08.346Z","request_id":"3ad89680-c455-40fc-a8dc-129b49e03937"},"status":"ok","message":"Line statistics","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/transform":{"get":{"operationId":"get_v1_transform","tags":["Lines"],"summary":"Transform lines","description":"","parameters":[{"name":"text","in":"query","required":true,"description":"The text","schema":{"type":"string"},"example":"banana\napple\n\nbanana\ncherry"},{"name":"operations","in":"query","required":true,"description":"Comma list: trim,remove_blank,unique,sort,reverse,number","schema":{"type":"string"},"example":"trim,remove_blank,unique,sort"},{"name":"order","in":"query","required":false,"description":"asc|desc (for sort)","schema":{"type":"string"}},{"name":"case_insensitive","in":"query","required":false,"description":"for sort/unique","schema":{"type":"string"}},{"name":"number_start","in":"query","required":false,"description":"for number","schema":{"type":"string"}},{"name":"number_separator","in":"query","required":false,"description":"for number (default '. ')","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"result":"apple\nbanana\ncherry","lines_in":5,"lines_out":3,"operations":["trim","remove_blank","unique","sort"]},"meta":{"timestamp":"2026-06-03T09:25:08.447Z","request_id":"a90d7dd6-7214-4bcf-83bb-8246ed512b23"},"status":"ok","message":"Transform lines","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":"Lines API","notes":"Operations are applied left to right, e.g. operations=trim,remove_blank,unique,sort. Sorting is natural (numeric-aware). Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/transform","params":{"text":"the text (required)","order":"asc|desc (for sort)","operations":"comma list: trim,remove_blank,unique,sort,reverse,number (required)","number_start":"for number","case_insensitive":"for sort/unique","number_separator":"for number (default '. ')"},"returns":"the transformed text"},{"path":"/v1/count","params":{"text":"the text (required)"},"returns":"line statistics (total, blank, unique, lengths)"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Operate on text line by line — sort (natural, asc/desc, case-insensitive), remove duplicate lines, reverse the order, number the lines, trim whitespace and drop blank lines. Operations chain in order, so you can trim, drop blanks, dedupe and sort in one call. A count endpoint reports line statistics. Pure local, no key."},"meta":{"timestamp":"2026-06-03T09:25:08.544Z","request_id":"5f97e8c5-e288-4e88-87f0-6d06627a258c"},"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":1225,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":265,"monthly_call_quota":10650,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2255,"monthly_call_quota":157500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6055,"monthly_call_quota":830000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/lines-api"}