POST /translator/translate

Translate

Translate plain text between 250+ languages with automatic source language detection.

Translation API

Translate plain text from one language to another. Supports 250+ languages with automatic source language detection. Ideal for translating user-generated content, messages, and short text passages.

HTTP Request

1
POST /translator/translate

Parameters

ParameterTypeRequiredDefaultDescription
sourcestringNo"auto"Source language code (e.g., en, fr, de). Use auto for automatic detection
targetstringYesTarget language code (e.g., es, ja, zh)

Request Body

Send the text to translate as the raw request body with Content-Type: text/plain. Maximum length is 5000 characters.

1
Hello, how are you today? I hope you are having a great day.

Response

1
2
3
4
5
6
7
8
{
  "status": true,
  "data": {
    "translated_text": "Hola, como estas hoy? Espero que estes teniendo un gran dia.",
    "source_language": "en",
    "source_language_name": "English"
  }
}

Response Fields

FieldTypeDescription
statusbooleanWhether the request was successful
data.translated_textstringThe translated text
data.source_languagestringDetected or specified source language code
data.source_language_namestringHuman-readable name of the source language

Code Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
import requests

url = "https://multi-format-ai-translator-the-most-complete.p.rapidapi.com/translator/translate"

querystring = {
    "source": "auto",
    "target": "es"
}

payload = "Hello, how are you today? I hope you are having a great day."

headers = {
    "Content-Type": "text/plain",
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "multi-format-ai-translator-the-most-complete.p.rapidapi.com"
}

response = requests.post(url, headers=headers, params=querystring, data=payload)
data = response.json()

print(f"Translated: {data['data']['translated_text']}")
print(f"Source language: {data['data']['source_language_name']}")
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
const url = "https://multi-format-ai-translator-the-most-complete.p.rapidapi.com/translator/translate";

const params = new URLSearchParams({
  source: "auto",
  target: "es",
});

const response = await fetch(`${url}?${params}`, {
  method: "POST",
  headers: {
    "Content-Type": "text/plain",
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "multi-format-ai-translator-the-most-complete.p.rapidapi.com",
  },
  body: "Hello, how are you today? I hope you are having a great day.",
});

const data = await response.json();

console.log(`Translated: ${data.data.translated_text}`);
console.log(`Source language: ${data.data.source_language_name}`);
1
2
3
4
5
curl -X POST "https://multi-format-ai-translator-the-most-complete.p.rapidapi.com/translator/translate?source=auto&target=es" \
  -H "Content-Type: text/plain" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: multi-format-ai-translator-the-most-complete.p.rapidapi.com" \
  -d "Hello, how are you today? I hope you are having a great day."
Start building today

Get your API key and make your first request in under a minute.

Get Your API Key on RapidAPI