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.
| option | Does | Web version |
|---|---|---|
remove_duplicates | Remove duplicates | Remove Duplicate Lines |
keep_duplicates | Show only duplicates | Remove Duplicate Lines |
clean_spaces | Clean everything | Remove Extra Spaces |
trim_lines | Trim line ends only | Remove Extra Spaces |
collapse_blank_lines | Collapse blank lines | Remove Extra Spaces |
remove_blank_lines | Delete all blank lines | Remove Extra Spaces |
to_json_array | To JSON array | List to JSON Array |
to_json_object | To JSON object | List to JSON Array |
csv_to_json | CSV to JSON | List to JSON Array |
upper_case | UPPERCASE | Case Converter |
lower_case | lowercase | Case Converter |
title_case | Title Case | Case Converter |
sentence_case | Sentence case | Case Converter |
camel_case | camelCase | Case Converter |
pascal_case | PascalCase | Case Converter |
snake_case | snake_case | Case Converter |
kebab_case | kebab-case | Case Converter |
constant_case | CONSTANT_CASE | Case Converter |
sort_asc | A → Z | Sort Lines |
sort_desc | Z → A | Sort Lines |
sort_length | Shortest first | Sort Lines |
sort_length_desc | Longest first | Sort Lines |
reverse_lines | Reverse order | Sort Lines |
shuffle_lines | Shuffle | Sort Lines |
number_lines | Number lines | Sort Lines |
add_prefix_suffix | Add prefix/suffix | Sort Lines |
tabs_to_spaces | Tabs → spaces | Tabs to Spaces |
spaces_to_tabs | Spaces → tabs | Tabs to Spaces |
base64_encode | Encode | Base64 Encode / Decode |
base64_decode | Decode | Base64 Encode / Decode |
url_encode | Encode | URL Encode / Decode |
url_decode | Decode | URL Encode / Decode |
strip_html | Strip tags | Remove HTML Tags |
html_escape | Escape HTML | Remove HTML Tags |
html_unescape | Unescape entities | Remove HTML Tags |
text_stats | Count everything | Word & Character Counter |
extract_emails | Extract emails | Word & Character Counter |
extract_urls | Extract URLs | Word & Character Counter |
extract_numbers | Extract numbers | Word & Character Counter |
Limits and errors
- Maximum 200,000 characters per request — larger input returns HTTP 413.
- An unknown
optionreturns HTTP 400 with the list of valid values. GET /api/healthreturns{"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