# Japanese to Romaji, Hiragana & Furigana Converter (Kanji) (`chivalrous_skyline_vtd/japanese-furigana-romaji`) Actor

Convert Japanese text (kanji) to hiragana, katakana, romaji (Hepburn, Kunrei, Nihon-shiki) and furigana as HTML ruby. Offline, bulk up to 10,000 texts, custom readings.

- **URL**: https://apify.com/chivalrous_skyline_vtd/japanese-furigana-romaji.md
- **Developed by:** [HexaX](https://apify.com/chivalrous_skyline_vtd) (community)
- **Categories:** Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.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

## Japanese to Romaji, Hiragana & Furigana Converter (Kanji)

Japanese to romaji, kanji to hiragana, furigana generator: turn Japanese text into **hiragana, katakana, romaji and furigana** in one call.

### Use cases

- Learning materials and graded readers that need furigana.

- Subtitles and lyrics that need romaji.

- Search indexes that need kana readings.

- Name lists you want romanized.

- Romaji in **Hepburn**, **Kunrei-shiki** or **Nihon-shiki**.

- Furigana as HTML `<ruby>` (okurigana stay outside the ruby: `<ruby>食<rt>た</rt></ruby>べる`) or as plain text `食(た)べる`.

- **Custom readings** for names and words the dictionary gets wrong.

- Runs fully offline with a bundled dictionary. Your text is not sent to any other service.

### Quick start

Keep the example texts and press Start. Each text becomes one row with `hiragana`, `katakana`, `romaji`, `furigana_html` and `furigana_text`.

### Input

```json
{
  "texts": ["今日は良い天気ですね。", "お父さんと東京へ行った。", "山田太郎さんは日本に住んでいます。"],
  "romajiSystem": "hepburn",
  "keepForeignSpelling": true,
  "customReadings": {"日本": "にほん", "山田太郎": "やまだたろう"},
  "useBuiltInReadings": true,
  "includeTokens": false
}
```

| Field | Default | Notes |
|---|---|---|
| `texts` | (required) | Up to 10,000 texts per run, each up to 10,000 characters. |
| `romajiSystem` | `hepburn` | `hepburn`, `kunrei` or `nihon`. |
| `keepForeignSpelling` | `true` | Write known loanwords in their source spelling (コンピューター → computer). |
| `customReadings` | `{}` | `{word: kana reading}`, up to 1,000 entries. The longest match wins. Readings apply to hiragana, katakana, furigana and romaji. |
| `useBuiltInReadings` | `true` | Fixes for common words the dictionary misreads: お父さん, お母さん, お兄さん, お姉さん, お祖父さん, お祖母さん, 日本語, 日本人, 二十歳. |
| `includeTokens` | `false` | Adds a word-by-word list with reading, part of speech and dictionary form. |

### Output

```json
{
  "index": 0,
  "text": "今日は良い天気ですね。",
  "hiragana": "きょうはよいてんきですね。",
  "katakana": "キョウハヨイテンキデスネ。",
  "romaji": "Kyou wa yoi tenki desu ne.",
  "furigana_html": "<ruby>今日<rt>きょう</rt></ruby>は<ruby>良<rt>よ</rt></ruby>い<ruby>天気<rt>てんき</rt></ruby>ですね。",
  "furigana_text": "今日(きょう)は良(よ)い天気(てんき)ですね。",
  "has_kanji": true,
  "error": null
}
```

`index` is the position of the text in your input. Empty or over-long texts return a row with `error` set.

### Pricing (pay per event)

| Event | Price | When |
|---|---|---|
| `text-converted` | **$0.001** ($1 per 1,000 texts) | Each text converted |
| Actor start | Apify default | Once per run |

Empty and over-long texts are not charged. If you set a maximum charge for the run, the Actor stops once it is reached.

### FAQ

**Why is a reading wrong?** The dictionary picks the most likely reading from context. Names, place names and rare words are the usual misses. Add them to `customReadings` (for example `{"山田太郎": "やまだたろう"}`); the longest match wins.

**Hepburn, Kunrei or Nihon-shiki?** Hepburn is the common one for English readers (shi, chi, tsu). Kunrei-shiki (ISO 3602) and Nihon-shiki follow the kana table (si, ti, tu).

**Is my text sent anywhere?** No. Everything runs offline with a bundled dictionary.

**Japanese search words:** ふりがな変換, ローマ字変換, ひらがな変換, 漢字 読み仮名.

### Accuracy and limits

- Readings come from morphological analysis (MeCab via [fugashi](https://github.com/polm/fugashi) with UniDic-lite) and romaji from [cutlet](https://github.com/polm/cutlet).
- Expect mistakes on **personal and place names**, rare words, and words with several valid readings. For example, the dictionary reads 日本 as にっぽん and 明日 as あす. Use `customReadings` for anything that matters.
- `hiragana` writes particles as spelled (は, へ). `romaji` writes them as pronounced (wa, e).
- Numbers and Latin letters are kept as they are.
- No network access and no external services. Nothing is stored beyond the run's dataset.

### Run locally

```bash
python -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt                 # includes the UniDic-lite dictionary (~250 MB unpacked)
python -m unittest discover -s tests -t .

mkdir -p storage/key_value_stores/default
echo '{"texts": ["今日は良い天気ですね。"]}' > storage/key_value_stores/default/INPUT.json
python -m src                                   # or `apify run`; results in storage/datasets/default/
ACTOR_TEST_PAY_PER_EVENT=true python -m src     # simulate pay-per-event charging locally
```

### Licenses of bundled components

| Component | License |
|---|---|
| fugashi | MIT AND BSD-3-Clause |
| cutlet | MIT |
| unidic-lite | MIT (package); UniDic data © The UniDic Consortium, BSD-3-Clause (`LICENSE.unidic` in the package) |

### Related actors

- [AI Crawler Checker & GEO / AEO Audit](https://apify.com/chivalrous_skyline_vtd/ai-search-readiness-audit): check a site for AI search readiness (llms.txt, AI bots, JSON-LD).
- [Video Frame Extractor](https://apify.com/chivalrous_skyline_vtd/video-frame-extractor): frames, scene changes and thumbnails from video file URLs.
- [Stable Diffusion Prompt Extractor](https://apify.com/chivalrous_skyline_vtd/sd-prompt-extractor): read prompts and settings embedded in AI images.
- [Japan Diet Parliament Debates & Speeches Search](https://apify.com/chivalrous_skyline_vtd/japan-diet-minutes): speeches from Japan's National Diet since 1947.

# Actor input Schema

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

One item per text (up to 10,000 texts, 10,000 characters each). Each text becomes one result row.

## `romajiSystem` (type: `string`):

Hepburn (most common), Kunrei-shiki (ISO 3602) or Nihon-shiki.

## `keepForeignSpelling` (type: `boolean`):

Write katakana loanwords in their original spelling when known (コンピューター → computer). Turn off for strict transliteration (konpyuutaa).

## `customReadings` (type: `object`):

Force readings for words the dictionary gets wrong, e.g. names: {"日本": "にほん", "山田太郎": "やまだたろう"}. Readings must be kana. Up to 1,000 entries.

## `useBuiltInReadings` (type: `boolean`):

Apply a small built-in list of fixes for common words the dictionary misreads (お父さん, 日本語, 日本人, 二十歳 …).

## `includeTokens` (type: `boolean`):

Also return each word with its reading, part of speech and dictionary form.

## Actor input object example

```json
{
  "texts": [
    "今日は良い天気ですね。",
    "お父さんと東京へ行った。",
    "山田太郎さんは日本に住んでいます。"
  ],
  "romajiSystem": "hepburn",
  "keepForeignSpelling": true,
  "customReadings": {
    "日本": "にほん",
    "山田太郎": "やまだたろう"
  },
  "useBuiltInReadings": true,
  "includeTokens": false
}
```

# Actor output Schema

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

Results in the run's default dataset.

# 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": [
        "今日は良い天気ですね。",
        "お父さんと東京へ行った。",
        "山田太郎さんは日本に住んでいます。"
    ],
    "customReadings": {
        "日本": "にほん",
        "山田太郎": "やまだたろう"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("chivalrous_skyline_vtd/japanese-furigana-romaji").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": [
        "今日は良い天気ですね。",
        "お父さんと東京へ行った。",
        "山田太郎さんは日本に住んでいます。",
    ],
    "customReadings": {
        "日本": "にほん",
        "山田太郎": "やまだたろう",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("chivalrous_skyline_vtd/japanese-furigana-romaji").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": [
    "今日は良い天気ですね。",
    "お父さんと東京へ行った。",
    "山田太郎さんは日本に住んでいます。"
  ],
  "customReadings": {
    "日本": "にほん",
    "山田太郎": "やまだたろう"
  }
}' |
apify call chivalrous_skyline_vtd/japanese-furigana-romaji --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,chivalrous_skyline_vtd/japanese-furigana-romaji"
        }
    }
}
```

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/QqNj2maD1z66Vkh0a/builds/h3LeNJpaeU9wDueHR/openapi.json
