# Google Translate API — Bulk Text Translation (`maged120/google-translate-scraper`) Actor

Translate any number of texts into one or many of 100+ languages with Google Translate quality. Auto-detects the source language. No Google Cloud setup needed.

- **URL**: https://apify.com/maged120/google-translate-scraper.md
- **Developed by:** [Maged](https://apify.com/maged120) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 362 total users, 15 monthly users, 99.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### What does Google Translate API do?

**Google Translate API** translates **any number of texts into one or many languages in a single run**, using Google Translate quality across **100+ languages**. Paste your texts, pick target languages such as Spanish, French, Arabic or Chinese, and get a clean table of translations with the detected source language for each one.

It runs on the Apify platform, so you can call it from your own code through the API, schedule it, or connect it to Google Sheets, Zapier, Make and more. There's no Google Cloud project, billing account or quota setup.

### Why use this Google Translate Actor?

- **Bulk translation**: hundreds or thousands of texts in one run, with no copy-pasting into a browser.
- **One text → many languages**: translate product descriptions, UI strings or messages into every language you sell in, in one go.
- **Automatic language detection**: mixed-language input is fine; each text reports what language it was in.
- **Spreadsheet-ready output**: export to CSV or Excel, with original and translation side by side.
- **Works anywhere**: e-commerce catalogs, app localization, support tickets, reviews, social posts, research data.

### How to translate text in bulk

1. Click **Try for free** (or **Start**).
2. Paste your texts into **Texts to translate**, one per line.
3. Add your **Target languages**: codes like `es`, `fr`, `de`, `ar`, `zh-CN`, or names like `Spanish`.
4. Leave **Source language** on `auto`, or set it if you know it.
5. Click **Start** and download your translations from the **Output** tab.

### Input

| Field | Description |
|---|---|
| **Texts to translate** | One text per line. Each one is translated into every target language. |
| **Target languages** | Language codes or names. |
| **Source language** | `auto` (default) detects each text's language. |
| **Advanced: per-text languages** | Optional JSON list for when each text needs its own languages. |

```json
{
    "texts": ["Hello, how are you?", "Thank you for your order."],
    "targetLanguages": ["es", "Arabic"]
}
```

Per-text languages (advanced):

```json
{
    "batch_items": [
        { "text": "Bonjour tout le monde", "target_lang": ["en", "de"] },
        { "text": "Guten Morgen", "source_lang": "de", "target_lang": "it" }
    ]
}
```

### Output

One row per text per target language. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

```json
{
    "item_index": 2,
    "original_text": "Hello, how are you?",
    "translated_text": "مرحبا، كيف حالك؟",
    "source_language": "en",
    "source_language_name": "English",
    "target_language": "ar",
    "target_language_name": "Arabic",
    "success": true,
    "error": null
}
```

#### Data fields

| Field | Description |
|---|---|
| `original_text` | Your text |
| `translated_text` | The translation |
| `source_language`, `source_language_name` | Detected (or given) source language |
| `target_language`, `target_language_name` | Language translated into |
| `success` | `true` when a translation was returned |
| `error` | Why a text could not be translated (rare; run it again) |
| `item_index` | Position in your input, for matching rows back |

### How many results will I get?

| Input | Results |
|---|---|
| 10 texts × 1 language | 10 rows |
| 10 texts × 5 languages | 50 rows |
| 1,000 texts × 3 languages | 3,000 rows |

Each translation is one result. Texts longer than 15,000 characters are cut to that length, so split very long documents into paragraphs.

### Tips

- **Localization:** put all your UI strings in **Texts** and all your markets in **Target languages**. You get a full translation matrix in one run.
- **Keep formatting:** translate paragraph by paragraph and not whole documents, for the best quality and easy re-assembly.
- **Spreadsheets:** connect the dataset to Google Sheets, or export as CSV, to drop translations straight into your catalog.
- **Language names or codes:** both work (`Spanish` or `es`, `Chinese (Simplified)` or `zh-CN`).

### FAQ

**Which languages are supported?**
All languages available in Google Translate, 100+ including Arabic, Chinese, Hindi, Japanese, Korean, Russian, Turkish, Urdu and many regional languages.

**Do I need a Google Cloud account or API key?**
No. Run it here and read the results through the Apify API if you want to automate it.

**Is the translation quality the same as Google Translate?**
Yes. Translations come from Google Translate.

**Found a bug or need a custom solution?**
Open an issue in the **Issues** tab. Custom versions are available on request.

***

⭐ **Found this Actor useful?** A quick review on the Store helps other users find it and keeps it maintained.

# Actor input Schema

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

One text per line. Each text is translated into every target language below.

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

Language codes or names, e.g. es, fr, de, ar, zh-CN, or Spanish. Every text is translated into each language.

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

Language of your texts. Leave as auto to detect it automatically for each text.

## `batch_items` (type: `array`):

Optional. A JSON list where each text has its own languages: {"text": "...", "source_lang": "auto", "target_lang": "es"}. target_lang can also be a list, e.g. \["es", "fr"]. Use this when different texts need different languages.

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

Optional. Only used to retry when the translation service is busy; not needed for normal runs.

## Actor input object example

```json
{
  "texts": [
    "Hello, how are you?",
    "Thank you for your order."
  ],
  "targetLanguages": [
    "es",
    "fr"
  ],
  "sourceLanguage": "auto",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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?",
        "Thank you for your order."
    ],
    "targetLanguages": [
        "es",
        "fr"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("maged120/google-translate-scraper").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?",
        "Thank you for your order.",
    ],
    "targetLanguages": [
        "es",
        "fr",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("maged120/google-translate-scraper").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?",
    "Thank you for your order."
  ],
  "targetLanguages": [
    "es",
    "fr"
  ]
}' |
apify call maged120/google-translate-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,maged120/google-translate-scraper"
        }
    }
}
```

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/eAca3jGYIH1nOqVFb/builds/cQmaxxkfa1Vn5D9f6/openapi.json
