You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

deepl

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deepl

Deepl API wrapper for node

1.0.13
latest
Source
npmnpm
Version published
Weekly downloads
2.1K
-5.71%
Maintainers
1
Weekly downloads
 
Created
Source

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

"BG" "CS" "DA" "DE" "EL" "EN-GB" "EN-US" "EN" "ES" "ET" "FI" "FR" "HU" "IT" "JA" "LT" "LV" "NL" "PL" "PT-PT" "PT-BR" "PT" "RO" "RU" "SK" "SL" "SV" "ZH"

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)
  });

Free API endpoint

translate({
    free_api: true,
    text: 'I am a text',
    target_lang: 'FR',
    auth_key: 'authkey',
  })

Example response

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

License

MIT

Keywords

deepl

FAQs

Package last updated on 22 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts