# Bulk Text Translator — Translate Texts & Datasets (`istmobot/bulk-text-translator`) Actor

Translate thousands of texts, reviews, product titles or any Apify dataset into 100+ languages with automatic language detection. No API key, no character limit, several target languages per run. Cheaper alternative to Google Translate and DeepL APIs.

- **URL**: https://apify.com/istmobot/bulk-text-translator.md
- **Developed by:** [Istmobot](https://apify.com/istmobot) (community)
- **Categories:** AI, Automation, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.005 / actor start

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Bulk Text Translator — translate texts & Apify datasets into 100+ languages

Translate **thousands of texts at once**: reviews, comments, product titles and descriptions, captions, articles or **any field of an Apify dataset**, into **100+ languages**, with **automatic language detection**. No API key, no character limit, several target languages in one run. A cheap alternative to the Google Translate API and DeepL API.

### Why use it?

- **Translate other scrapers' results.** Pass a `datasetId` from any Actor run (TikTok, Instagram, Google Maps reviews, Amazon, Google News, App Store reviews…) and the fields to translate. Every item comes back with `<field>_<language>` added, e.g. `text_en`, `title_es`.
- **Several languages at once**: `["en", "es", "pt", "fr"]`.
- **Auto-detects the source language** of every text and returns it.
- **Any length**: long texts are split at sentence boundaries and stitched back.
- **Fast**: hundreds of texts per request batch. 6,000 translations take a few minutes.
- **Fair billing**: texts already in the target language are returned unchanged and not charged.

### How much does it cost?

| Event | Price |
|---|---|
| Actor start | $0.005 per run |
| `translation` | **$0.001** per text per target language (per started 4,500 characters) |

That is about **$0.25 per million characters** of short texts, versus $20 per million on the Google Cloud Translation API. Errors are free. The free plan's $5 monthly credit covers about **5,000 translations**.

### Input

| Field | Default | Description |
|---|---|---|
| `texts` | – | Texts to translate, one per line |
| `targetLanguages` | `["en"]` | Language codes: `en`, `es`, `pt`, `fr`, `de`, `it`, `ja`, `ko`, `zh-CN`, `zh-TW`, `ar`, `hi`, `ru`, `tr`, `id`, `vi`, `th`… |
| `sourceLanguage` | `auto` | Source language code, or auto-detect |
| `datasetId` | – | Translate an existing Apify dataset |
| `fields` | – | Dataset fields to translate (dot paths allowed, e.g. `author.bio`) |
| `maxItems` | `10000` | Max texts or dataset items |

Translate texts:

```json
{ "texts": ["Great product, fast shipping!", "Llegó roto."], "targetLanguages": ["en", "de"] }
```

Translate the reviews from another run:

```json
{ "datasetId": "<DATASET_ID_FROM_ANOTHER_RUN>", "fields": ["title", "text"], "targetLanguages": ["en"] }
```

### Output

Text mode, one item per text and language:

```json
{ "index": 1, "text": "Llegó roto.", "translatedText": "It arrived broken.", "sourceLanguage": "es", "targetLanguage": "en", "characters": 11 }
```

Dataset mode: the original item plus translated fields:

```json
{ "rating": 1, "text": "Updated my iPad and now WhatsApp will not stay open", "text_es": "Actualicé mi iPad y ahora WhatsApp no se queda abierto", "text_sourceLanguage": "en", "_sourceIndex": 0 }
```

### Chain it after any scraper

In Apify Console, add an **integration** on your scraper ("Run Actor" on success) that starts Bulk Text Translator with `{"datasetId": "{{resource.defaultDatasetId}}", "fields": ["text"]}`. Every new scrape is translated automatically. Works the same from Make, Zapier, n8n or the API:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("istmobot/bulk-text-translator").call(run_input={"texts": ["Bonjour tout le monde"], "targetLanguages": ["en", "es"]})
for t in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(t["targetLanguage"], t["translatedText"])
```

### FAQ

**Which translation engine?** Google's neural machine translation, the same engine used for page translation in Chrome.

**Is formatting kept?** Line breaks are kept. Text is translated as plain text.

# Actor input Schema

## `texts` (type: `array`):

One text per line: product titles, reviews, comments, captions, articles. Long texts (any length) are split at sentence boundaries automatically.

## `targetLanguages` (type: `array`):

Language codes to translate into, e.g. en, es, pt, fr, de, it, ja, ko, zh-CN, zh-TW, ar, hi, ru, tr, id, vi, th. Several languages = one translation per language.

## `sourceLanguage` (type: `string`):

Language code of the input texts, or auto to detect it per text. The detected language is returned in the output.

## `datasetId` (type: `string`):

Optional. ID of a dataset from another Actor run (e.g. TikTok, Google News, reviews, Amazon scrapers). Every item is copied to the output with translated fields added as <field>\_<language>, e.g. title_es.

## `fields` (type: `array`):

Field names to translate in each dataset item. Dot paths work for nested fields, e.g. author.bio.

## `maxItems` (type: `integer`):

Maximum number of texts or dataset items to translate in this run.

## `proxyConfiguration` (type: `object`):

The translation service rate-limits busy IPs. The Actor retries on a fresh proxy IP.

## Actor input object example

```json
{
  "texts": [
    "Hello! How are you today?",
    "This product is amazing, fast shipping and great quality."
  ],
  "targetLanguages": [
    "es"
  ],
  "sourceLanguage": "auto",
  "maxItems": 10000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "texts": [
        "Hello! How are you today?",
        "This product is amazing, fast shipping and great quality."
    ],
    "targetLanguages": [
        "es"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("istmobot/bulk-text-translator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "texts": [
        "Hello! How are you today?",
        "This product is amazing, fast shipping and great quality.",
    ],
    "targetLanguages": ["es"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("istmobot/bulk-text-translator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "texts": [
    "Hello! How are you today?",
    "This product is amazing, fast shipping and great quality."
  ],
  "targetLanguages": [
    "es"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call istmobot/bulk-text-translator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,istmobot/bulk-text-translator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ntTCgddgaaKxZ5Bfj/builds/fMdgeo5flNDKNcltt/openapi.json
