# MyMemory Translation Memory Scraper (`automation-lab/mymemory-translation-memory-scraper`) Actor

Translate text batches with MyMemory and export match scores, translation-memory alternatives, language metadata, attribution, and per-item status.

- **URL**: https://apify.com/automation-lab/mymemory-translation-memory-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Developer tools, Automation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.57 / 1,000 successful translations

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## MyMemory Translation Memory Scraper

Translate batches of supplied text through MyMemory and export structured translation results for localization workflows.

The Actor returns the selected translation, match quality, requested language pair, translation-memory alternatives, attribution, source metadata, and a status for every input item.

It uses MyMemory's public structured endpoint directly.
No browser, proxy, login, or separate translation API key is required.

### What does this MyMemory translation Actor do?

Provide one or more text items and a source/target language pair.
The Actor looks up every item in MyMemory, normalizes the response, and saves one dataset row per request.

Each successful row contains:

- your stable item ID;
- original and translated text;
- selected match score;
- requested source and target language codes;
- ranked translation-memory alternatives;
- quality, locale, usage, contributor, reference, and date metadata when exposed;
- MyMemory response and quota flags;
- attribution and source endpoint;
- collection timestamp.

Failed lookups are also visible as status rows, but they are not charged as successful translations.

### Who is it for?

This Actor is useful for:

- localization engineers preparing UI string batches;
- product teams translating release notes and interface copy;
- support operations localizing reusable answers;
- language teams reviewing translation-memory candidates;
- data engineers enriching CSV, JSON, or database records;
- automation teams scheduling repeatable multilingual jobs.

Stable input IDs make it straightforward to join translations back to a source table.

### Why use this Actor?

A raw translation endpoint gives you a response for one request.
This Actor adds the workflow layer needed on Apify:

- batch input with bounded concurrency;
- one default language pair or per-item overrides;
- normalized, tabular output;
- translation-memory alternatives rather than only the selected string;
- explicit item-level status and diagnostics;
- bounded transient retries;
- optional fail-fast semantics after diagnostics are saved;
- scheduled runs, webhooks, datasets, API access, and integrations.

The product does not claim language auto-detection.
Language fields describe the pair you requested and the locales MyMemory attaches to its matches.

### Getting started

1. Open the Actor input page.
2. Add objects to **Text items**.
3. Give each item a `text` value and, optionally, an `id`.
4. Set the default source and target language codes.
5. Override either code on individual items when a batch contains multiple pairs.
6. Choose how many translation-memory alternatives to retain.
7. Run the Actor.
8. Open **Translation results** or export the dataset as JSON, CSV, Excel, XML, or RSS.

A minimal input is:

```json
{
  "items": [
    { "id": "welcome", "text": "Welcome to your dashboard" },
    { "id": "save", "text": "Save changes" }
  ],
  "sourceLanguage": "en",
  "targetLanguage": "es"
}
```

### Input parameters

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `items` | array | required | 1–1,000 translation requests; each text is limited to 500 UTF-8 bytes |
| `items[].id` | string | — | Optional identifier copied into the result |
| `items[].text` | string | required | Source text sent to MyMemory |
| `items[].sourceLanguage` | string | batch default | Per-item ISO source language override |
| `items[].targetLanguage` | string | batch default | Per-item ISO target language override |
| `sourceLanguage` | string | `en` | Default ISO source language code |
| `targetLanguage` | string | `es` | Default ISO target language code |
| `maxAlternatives` | integer | `5` | Number of translation-memory matches retained, from 0 to 20 |
| `maxConcurrency` | integer | `3` | Concurrent requests, from 1 to 10 |
| `userEmail` | string | — | Optional contact email sent in MyMemory's documented `de` parameter |
| `failOnItemError` | boolean | `false` | Fail the run after saving status rows if any request fails |

Language codes may be general (`en`, `es`, `de`) or locale-qualified (`pt-BR`, `en-US`).
Support for a particular pair is controlled by MyMemory.

### Use multiple language pairs in one batch

