Developer API

The same operations as the website, over HTTP, for scripts and pipelines. Free to use, no key required.

The website itself does not use this API — it processes everything in your browser. The API exists for automation: cleaning files in a build step, normalising data in a scheduled job, or calling from a language without a convenient text-processing library.

Endpoint

POST https://devclean-backend.onrender.com/api/process
Content-Type: application/json

{
  "text": "apple\nbanana\napple",
  "option": "remove_duplicates",
  "options": { "ignoreCase": true }
}

The response is a JSON object:

{ "processed_text": "apple\nbanana", "operation": "remove_duplicates" }

Example with curl

curl -X POST https://devclean-backend.onrender.com/api/process \
  -H "Content-Type: application/json" \
  -d '{"text":"a\nb\na","option":"remove_duplicates"}'

Example in Python

import requests

r = requests.post(
    "https://devclean-backend.onrender.com/api/process",
    json={"text": open("list.txt").read(), "option": "remove_duplicates"},
    timeout=30,
)
print(r.json()["processed_text"])

Available operations

Discover them at runtime with GET https://devclean-backend.onrender.com/api/operations, or use the table below.

optionDoesWeb version
remove_duplicatesRemove duplicatesRemove Duplicate Lines
keep_duplicatesShow only duplicatesRemove Duplicate Lines
clean_spacesClean everythingRemove Extra Spaces
trim_linesTrim line ends onlyRemove Extra Spaces
collapse_blank_linesCollapse blank linesRemove Extra Spaces
remove_blank_linesDelete all blank linesRemove Extra Spaces
to_json_arrayTo JSON arrayList to JSON Array
to_json_objectTo JSON objectList to JSON Array
csv_to_jsonCSV to JSONList to JSON Array
upper_caseUPPERCASECase Converter
lower_caselowercaseCase Converter
title_caseTitle CaseCase Converter
sentence_caseSentence caseCase Converter
camel_casecamelCaseCase Converter
pascal_casePascalCaseCase Converter
snake_casesnake_caseCase Converter
kebab_casekebab-caseCase Converter
constant_caseCONSTANT_CASECase Converter
sort_ascA → ZSort Lines
sort_descZ → ASort Lines
sort_lengthShortest firstSort Lines
sort_length_descLongest firstSort Lines
reverse_linesReverse orderSort Lines
shuffle_linesShuffleSort Lines
number_linesNumber linesSort Lines
add_prefix_suffixAdd prefix/suffixSort Lines
tabs_to_spacesTabs → spacesTabs to Spaces
spaces_to_tabsSpaces → tabsTabs to Spaces
base64_encodeEncodeBase64 Encode / Decode
base64_decodeDecodeBase64 Encode / Decode
url_encodeEncodeURL Encode / Decode
url_decodeDecodeURL Encode / Decode
strip_htmlStrip tagsRemove HTML Tags
html_escapeEscape HTMLRemove HTML Tags
html_unescapeUnescape entitiesRemove HTML Tags
text_statsCount everythingWord & Character Counter
extract_emailsExtract emailsWord & Character Counter
extract_urlsExtract URLsWord & Character Counter
extract_numbersExtract numbersWord & Character Counter

Limits and errors

  • Maximum 200,000 characters per request — larger input returns HTTP 413.
  • An unknown option returns HTTP 400 with the list of valid values.
  • GET /api/health returns {"status":"ok"} and is useful for waking a sleeping instance.

Free hosting caveat: the public instance runs on a free tier that sleeps after inactivity, so the first request after a quiet period can take up to a minute. For production use, run your own instance — the server is a single Python file in the repository.

Self-hosting

git clone https://github.com/AlbertoMariaPareti/devclean.git
cd devclean
pip install -r requirements.txt
uvicorn main:app --reload