Side-by-side comparison of 6 translation APIs. Free tiers, quality benchmarks, language coverage, document translation, and real code examples.
The typical machine translation API flow
Why developers need translation APIs
Translate web content, product descriptions, and UI strings into multiple languages. Serve localized versions based on user locale for global reach.
Translate messages in real-time for multilingual customer support, team collaboration, or social platforms. Low latency is critical.
Translate entire documents (PDF, DOCX, PPTX) while preserving formatting, tables, and images. Essential for legal, medical, and business workflows.
Translate product listings, reviews, and checkout flows for international marketplaces. Custom glossaries ensure brand terms stay consistent.
Aggregate and translate news, research papers, or social media content from multiple languages into a single feed for analysis.
Add multilingual capabilities to AI agents and chatbots. Translate user input before processing and translate responses back to the user's language.
Based on independent benchmarks and blind quality evaluations (European language pairs)
Quality scores are approximate and vary by language pair. DeepL excels for European languages; Google leads for Asian and low-resource languages.
Side-by-side comparison of translation API capabilities
| Feature | Google Cloud | DeepL | Azure Translator | Amazon Translate | LibreTranslate | MyMemory |
|---|---|---|---|---|---|---|
| Free Tier | 500K chars/mo | 500K chars/mo | 2M chars/mo | 2M chars/mo (12 mo) | Unlimited (self-host) | 5K-50K chars/day |
| Paid Price | $20/M chars | $25/M + $5.49/mo | $10/M chars | $15/M chars | Free (OSS) | Via RapidAPI |
| Languages | 189 | 36 | 100+ | 75 | ~45 | 80+ |
| Auto-Detect | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
| Document Translation | ✅ PDF, DOCX (v3) | ✅ PDF, DOCX, PPTX | ✅ PDF, DOCX, HTML+ | ✅ PDF, DOCX, PPTX | ❌ | ❌ |
| Glossaries | ✅ v3 only | ✅ Free + Pro | ✅ | ✅ Custom Terminology | ❌ | ❌ |
| Custom Models | ✅ AutoML Translation | ❌ | ✅ Custom Translator | ✅ Active Custom | ❌ | ❌ |
| Batch Translation | ✅ via Cloud Storage | ❌ | ✅ via Blob Storage | ✅ via S3 | ❌ | ❌ |
| Formality Control | ❌ | ✅ Formal/Informal | ❌ | ✅ | ❌ | ❌ |
| Transliteration | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
| Offline/Self-Host | ❌ | ❌ | ❌ | ❌ | ✅ Docker | ❌ |
| No API Key Needed | ❌ | ❌ | ❌ | ❌ | ✅ (self-hosted) | ✅ |
| Official SDKs | Python, Node, Go, Java, Ruby, PHP, .NET, C++ | Python, Node, .NET, PHP, Ruby, Java | Python, Node, Java, .NET, Go | Python (boto3), Node, Java, .NET, Go | REST API only | REST API only |
| Rate Limit | 10M chars/100s | Throttled (unspecified) | 2M chars/hr (free) | No published limit | Configurable | 5K-150K chars/day |
In-depth look at each translation API
Monthly cost comparison by translation volume (managed services only)
| Volume/Month | Google Cloud | DeepL Pro | Azure Translator | Amazon Translate |
|---|---|---|---|---|
| 500K chars | Free | Free | Free | Free* |
| 1M chars | $10.00 | $18.00 | Free | Free* |
| 2M chars | $30.00 | $43.00 | Free | Free* |
| 5M chars | $90.00 | $118.00 | $30.00 | $45.00 |
| 10M chars | $190.00 | $243.00 | $80.00 | $120.00 |
| 50M chars | $990.00 | $1,243.00 | $480.00 | $720.00 |
| 100M chars | $1,990.00 | $2,493.00 | $980.00 | $1,470.00 |
*Amazon Translate free tier expires after 12 months. DeepL costs include $5.49/mo base fee. LibreTranslate and MyMemory not shown (free/self-hosted or very low limits).
Get started with translation APIs in minutes
// npm install @google-cloud/translate
const { Translate } = require('@google-cloud/translate').v2;
const translate = new Translate({
key: 'YOUR_API_KEY'
});
async function translateText() {
const [translation] = await translate.translate(
'Hello, how are you?',
'es' // target language
);
console.log(translation);
// Output: "Hola, ¿cómo estás?"
}
translateText();
# pip install google-cloud-translate
from google.cloud import translate_v2 as translate
client = translate.Client()
result = client.translate(
"Hello, how are you?",
target_language="es"
)
print(result["translatedText"])
# Output: "Hola, ¿cómo estás?"
// npm install deepl-node
const deepl = require('deepl-node');
const translator = new deepl.Translator('YOUR_AUTH_KEY');
async function translateText() {
const result = await translator.translateText(
'Hello, how are you?',
null, // auto-detect source language
'es', // target language
{ formality: 'prefer_more' } // formal tone
);
console.log(result.text);
// Output: "Hola, ¿cómo está usted?"
}
translateText();
# pip install deepl
import deepl
translator = deepl.Translator("YOUR_AUTH_KEY")
result = translator.translate_text(
"Hello, how are you?",
target_lang="ES",
formality="prefer_more"
)
print(result.text)
# Output: "Hola, ¿cómo está usted?"
print(result.detected_source_lang)
# Output: "EN"
# Simple REST API call - works with any language
curl -X POST "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=es&to=fr" \
-H "Ocp-Apim-Subscription-Key: YOUR_KEY" \
-H "Ocp-Apim-Subscription-Region: eastus" \
-H "Content-Type: application/json" \
-d '[{"Text": "Hello, how are you?"}]'
# Response: translate to MULTIPLE languages in one call
# [{"translations": [
# {"text": "Hola, ¿cómo estás?", "to": "es"},
# {"text": "Bonjour, comment allez-vous?", "to": "fr"}
# ]}]
const response = await fetch(
'https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=es',
{
method: 'POST',
headers: {
'Ocp-Apim-Subscription-Key': 'YOUR_KEY',
'Ocp-Apim-Subscription-Region': 'eastus',
'Content-Type': 'application/json'
},
body: JSON.stringify([{ Text: 'Hello, how are you?' }])
}
);
const data = await response.json();
console.log(data[0].translations[0].text);
// Output: "Hola, ¿cómo estás?"
# Start LibreTranslate with Docker
docker run -ti --rm -p 5000:5000 libretranslate/libretranslate
# Translate via REST API (no API key needed)
curl -X POST "http://localhost:5000/translate" \
-H "Content-Type: application/json" \
-d '{"q": "Hello, how are you?", "source": "en", "target": "es"}'
# Response:
# {"translatedText": "Hola, ¿cómo estás?"}
import requests
response = requests.post(
"http://localhost:5000/translate",
json={
"q": "Hello, how are you?",
"source": "en",
"target": "es"
}
)
print(response.json()["translatedText"])
# Output: "Hola, ¿cómo estás?"
# Zero setup - just a GET request!
curl "https://api.mymemory.translated.net/get?q=Hello,+how+are+you?&langpair=en|es"
# Response:
# {"responseData": {"translatedText": "Hola, ¿cómo estás?"}}
// Works directly in the browser - no API key, no CORS issues
async function translate(text, from, to) {
const url = `https://api.mymemory.translated.net/get?q=${encodeURIComponent(text)}&langpair=${from}|${to}`;
const res = await fetch(url);
const data = await res.json();
return data.responseData.translatedText;
}
// Usage
const result = await translate('Good morning!', 'en', 'ja');
console.log(result);
// Output: "おはようございます!"
import requests
def translate(text, source, target):
response = requests.get(
"https://api.mymemory.translated.net/get",
params={"q": text, "langpair": f"{source}|{target}"}
)
return response.json()["responseData"]["translatedText"]
print(translate("Good morning!", "en", "de"))
# Output: "Guten Morgen!"
Quick decision guide based on your use case
You need the most natural, human-like translations for customer-facing content, marketing copy, or business communications.
You need to support rare or low-resource languages (Quechua, Dhivehi, Luxembourgish, etc.) that other providers don't cover.
You're translating millions of characters per month and need the best price per character from a managed service.
Your infrastructure is on AWS and you want tight integration with S3, Lambda, and IAM. Active Custom Translation for domain-specific output.
You can't send data to external APIs (GDPR, HIPAA, air-gapped environments). Need full control over translation infrastructure.
You need a translation API right now with zero setup, no signup, no credit card. Just a GET request and you're translating.
Get 50 free requests/day. IP geolocation for auto-detecting user locale, screenshots for translated page previews, and 30+ developer APIs.
Get Free API Key →