DeepL API
api-free.deepl.com · AI
High-quality neural machine translation — widely regarded as the best for European languages. Free tier: 500,000 characters/month. Supports 33 languages, documents, and glossaries.
Authentication
API Key
Free API key at deepl.com/pro-api (requires account). Pass as Authorization: DeepL-Auth-Key YOUR_KEY header.
Sample Requests
POST
Translate text
Translate English to German.
https://api-free.deepl.com/v2/translate
Hover any highlighted part to learn what it does
Headers — extra info sent with the request
| Content-Type | application/json |
| Authorization | DeepL-Auth-Key YOUR_KEY |
Request Body — data you're sending
{
"text": [
"Hello, how are you?"
],
"target_lang": "DE"
}
curl -X POST "https://api-free.deepl.com/v2/translate" \
-H "Content-Type: application/json" \
-H "Authorization: DeepL-Auth-Key YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"text":["Hello, how are you?"],"target_lang":"DE"}'import requests
headers = {
"Content-Type": "application/json",
"Authorization": "DeepL-Auth-Key YOUR_KEY"
}
data = {
"text": [
"Hello, how are you?"
],
"target_lang": "DE"
}
response = requests.post(
"https://api-free.deepl.com/v2/translate",
headers=headers,
json=data,
)
print(response.json())const url = 'https://api-free.deepl.com/v2/translate';
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'DeepL-Auth-Key YOUR_KEY'
},
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
"text": [
"Hello, how are you?"
],
"target_lang": "DE"
}),
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"bytes"
"encoding/json"
)
func main() {
targetURL := "https://api-free.deepl.com/v2/translate"
jsonData, _ := json.Marshal({"text":["Hello, how are you?"],"target_lang":"DE"})
req, _ := http.NewRequest("POST", targetURL, bytes.NewBuffer(jsonData))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "DeepL-Auth-Key YOUR_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api-free.deepl.com/v2/translate")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Post.new(uri)
req["Content-Type"] = "application/json"
req["Authorization"] = "DeepL-Auth-Key YOUR_KEY"
req["Content-Type"] = "application/json"
req.body = "{\"text\":[\"Hello, how are you?\"],\"target_lang\":\"DE\"}"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api-free.deepl.com/v2/translate";
$opts = ["http" => [
"method" => "POST",
"header" => implode("\r\n", [
"Content-Type: application/json",
"Authorization: DeepL-Auth-Key YOUR_KEY",
"Content-Type: application/json"
]),
"content" => json_encode({"text":["Hello, how are you?"],"target_lang":"DE"}),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- Sign up at deepl.com/pro-api for a free key (500K chars/month)
- Set Authorization: DeepL-Auth-Key YOUR_KEY
- Free tier uses api-free.deepl.com; paid uses api.deepl.com
- Text is an array — you can translate multiple strings in one call
- Languages: EN, DE, FR, ES, IT, NL, PL, PT, RU, JA, ZH and more