DeepL/deepl-node
Official Node.js library for the DeepL language translation API.
What it solves
Developers building translation features into Node.js applications can use this library to talk to the DeepL API. It wraps the API's text translation, document translation, glossary, style, and translation memory features into simple JavaScript/TypeScript functions, so you don't have to handle raw HTTP requests or authentication details.
How it works
You install the package (npm install deepl-node), create a DeepLClient with your API key, and then call methods like translateText() or translateDocument(). The client handles the API calls, retries, and error handling. For documents, it automatically manages the multi-step process: upload, poll for status, and download. You can also access those steps individually if you need finer control. The library returns promises, so you can use await or chaining. It supports many options: formality, glossaries, style rules, translation memories, custom instructions, tag handling (HTML/XML), and model type selection. It also allows auto-detecting the source language and translating multiple texts at once.
Who it’s for
Node.js developers who need high-quality machine translation in their applications. Whether you're building a localization tool, a chatbot that translates messages, or a document processing pipeline, this client gives you a clean interface to DeepL's translation service. It's also useful for teams that need consistent translation behavior across a product.
Highlights
- Official DeepL library for Node.js, supporting Node versions 12 to 24.
- Simple
DeepLClientclass replaces the olderTranslator(deprecated). - Text translation with auto-detection, multiple texts, and options like formality, glossaries, and custom instructions.
- Document translation (e.g., PDF, DOCX) with optional watermarks and output format control.
- Built-in support for glossaries, style rules, translation memories, and style profiles.
- Works with both ES Modules and CommonJS, and includes TypeScript types.
- Handles polling for document status and retries automatically; allows manual steps if needed.
Related
- Project
- Project
- Project
- Project
- Project