Set language codes directly on an item to override the batch defaults:

```json
{
  "items": [
    {
      "id": "release-es",
      "text": "A new version is available",
      "sourceLanguage": "en",
      "targetLanguage": "es"
    },
    {
      "id": "release-de",
      "text": "A new version is available",
      "sourceLanguage": "en",
      "targetLanguage": "de"
    },
    {
      "id": "release-pt",
      "text": "A new version is available",
      "sourceLanguage": "en",
      "targetLanguage": "pt"
    }
  ],
  "sourceLanguage": "en",
  "targetLanguage": "es",
  "maxConcurrency": 2
}
```

The output preserves input order through `inputIndex` and copies each `id`.

### Output fields

| Field | Meaning |
| --- | --- |
| `itemId` | User-supplied join key, or `null` |
| `inputIndex` | Zero-based location in the submitted batch |
| `status` | `succeeded` or `failed` |
| `sourceText` | Original supplied text |
| `translatedText` | Selected MyMemory translation, or `null` after failure |
| `requestedSourceLanguage` | Requested source code |
| `requestedTargetLanguage` | Requested target code |
| `matchScore` | Match score for the selected translation |
| `responseStatus` | Status embedded in the MyMemory payload |
| `responseDetails` | Additional MyMemory response message |
| `quotaFinished` | Whether MyMemory reported exhausted quota |
| `machineTranslationLanguageSupported` | Upstream support flag when present |
| `alternatives` | Ranked translation-memory matches and metadata |
| `alternativeCount` | Number of retained alternatives |
| `attribution` | MyMemory source attribution |
| `sourceProvider` | Upstream provider name |
| `sourceUrl` | Public API endpoint used |
| `error` | Item-level failure message, or `null` |
| `fetchedAt` | ISO collection timestamp |

Fields may be `null` when MyMemory does not expose them.
The dataset schema remains permissive because upstream translation-memory entries vary.

### Example output

A successful row looks like this:

```json
{
  "itemId": "welcome",
  "inputIndex": 0,
  "status": "succeeded",
  "sourceText": "Welcome to your dashboard",
  "translatedText": "Bienvenido",
  "requestedSourceLanguage": "en",
  "requestedTargetLanguage": "es",
  "matchScore": 1,
  "responseStatus": 200,
  "responseDetails": "",
  "quotaFinished": false,
  "machineTranslationLanguageSupported": null,
  "alternatives": [
    {
      "alternativeId": "123456789",
      "sourceText": "Welcome",
      "translatedText": "Bienvenido",
      "sourceLanguage": "en-US",
      "targetLanguage": "es-ES",
      "quality": 74,
      "matchScore": 0.99,
      "usageCount": 3,
      "subject": "General",
      "reference": null,
      "createdBy": "Contributor",
      "lastUpdatedBy": "Contributor",
      "createdAt": "2025-01-15 12:00:00",
      "updatedAt": "2025-01-15 12:00:00"
    }
  ],
  "alternativeCount": 1,
  "attribution": "Translation data provided by MyMemory (Translated.net)",
  "sourceProvider": "MyMemory",
  "sourceUrl": "https://api.mymemory.translated.net/get",
  "error": null,
  "fetchedAt": "2025-01-15T12:00:00.000Z"
}
```

### How much does it cost to translate text with MyMemory?

Pricing has two events:

- **Start:** $0.005 once per run.
- **Successful translation:** tiered by your Apify plan; BRONZE is $0.009288 per successfully translated item.

Failed status rows have no successful-translation event charge.
Translation-memory alternatives are included with their parent translation and have no separate event charge.

Example billing shapes are:

| Successful items | Charged events |
| ---: | --- |
| 1 | one start event + one successful-translation event |
| 10 | one start event + 10 successful-translation events |
| 100 | one start event + 100 successful-translation events |

Calculate the run total as the active start price plus successful items multiplied by your plan's item price.
Your final price depends on your Apify plan's active tier.
Platform usage is handled under Apify's pay-per-event model.

