POST /translator/translate/batch

Batch Translate

Translate multiple text strings in a single API request across 250+ languages.

Translation API

Translate multiple text strings in a single request. Accepts a JSON array of strings and returns all translations at once, reducing API calls and improving performance for bulk translation workloads.

HTTP Request

1
POST /translator/translate/batch

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 a JSON array of strings as the request body with Content-Type: application/json.

1
2
3
4
5
[
  "Hello, how are you?",
  "The weather is beautiful today.",
  "Please send me the report by Friday."
]

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
  "status": true,
  "data": {
    "translated_texts": [
      "Hola, como estas?",
      "El clima esta hermoso hoy.",
      "Por favor envieme el informe antes del viernes."
    ],
    "source_language": "en",
    "source_language_name": "English"
  }
}

Response Fields

FieldTypeDescription
statusbooleanWhether the request was successful
data.translated_textsarrayArray of translated strings in the same order as the input
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
23
24
25
26
27
import requests
import json

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

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

payload = json.dumps([
    "Hello, how are you?",
    "The weather is beautiful today.",
    "Please send me the report by Friday."
])

headers = {
    "Content-Type": "application/json",
    "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()

for i, text in enumerate(data["data"]["translated_texts"]):
    print(f"{i + 1}. {text}")
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const url = "https://multi-format-ai-translator-the-most-complete.p.rapidapi.com/translator/translate/batch";

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

const response = await fetch(`${url}?${params}`, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "multi-format-ai-translator-the-most-complete.p.rapidapi.com",
  },
  body: JSON.stringify([
    "Hello, how are you?",
    "The weather is beautiful today.",
    "Please send me the report by Friday.",
  ]),
});

const data = await response.json();

data.data.translated_texts.forEach((text, i) => {
  console.log(`${i + 1}. ${text}`);
});
1
2
3
4
5
curl -X POST "https://multi-format-ai-translator-the-most-complete.p.rapidapi.com/translator/translate/batch?source=auto&target=fr" \
  -H "Content-Type: application/json" \
  -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?", "The weather is beautiful today.", "Please send me the report by Friday."]'
Start building today

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

Get Your API Key on RapidAPI