DeepL Free API (No TOKEN required)
Go to file
Vincent Young 1fa6d7a2e3
feat(translate): migrate to oneshot endpoint to bypass www2 anti-bot
The www2.deepl.com/jsonrpc backends behind LMT_handle_texts /
LMT_handle_jobs now sit behind aggressive WAF + per-IP throttling that
returns HTTP 429 (code 1042911 "Too many requests") within a handful of
calls from any single host — making the free path effectively unusable.

The official DeepL browser extension and iOS app skip that backend
entirely for stateless single-shot translation and POST to a separate
"oneshot" endpoint on a different host pool with its own (much looser)
rate limit. It accepts anonymous traffic with a literal
`Authorization: None` header, returns plain JSON, and supports the same
language pairs.

Switch the free path to:

  POST https://oneshot-free.www.deepl.com/v1/translate
  Authorization: None
  {"text": ["..."], "target_lang": "de", "source_lang": "en"}

Pro users continue to hit oneshot-pro.www.deepl.com with their bearer
token (the `-s` flag now carries an OAuth access token rather than the
legacy dl_session cookie).

This removes:
  - the JSON-RPC envelope (jsonrpc/method/id/params/timestamp wrapper)
  - the `i`-count timestamp trick (getICount + getTimeStamp)
  - the random-id body-spacing trick (handlerBodyMethod)
  - the whatlanggo client-side detection (oneshot detects server-side)

The DeepLXTranslationResult contract is unchanged for service handlers;
Alternatives is now always nil because the oneshot endpoint does not
return alternative translations.

Verified against /translate, /v1/translate and /v2/translate routes
end-to-end (EN/DE/ZH/JA/FR pairs, multi-sentence input, autodetect, 10x
burst) — all 200 OK on an IP that was concurrently being 429'd by www2.
2026-05-22 11:34:55 +08:00
.github chore: bump Go version to 1.24.2 in Dockerfile, go.mod, and CI workflows 2025-04-08 14:27:01 -04:00
img docs: add img 2024-03-02 02:47:18 -05:00
service refactor: make service exportable (#183) 2025-04-08 13:53:20 -04:00
translate feat(translate): migrate to oneshot endpoint to bypass www2 anti-bot 2026-05-22 11:34:55 +08:00
.cross_compile.sh ci: fix compile error 2024-03-20 16:52:54 -04:00
.gitignore chore: add gitignore 2023-07-01 21:31:38 +08:00
compose.yaml Update compose.yaml 2024-12-22 14:18:30 -05:00
deeplx.service Update deeplx.service 2023-02-18 20:55:20 +08:00
Dockerfile Update Dockerfile to use Go 1.25 base image (#215) 2026-03-18 03:47:26 -07:00
go.mod feat(translate): migrate to oneshot endpoint to bypass www2 anti-bot 2026-05-22 11:34:55 +08:00
go.sum feat(translate): migrate to oneshot endpoint to bypass www2 anti-bot 2026-05-22 11:34:55 +08:00
install.sh Update install.sh 2023-02-18 20:57:58 +08:00
LICENSE Create LICENSE 2022-10-20 02:12:18 +08:00
main.go refactor: make service exportable (#183) 2025-04-08 13:53:20 -04:00
me.missuo.deeplx.plist Update README.md 2022-10-20 02:11:14 +08:00
README.md docs: remove icon 2024-11-30 19:56:38 -05:00
uninstall.sh feat(uninstall): Add DeepLX uninstallation script (#203) 2025-08-26 20:34:10 +08:00

GitHub Workflow Go Version Go Report GitHub License Docker Pulls Releases

How to use

!TIP]

Learn more about [📘 Using DeepLX](https://deeplx.owo.network) by checking it out.

Discussion Group

Telegram Group

Acknowledgements

Contributors

Activity

Alt

License

FOSSA Status