### Reliability, retries, and failure behavior

The Actor sends direct HTTPS requests to MyMemory.
It does not enable an automatic paid proxy fallback.

A request has a 20-second timeout.
Network failures, timeouts, HTTP 429, and temporary HTTP 5xx responses can be retried twice with backoff and jitter.
Stable client errors and invalid payloads are not retried blindly.

By default, an upstream failure produces a row with `status: "failed"` so a batch remains auditable.
Set `failOnItemError` to `true` when a pipeline should treat any failed item as a failed run.
The diagnostic row is still saved before the run fails.

### Limits and responsible scheduling

MyMemory controls upstream language support, quotas, availability, and response quality.
The Actor cannot bypass those limits.

Keep concurrency conservative.
An optional contact email may qualify requests for MyMemory's documented higher allowance, but it does not guarantee capacity.
Do not submit secrets, regulated data, or personal information you are not authorized to process.

Each text is limited to 500 UTF-8 bytes.
Split longer documents into meaningful segments before sending them.
For localization, sentence or interface-string boundaries usually produce better reusable matches than arbitrary byte chunks.

### Export and automation workflows

Common patterns include:

1. Export product strings from a CMS, translate them, and join on `id`.
2. Schedule a release-localization task and send the dataset to a webhook.
3. Review low `matchScore` rows before publishing copy.
4. Compare `alternatives` to choose terminology already present in translation memory.
5. Send successful rows to Google Sheets, Airtable, a data warehouse, or a localization platform.
6. Filter `status = failed` and retry only those IDs in a later run.

Apify integrations can trigger runs on a schedule and forward completed datasets without maintaining a translation worker.

### Run through the Apify API

Replace `YOUR_TOKEN` with an Apify API token.

#### cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~mymemory-translation-memory-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"items":[{"id":"save","text":"Save changes"}],"sourceLanguage":"en","targetLanguage":"es"}'
```

#### JavaScript

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const input = {
  items: [{ id: 'save', text: 'Save changes' }],
  sourceLanguage: 'en',
  targetLanguage: 'es',
};
const run = await client.actor('automation-lab/mymemory-translation-memory-scraper').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("automation-lab/mymemory-translation-memory-scraper").call(run_input={
    "items": [{"id": "save", "text": "Save changes"}],
    "sourceLanguage": "en",
    "targetLanguage": "es",
})
results = client.dataset(run["defaultDatasetId"]).list_items().items
print(results)
```

For asynchronous pipelines, start a run and consume the dataset after the run reaches a terminal state.

### Use with MCP and AI agents

Add the Actor to Claude Code through Apify's MCP endpoint:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/mymemory-translation-memory-scraper"
```

#### Claude Desktop

Add this server configuration to Claude Desktop:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/mymemory-translation-memory-scraper"
    }
  }
}
```

#### Cursor

Add the same `apify` MCP server URL in **Cursor Settings → MCP**.

#### VS Code

Add the same `apify` MCP server URL through your VS Code MCP extension or workspace MCP configuration.

Example prompts:

- “Translate these interface labels from English to Spanish and return IDs with match scores.”
- “Look up French alternatives for this support-copy batch and flag matches below 0.9.”
- “Translate this release message to Spanish, German, and Portuguese in one run.”

### Legal and responsible use

Use the Actor only for text you are allowed to process.
Follow MyMemory and Translated.net terms, applicable privacy rules, intellectual-property requirements, and Apify platform policies.

The output includes source attribution; retain appropriate attribution in downstream uses where required.
This Actor is an independent automation tool and is not endorsed by MyMemory or Translated.net.

Translation output can be inaccurate or contextually unsuitable.
Use qualified human review for legal, medical, safety-critical, contractual, or public-facing material where errors could cause harm.

### Troubleshooting

**Why did an item fail while the run succeeded?**

The default behavior preserves batch progress and writes an uncharged failed status row.
Inspect `error`, verify the language pair, check the text size, and retry that item later.
Enable `failOnItemError` when your orchestrator requires a failed run state.

