Cleaner Help
Developer API

Build with the CleanLinks API

Strip tracking parameters from any URL — free, open, no API key required. Call the endpoint directly from any language or platform.

Quickstart

No registration, no API key, no sign-up. Make a GET request with a URL-encoded url parameter.

Free & open — no API key needed

Simple GET request (any language, any tool):

curl "https://cleanlinks.thewebdexter.com/api/clean?url=https%3A%2F%2Fexample.com%2F%3Futm_source%3Dnewsletter%26fbclid%3DIwAR2x"

Stable versioned endpoint (recommended for integrations):

curl "https://cleanlinks.thewebdexter.com/api/v1/clean?url=https%3A%2F%2Fexample.com%2F%3Futm_source%3Dnewsletter%26fbclid%3DIwAR2x"

Response

{ "success": true, "cleaned": "https://example.com/", "original": "https://example.com/?utm_source=newsletter&fbclid=IwAR2x", "removed": 2, "bytesSaved": 42, "isHttps": true, "wasUnwrapped": false, "unwrappedVia": null, "hopCount": 0, "rulesVersion": "3.0.0", "categories": { "Campaign / UTM": [{ "name": "utm_source", "value": "newsletter", "reason": "Global tracker" }], "Facebook / Meta": [{ "name": "fbclid", "value": "IwAR2x", "reason": "Global tracker" }] } }

On error, the /api/v1/clean endpoint returns { "error": { "code": "...", "message": "..." } } with an appropriate HTTP status code. Full spec: /openapi.json

Reference

GET /api/v1/clean?url={encoded_url}

Stable, versioned endpoint. Open CORS — can be called directly from browser JavaScript. Breaking changes will ship under a new version path.

Parameter: url — required, percent-encoded absolute URL (max 4096 chars, http: or https: only).

GET /api/clean?url={encoded_url}

Legacy endpoint — same cleaning engine. Same parameters and response shape. Browser cross-origin calls require a X-Turnstile-Token header (the web cleaner handles this automatically). Non-browser callers (curl, Node.js, Python, iOS Shortcut) are unaffected.

Rate Limits

Rate limiting is enforced at the network edge. Fair-use applies — the API is intended for personal tools, scripts, and automations. High-volume or commercial use is prohibited under the Terms of Service. Cache results for URLs you clean repeatedly to minimise requests.

Examples

JavaScript (fetch):

const res = await fetch( '/api/v1/clean?url=' + encodeURIComponent('https://example.com/?utm_source=fb') ); const { cleaned } = await res.json();

Python:

import urllib.request, urllib.parse, json url = urllib.parse.quote('https://example.com/?utm_source=fb') with urllib.request.urlopen( f'https://cleanlinks.thewebdexter.com/api/v1/clean?url={url}' ) as r: data = json.load(r) print(data['cleaned'])

Shell / curl:

curl -s "https://cleanlinks.thewebdexter.com/api/v1/clean?url=$(python3 -c \ "import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1]))" \ "https://example.com/?utm_source=newsletter&fbclid=IwAR2x")" | jq .cleaned