npm

Need private packages and team management tools?Check out npm Orgs. »

deepl

1.0.3 • Public • Published

Deepl

npm version Dependency Status

Deepl API wrapper for node.

Installation

npm install deepl --save

Documentation

Official documentation can be found here: https://www.deepl.com/api.html

API key

Get an account and an API key here: https://www.deepl.com/pro.html

Supported languages

"EN" "DE" "FR" "ES" "PT" "IT" "NL" "PL" "RU"

Usage

const translate = require("deepl");
 
translate({
    text: 'I am a text',
    target_lang: 'FR',
    auth_key: 'authkey',
    // All optional parameters available in the official documentation can be defined here as well.
  })
  .then(result => {
      console.log(result.data);
  })
  .catch(error => {
      console.error(error)
  });

Example response

{
    "translations": [
        {
            "detected_source_language": "EN",
            "text": "Je suis un texte"
        }
    ]
}

License

MIT

install

npm i deepl

Downloadsweekly downloads

41

version

1.0.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability