# Arabic Dialects Translator: Darija, Egyptian, Gulf (AI Agents) (`ali-lamtoueq/darija-mcp`) Actor

Translate to and from Moroccan Darija and other spoken Arabic dialects (Egyptian, Levantine, Gulf, Iraqi, Maghrebi), detect the dialect for free, convert Arabizi to Arabic script, and get Arabic name spelling variants. Pay per result. AI agents can pay on their own.

- **URL**: https://apify.com/ali-lamtoueq/darija-mcp.md
- **Developed by:** [Ali Lamtoueq](https://apify.com/ali-lamtoueq) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 translation results

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

## Darija & Arabic Dialects MCP — spoken Arabic for AI agents

**Let your agent understand and write Arabic the way people actually speak and text it.**
Moroccan Darija first (native-reviewed), plus Egyptian, Levantine, Gulf, Iraqi, Algerian, Tunisian, Libyan, Sudanese and Yemeni (beta).
Arabic script, Arabizi / Franco-Arabic (`wach nta mzyan?`, `ezayak 3amel eh`), and the constant mix with French and English.

Built for teams shipping **WhatsApp bots, customer-support agents, social listening, call-center analytics, CRM and marketing tools** for the Arab world
(400M+ people who mostly *write* in dialect online, where generic translators and MSA-tuned models struggle).

### Tools

| Tool | What it does | Price |
|---|---|---|
| `detect_arabic_dialect` | Which dialect is this? Moroccan, Algerian, Tunisian, Libyan, Egyptian, Sudanese, Levantine, Iraqi, Gulf, Yemeni | **Free** |
| `detect_darija` | Is this Moroccan Darija? Confidence, script (Arabic / Arabizi), markers | **Free** |
| `translate_from_darija` | Dialect → English, French, Spanish, German, Italian, Turkish or Modern Standard Arabic. Slang and code-switching included | Paid |
| `translate_to_darija` | EN / FR / ES / DE / IT / TR / MSA → natural dialect. Arabic script, Arabizi or both; casual, polite or business | Paid |
| `arabizi_to_arabic` | `wach nta mzyan` → `واش نتا مزيان` (transliteration, no translation) | Paid |
| `analyze_sentiment` | Sentiment of reviews/messages in dialect: overall label, score −1..1, aspects (price, delivery, quality…), dialect, English summary | Paid |
| `tifinagh_transliterate` | Tamazight (Amazigh) Latin ↔ Tifinagh: `tamaziɣt` ↔ ⵜⴰⵎⴰⵣⵉⵖⵜ (IRCAM standard, instant, no AI) | **Free** |
| `arabic_name_variants` | `Mohammed` → محمد + Muhammad, Mohamed, Mohamad… and Al-/El-/bin/ben/Abd variants. For search and CRM dedup | Paid |

All translation tools take a `dialect` parameter (default `darija`).

### How to use it

Run the Actor with an input like:

```json
{ "tool": "translate_from_darija", "text": "wach nta mzyan? ch7al hadi ma chftek", "target": "en" }
```

or process up to 50 texts at once with `"texts": [...]`. Results land in the dataset, one item per text.

- You pay **only per successful paid result** ($0.02). Dialect detection is **free**.
- **AI agents can discover, run and pay for it on their own** through Apify (Apify MCP server, prepaid agent tokens) — no account, no human in the loop.
- Works from Claude, ChatGPT, Cursor, n8n, LangChain or any MCP client through the Apify MCP server.

#### Input fields

| Field | Used by | Values |
|---|---|---|
| `tool` | all | `translate_from_darija`, `translate_to_darija`, `arabizi_to_arabic`, `arabic_name_variants`, `analyze_sentiment`, `detect_arabic_dialect`, `detect_darija`, `tifinagh_transliterate` |
| `text` / `texts` | all | one text, or up to 50 |
| `dialect` | translation, Arabizi | `darija` (default), `egyptian`, `levantine`, `gulf`, `iraqi`, `algerian`, `tunisian`, `libyan`, `sudanese`, `yemeni` |
| `target` | translate FROM dialect | `en`, `fr`, `es`, `de`, `it`, `tr`, `msa` |
| `script` | translate TO dialect | `arabic`, `latin` (Arabizi), `both` |
| `register` | translate TO dialect | `casual`, `polite`, `business` |
| `name` | name variants | a person or family name |

### Direct MCP server (monthly plans, free daily trial)

Prefer a plain MCP endpoint? Use **`https://darija-mcp.lamtoueqali.workers.dev/mcp`** (Streamable HTTP).

**Claude Code**

```bash
claude mcp add darija --transport http https://darija-mcp.lamtoueqali.workers.dev/mcp
```

**Claude Desktop / Cursor / any MCP client**

```json
{ "mcpServers": { "darija": { "url": "https://darija-mcp.lamtoueqali.workers.dev/mcp" } } }
```

Without a key: **10 free calls per day** on the paid tools; detection is unlimited.
With a plan, send `Authorization: Bearer <key>` (or `X-API-Key`), or append `?key=<key>` to the URL.

| Plan | Calls / month | Price | |
|---|---|---|---|
| Starter | 1,000 | $9 / month | [Subscribe](https://checkout.freemius.com/product/46028/plan/81032/) |
| Pro | 10,000 | $49 / month | [Subscribe](https://checkout.freemius.com/product/46028/plan/81033/) |

Your API key arrives by email right after purchase.

### Example

> **Agent:** translate_to_darija("Your order has shipped and will arrive tomorrow.", dialect="darija", script="both")
>
> ## الكوموند ديالك تصيفطات وغادي توصل غدا
>
> la commande dyalek tsiftat w ghadi tewsel ghda

### Quality, honestly

- **Darija:** guided by native reference examples (regional variants, real customer-support language).
- **Other dialects:** beta, powered by a general AI model without native-reviewed examples yet. Feedback welcome.
- **Names:** `arabic_name_variants` is a search aid, not an identity, KYC or sanctions decision.

### Privacy

This service does not store your texts. They are sent to a third-party AI model provider (Google Gemini by default) only to produce the result. Max 4,000 characters per call.

***

Made in Morocco 🇲🇦 · Operator guide (French): [GUIDE-FR.md](GUIDE-FR.md)

# Actor input Schema

## `tool` (type: `string`):

What to do.

## `text` (type: `string`):

Text to process (max 4000 characters). For arabic_name_variants, put the name here or in 'name'.

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

Optional: up to 50 texts processed in one run (each paid result is charged once). Overrides 'text'.

## `name` (type: `string`):

Person or family name, in Arabic or Latin letters.

## `dialect` (type: `string`):

Arabic dialect. Darija is native-reviewed; others are beta.

## `target` (type: `string`):

Output language when translating FROM an Arabic dialect.

## `script` (type: `string`):

Writing system of the output when translating TO a dialect: Arabic script, Arabizi (Latin letters with digits) or both.

## `register` (type: `string`):

Tone of the output when translating TO a dialect.

## `direction` (type: `string`):

For tifinagh_transliterate: auto-detect, Latin → Tifinagh, or Tifinagh → Latin.

## Actor input object example

```json
{
  "tool": "translate_from_darija",
  "text": "wach nta mzyan? bghit nchoufek ghda",
  "dialect": "darija",
  "target": "en",
  "script": "arabic",
  "register": "polite",
  "direction": "auto"
}
```

# Actor output Schema

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

All results as dataset items.

# 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 = {
    "text": "wach nta mzyan? bghit nchoufek ghda"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ali-lamtoueq/darija-mcp").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 = { "text": "wach nta mzyan? bghit nchoufek ghda" }

# Run the Actor and wait for it to finish
run = client.actor("ali-lamtoueq/darija-mcp").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 '{
  "text": "wach nta mzyan? bghit nchoufek ghda"
}' |
apify call ali-lamtoueq/darija-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ali-lamtoueq/darija-mcp"
        }
    }
}
```

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/0wAiCnZZ67bRNcEi2/builds/hRfZJiVAjvDAZfu0u/openapi.json
