# DeepL API

> DeepL returns text translations and alternative translations, available as a workflow and API.

DeepL’s Translate text method returns translated text and alternatives when shown; it needs text and a target language, with source language optional.

- Page: https://fous.com/workflows/deepl
- Handle: `@deepl`
- Category: [Productivity](https://fous.com/workflows/category/productivity)
- Source website: https://deepl.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with DeepL.

## Methods

### Translate text

Operation `translate_text`, version 1. 1 credit per call.

Translate up to 1,500 characters using DeepL’s free translator. Formality controls are unavailable without Pro; whole-text alternatives are returned only when shown.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `text` | string | yes | `"Please send the contract by Friday."` | Text to translate, up to 1,500 characters. Example: Please send the contract by Friday. |
| `source_language` | string | no | `"French"` | Language of the text, or auto-detect. Example: English. |
| `target_language` | string | yes | `"German"` | Language for the translation. Example: German. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "text",
    "target_language"
  ],
  "properties": {
    "text": {
      "type": "string",
      "description": "Text to translate, up to 1,500 characters. Example: Please send the contract by Friday.",
      "examples": [
        "Please send the contract by Friday.",
        "Bonjour, bienvenue à Paris."
      ]
    },
    "source_language": {
      "type": "string",
      "default": "auto-detect",
      "description": "Language of the text, or auto-detect. Example: English.",
      "examples": [
        "French"
      ]
    },
    "target_language": {
      "type": "string",
      "description": "Language for the translation. Example: German.",
      "examples": [
        "German",
        "English"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "text": "Please send the contract by Friday.",
      "target_language": "German"
    },
    {
      "text": "Bonjour, bienvenue à Paris.",
      "source_language": "French",
      "target_language": "English"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `page_url` | string | `"https://www.deepl.com/en/translator"` |  |
| `source_language` | string | `"English"` |  |
| `target_language` | string | `"German"` |  |
| `translated_text` | string | `"Bitte senden Sie den Vertrag bis Freitag."` |  |
| `source_language_code` | string | `"en"` |  |
| `target_language_code` | string | `"de-de"` |  |
| `alternative_translations` | array |  |  |

**Example input**

```json
{
  "text": "Please send the contract by Friday.",
  "target_language": "German"
}
```

**Example output**

```json
{
  "page_url": "https://www.deepl.com/en/translator",
  "source_language": "English",
  "target_language": "German",
  "translated_text": "Bitte senden Sie den Vertrag bis Freitag.",
  "source_language_code": "en",
  "target_language_code": "de-de",
  "alternative_translations": []
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@deepl",
  "visibility": "public",
  "operation": "translate_text",
  "version": 1,
  "input": {
    "text": "Please send the contract by Friday.",
    "target_language": "German"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@deepl\",\n  \"visibility\": \"public\",\n  \"operation\": \"translate_text\",\n  \"version\": 1,\n  \"input\": {\n    \"text\": \"Please send the contract by Friday.\",\n    \"target_language\": \"German\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@deepl",
  "visibility": "public",
  "operation": "translate_text",
  "version": 1,
  "input": {
    "text": "Please send the contract by Friday.",
    "target_language": "German"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@deepl","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Translate customer messages for international support teams
- Prepare product descriptions for new markets
- Review alternative translations before publishing
- Translate internal documents for multilingual teams

## FAQ

### Is Fous affiliated with DeepL?

No. Fous is not affiliated with DeepL. This workflow reads the public deepl.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a DeepL account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from deepl.com when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### How do I translate text into another language?

Use Translate text with the text and target language; source language is optional.

### Can I get alternative translations?

Translate text returns alternative translations only when they are shown.

## Related

- [All Productivity workflows](https://fous.com/workflows/category/productivity)