**Why is `machineTranslationLanguageSupported` null?**

MyMemory does not populate this field on every response.
A null value is not a claim that the pair is unsupported; inspect the translation and response fields.

**Why are there fewer alternatives than requested?**

`maxAlternatives` is an upper bound.
MyMemory may return fewer matching translation-memory entries.

**Why was my input rejected before requests started?**

The Actor validates required text, language-code shape, email shape, concurrency, alternatives, batch size, and the 500-byte upstream boundary.
Correct the named field and rerun.

### FAQ

**Does it auto-detect the source language?**

No. Supply the source language explicitly at batch or item level.
This avoids presenting requested language metadata as detection.

**Can one run translate to several target languages?**

Yes. Add `targetLanguage` to individual items.

**Are alternatives charged separately?**

No. They are included in a successful translation row.

**Does it use residential proxies?**

No. The implementation uses the public structured endpoint directly and has no automatic proxy mode.

**Can it translate whole documents?**

The product accepts text segments up to 500 UTF-8 bytes each.
Split documents at meaningful boundaries and retain IDs for reassembly.

### Related automation

This Actor is intentionally standalone in the automation-lab portfolio because it performs translation rather than source scraping.
Combine it with any Actor whose dataset contains text by mapping selected fields into `items`, then join translated rows back through `id`.
Apify schedules, webhooks, and integrations provide the recommended orchestration layer.

# Actor input Schema

## `items` (type: `array`):

Translation requests. Each text must be no more than 500 UTF-8 bytes. Item-level language codes override the batch defaults.

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

ISO source language code used when an item has no override.

## `targetLanguage` (type: `string`):

ISO target language code used when an item has no override.

## `maxAlternatives` (type: `integer`):

Maximum translation-memory matches retained for each successful item.

## `maxConcurrency` (type: `integer`):

Number of MyMemory requests processed concurrently. Keep this conservative to avoid source rate limits.

## `userEmail` (type: `string`):

Optional email sent in MyMemory's documented de parameter, which may qualify requests for its higher anonymous usage allowance.

## `failOnItemError` (type: `boolean`):

When enabled, preserve per-item status rows and then fail the run if any translation request fails.

## Actor input object example

```json
{
  "items": [
    {
      "id": "welcome-message",
      "text": "Welcome to our application"
    },
    {
      "id": "checkout-button",
      "text": "Continue to checkout"
    }
  ],
  "sourceLanguage": "en",
  "targetLanguage": "es",
  "maxAlternatives": 5,
  "maxConcurrency": 3,
  "failOnItemError": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Open the normalized translation batch in the overview table.

# 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 = {
    "items": [
        {
            "id": "welcome-message",
            "text": "Welcome to our application"
        },
        {
            "id": "checkout-button",
            "text": "Continue to checkout"
        }
    ],
    "sourceLanguage": "en",
    "targetLanguage": "es",
    "maxAlternatives": 5,
    "maxConcurrency": 3,
    "failOnItemError": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/mymemory-translation-memory-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 = {
    "items": [
        {
            "id": "welcome-message",
            "text": "Welcome to our application",
        },
        {
            "id": "checkout-button",
            "text": "Continue to checkout",
        },
    ],
    "sourceLanguage": "en",
    "targetLanguage": "es",
    "maxAlternatives": 5,
    "maxConcurrency": 3,
    "failOnItemError": False,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/mymemory-translation-memory-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 '{
  "items": [
    {
      "id": "welcome-message",
      "text": "Welcome to our application"
    },
    {
      "id": "checkout-button",
      "text": "Continue to checkout"
    }
  ],
  "sourceLanguage": "en",
  "targetLanguage": "es",
  "maxAlternatives": 5,
  "maxConcurrency": 3,
  "failOnItemError": false
}' |
apify call automation-lab/mymemory-translation-memory-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/mymemory-translation-memory-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/gyvtRCJJyc2mN5bQt/builds/we9wtfyVTefsFitqo/openapi.json
