Translate.love is a free and open source machine translation API developed for translating any variety of text and documents in over 30 different languages. It provides a free-to-use API for real-time development and integration with applications in need of translation services. This project seeks to make translation services easy to access for anyone by providing a FOSS alternative.
Request:
const res = await fetch("https://translate.love/translate", {
method: "POST",
body: JSON.stringify({
q: "Hello!",
source: "en",
target: "es"
}),
headers: { "Content-Type": "application/json" }
});
console.log(await res.json());
Response:
{
"translatedText": "¡Hola!"
}
Request:
const res = await fetch("https://translate.love/translate", {
method: "POST",
body: JSON.stringify({
q: "Ciao!",
source: "auto",
target: "en"
}),
headers: { "Content-Type": "application/json" }
});
console.log(await res.json());
Response:
{
"detectedLanguage": {
"confidence": 83,
"language": "it"
},
"translatedText": "Bye!"
}
Request:
const res = await fetch("https://translate.love/translate", {
method: "POST",
body: JSON.stringify({
q: '<p class="green">Hello!</p>',
source: "en",
target: "es",
format: "html"
}),
headers: { "Content-Type": "application/json" }
});
console.log(await res.json());
Response:
{
"translatedText": "<p class=\"green\">¡Hola!</p>"
}
English, Arabic, Azerbaijani, Catalan, Chinese, Czech, Danish, Dutch, Esperanto, Finnish, French, German, Greek, Hebrew, Hindi, Hungarian, Indonesian, Irish, Italian, Japanese, Korean, Persian, Polish, Portuguese, Russian, Slovak, Spanish, Swedish, Turkish, Ukranian
This translation API was only made possible through the LibreTranslate project. Please support their efforts here.