# Nepali Transliterator: Romanized Nepali to Devanagari and back (`rounded_narcissus/nepali-transliterator`) Actor

Convert Romanized Nepali ("tapai kasto hunuhunchha") to Devanagari and Devanagari to Roman letters. Rule-based and offline, no API key. One result row per text, fast and cheap per call.

- **URL**: https://apify.com/rounded_narcissus/nepali-transliterator.md
- **Developed by:** [Pradip Malla](https://apify.com/rounded_narcissus) (community)
- **Categories:** AI, Automation, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 text converteds

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

## Nepali Transliterator: Romanized Nepali to Devanagari and back

Converts Romanized Nepali ("tapai kasto hunuhunchha") to Devanagari (तपाईं कस्तो हुनुहुन्छ) and Devanagari to Roman
letters. Rules run inside the Actor: no API key, no network calls, no personal data stored. One result row per text.

### Input

- `texts` (required): list of strings, up to 5,000 characters each.
- `direction`: `auto` (default; text with Devanagari letters goes to Roman, other text goes to Devanagari), `to_devanagari`, `to_roman`.
- `danda` (default true): a full stop after a Devanagari word becomes ।.
- `digits` (default true): 0-9 become ०-९ when converting to Devanagari.
- `maxTexts` (default 500, at most 2,000).

Example input: `{"texts": ["namaste, mero naam Raam ho", "नेपाल सुन्दर देश हो।"]}`

### Output

One dataset row per text: `input`, `ok`, `output`, `direction`, `characters`; failed rows carry `error`. A `SUMMARY`
record counts converted, failed and skipped texts.

Example output row: `{"input": "namaste, mero naam Raam ho", "ok": true, "output": "नमस्ते, मेरो नाम राम हो", "direction": "to_devanagari", "characters": 26}`

### How to type Roman Nepali

- Long vowels: `aa`, `ee` (or `ii`), `oo` (or `uu`). A single `a` after a consonant is the hidden vowel: `gharmaa` gives घरमा,
  `gharma` gives घरम; `Raam` gives राम, `Ram` gives रम.
- Retroflex letters use capitals: `T Th D Dh N` (`kaThmaaDauM` gives कठमाडौं). `M` gives the anusvara (ं).
- Others: `chh` छ, `sh` श, `shh` ष, `ksh` क्ष, `tr` त्र, `gya` ज्ञ, `ng` ङ.
- Consonants join with a halant when the second is r, y, w, v or l (`ramro` रम्रो, `prem` प्रेम) or in common pairs such as
  `st`, `nt`, `nd`, `nchh` (`kasto` कस्तो, `hunuhunchha` हुनुहुन्छ). A few very common words are spelled from a list
  (`tapai`, `chha`, `ho`, `ko`, `lai`).

### Honest limits

- Rule-based, not a language model: Roman spelling is ambiguous, so spelling follows the convention above and
  unusual conjuncts (for example `dd`, `tt`, `ndra` inside long words) may need a different spelling.
- Devanagari to Roman is a simple readable scheme (namaste, nepaal), not a formal standard; the hidden vowel in the
  middle of long words is dropped by a rule and can be wrong.
- It transliterates sounds; it does not translate, and it does not fix spelling.

### Price

Pay per event: `text` USD 0.002 per text converted. Empty or rejected texts are not charged. Nothing else is billed.

# Actor input Schema

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

Texts to convert, one result row each (up to 5,000 characters per text). Romanized Nepali becomes Devanagari; Devanagari becomes Roman letters.

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

auto: texts with Devanagari letters go to Roman, others go to Devanagari. Or force to_devanagari or to_roman.

## `danda` (type: `boolean`):

When converting to Devanagari, write a sentence-ending full stop after a Devanagari word as the danda.

## `digits` (type: `boolean`):

When converting to Devanagari, write the digits 0 to 9 as Devanagari digits.

## `maxTexts` (type: `integer`):

Upper limit of texts converted in one run; extra ones are skipped and reported.

## Actor input object example

```json
{
  "texts": [
    "namaste, mero naam Ram ho",
    "ma kaThmaaDauM jaanchhu",
    "नेपाल सुन्दर देश हो।"
  ],
  "direction": "auto",
  "danda": true,
  "digits": true,
  "maxTexts": 500
}
```

# Actor output Schema

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

One row per text: the input, the converted output, the direction used, and an error when the text could not be converted.

## `summary` (type: `string`):

Counts of texts converted, failed and skipped, saved as the SUMMARY record.

# 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": [
        "namaste, mero naam Ram ho",
        "ma kaThmaaDauM jaanchhu",
        "नेपाल सुन्दर देश हो।"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rounded_narcissus/nepali-transliterator").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": [
        "namaste, mero naam Ram ho",
        "ma kaThmaaDauM jaanchhu",
        "नेपाल सुन्दर देश हो।",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("rounded_narcissus/nepali-transliterator").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": [
    "namaste, mero naam Ram ho",
    "ma kaThmaaDauM jaanchhu",
    "नेपाल सुन्दर देश हो।"
  ]
}' |
apify call rounded_narcissus/nepali-transliterator --silent --output-dataset

```

## MCP server setup

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

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/eoZW2uQwjrG6oGSWw/builds/bpy5OAQjTUTDmhgXM/openapi.json
